vector-graph-rag 0.1.2__tar.gz → 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/PKG-INFO +43 -16
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/README.md +37 -13
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/docs/faq.md +1 -1
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/docs/getting-started.md +6 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/evaluation/README.md +1 -1
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/pyproject.toml +6 -4
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/src/vector_graph_rag/__init__.py +8 -8
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/src/vector_graph_rag/api/app.py +134 -72
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/src/vector_graph_rag/config.py +14 -27
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/src/vector_graph_rag/graph/builder.py +5 -8
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/src/vector_graph_rag/graph/graph.py +45 -21
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/src/vector_graph_rag/graph/knowledge_graph.py +14 -11
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/src/vector_graph_rag/graph/retriever.py +9 -10
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/src/vector_graph_rag/llm/__init__.py +2 -2
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/src/vector_graph_rag/llm/cache.py +23 -33
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/src/vector_graph_rag/llm/extractor.py +23 -23
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/src/vector_graph_rag/llm/reranker.py +7 -20
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/src/vector_graph_rag/loaders/__init__.py +11 -19
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/src/vector_graph_rag/loaders/chunker.py +3 -3
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/src/vector_graph_rag/loaders/converter.py +7 -8
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/src/vector_graph_rag/loaders/url_fetcher.py +25 -26
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/src/vector_graph_rag/models.py +23 -36
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/src/vector_graph_rag/rag.py +42 -37
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/src/vector_graph_rag/storage/embeddings.py +38 -26
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/src/vector_graph_rag/storage/milvus.py +27 -14
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/uv.lock +61 -54
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/.dockerignore +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/.env.example +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/.github/workflows/docs.yml +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/.github/workflows/release.yml +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/.gitignore +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/Dockerfile +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/LICENSE +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/api/__init__.py +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/api/main.py +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/api/schemas.py +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/docs/assets/logo.png +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/docs/assets/logo.svg +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/docs/design-philosophy.md +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/docs/evaluation.md +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/docs/frontend.md +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/docs/how-it-works.md +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/docs/index.md +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/docs/python-api.md +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/docs/rest-api.md +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/docs/stylesheets/custom.css +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/docs/use-cases.md +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/evaluation/data/2wikimultihopqa.json +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/evaluation/data/2wikimultihopqa_corpus.json +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/evaluation/data/hotpotqa.json +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/evaluation/data/hotpotqa_corpus.json +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/evaluation/data/musique.json +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/evaluation/data/musique_corpus.json +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/evaluation/data/ner_cache/2wikimultihopqa_queries.named_entity_output.tsv +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/evaluation/data/ner_cache/hotpotqa_queries.named_entity_output.tsv +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/evaluation/data/ner_cache/hotpotqa_train_queries.named_entity_output.tsv +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/evaluation/data/ner_cache/musique_queries.named_entity_output.tsv +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/evaluation/data/ner_cache/sample_queries.named_entity_output.tsv +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/evaluation/data/openie_2wikimultihopqa_results_ner_gpt-3.5-turbo-1106_6119.json +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/evaluation/data/openie_hotpotqa_results_ner_gpt-3.5-turbo-1106_9221.json +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/evaluation/data/openie_musique_results_ner_gpt-3.5-turbo-1106_11656.json +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/evaluation/data/openie_test_sample_results_ner_gpt-3.5-turbo-1106_20.json +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/evaluation/data/test_sample.json +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/evaluation/data/test_sample_corpus.json +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/evaluation/evaluate.py +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/.gitignore +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/README.md +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/eslint.config.js +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/index.html +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/package-lock.json +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/package.json +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/public/vite.svg +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/App.css +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/App.tsx +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/api/client.ts +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/api/queries.ts +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/assets/react.svg +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/graph/EntityNode.tsx +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/graph/GraphCanvas.tsx +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/graph/GraphLegend.tsx +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/graph/RelationEdge.tsx +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/graph/index.ts +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/import/CreateGraphDialog.tsx +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/import/FileUploader.tsx +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/import/GraphSelector.tsx +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/import/GraphStatsPreview.tsx +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/import/ImportDialog.tsx +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/import/ImportProgress.tsx +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/import/ImportSettings.tsx +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/import/UrlInput.tsx +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/panels/AnswerPanel.tsx +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/panels/NodeDetailPanel.tsx +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/panels/index.ts +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/search/SearchInput.tsx +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/search/index.ts +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/settings/SettingsDialog.tsx +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/timeline/ProcessTimeline.tsx +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/timeline/index.ts +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/ui/Header.tsx +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/ui/button.tsx +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/ui/dialog.tsx +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/ui/input.tsx +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/ui/label.tsx +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/ui/progress.tsx +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/ui/switch.tsx +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/components/ui/tabs.tsx +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/hooks/use-toast.ts +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/index.css +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/main.tsx +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/stores/datasetStore.ts +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/stores/graphStore.ts +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/stores/searchStore.ts +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/types/api.ts +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/utils/cn.ts +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/src/utils/graphLayout.ts +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/tsconfig.app.json +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/tsconfig.json +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/tsconfig.node.json +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/frontend/vite.config.ts +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/mkdocs.yml +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/src/vector_graph_rag/api/__init__.py +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/src/vector_graph_rag/graph/__init__.py +4 -4
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/src/vector_graph_rag/storage/__init__.py +1 -1
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/tests/__init__.py +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/tests/conftest.py +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/tests/test_api.py +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/tests/test_graph.py +0 -0
- {vector_graph_rag-0.1.2 → vector_graph_rag-0.1.4}/tests/test_milvus_store.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: vector-graph-rag
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Summary: A Graph RAG implementation using pure vector search with Milvus
|
|
5
5
|
Project-URL: Homepage, https://github.com/zilliztech/vector-graph-rag
|
|
6
6
|
Project-URL: Documentation, https://zilliztech.github.io/vector-graph-rag/
|
|
@@ -31,14 +31,14 @@ Requires-Dist: scipy>=1.10.0
|
|
|
31
31
|
Requires-Dist: setuptools<71
|
|
32
32
|
Requires-Dist: tenacity>=8.2.0
|
|
33
33
|
Requires-Dist: tiktoken>=0.5.0
|
|
34
|
-
Requires-Dist: torch>=2.0.0
|
|
35
34
|
Requires-Dist: tqdm>=4.65.0
|
|
36
|
-
Requires-Dist: transformers>=4.30.0
|
|
37
35
|
Provides-Extra: all
|
|
38
36
|
Requires-Dist: fastapi>=0.109.0; extra == 'all'
|
|
39
37
|
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'all'
|
|
40
38
|
Requires-Dist: pytest>=7.0.0; extra == 'all'
|
|
41
39
|
Requires-Dist: ruff>=0.1.0; extra == 'all'
|
|
40
|
+
Requires-Dist: torch>=2.0.0; extra == 'all'
|
|
41
|
+
Requires-Dist: transformers>=4.30.0; extra == 'all'
|
|
42
42
|
Requires-Dist: uvicorn[standard]>=0.27.0; extra == 'all'
|
|
43
43
|
Provides-Extra: api
|
|
44
44
|
Requires-Dist: fastapi>=0.109.0; extra == 'api'
|
|
@@ -49,6 +49,9 @@ Requires-Dist: pytest>=7.0.0; extra == 'dev'
|
|
|
49
49
|
Requires-Dist: ruff>=0.1.0; extra == 'dev'
|
|
50
50
|
Provides-Extra: docs
|
|
51
51
|
Requires-Dist: mkdocs-material>=9.0.0; extra == 'docs'
|
|
52
|
+
Provides-Extra: hf
|
|
53
|
+
Requires-Dist: torch>=2.0.0; extra == 'hf'
|
|
54
|
+
Requires-Dist: transformers>=4.30.0; extra == 'hf'
|
|
52
55
|
Provides-Extra: loaders
|
|
53
56
|
Requires-Dist: lxml-html-clean; extra == 'loaders'
|
|
54
57
|
Requires-Dist: markitdown[docx,pdf]>=0.1.4; extra == 'loaders'
|
|
@@ -108,6 +111,17 @@ uv add "vector-graph-rag[loaders]"
|
|
|
108
111
|
|
|
109
112
|
</details>
|
|
110
113
|
|
|
114
|
+
<details>
|
|
115
|
+
<summary><b>With local HuggingFace embedding models</b></summary>
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
pip install "vector-graph-rag[hf]"
|
|
119
|
+
# or
|
|
120
|
+
uv add "vector-graph-rag[hf]"
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
</details>
|
|
124
|
+
|
|
111
125
|
## 🚀 Quick Start
|
|
112
126
|
|
|
113
127
|
```python
|
|
@@ -238,30 +252,39 @@ Evaluated on three multi-hop QA benchmarks (Recall@5):
|
|
|
238
252
|
|
|
239
253
|
## 🗄️ Milvus Backend
|
|
240
254
|
|
|
241
|
-
|
|
255
|
+
Just change `milvus_uri` to switch between deployment modes:
|
|
242
256
|
|
|
243
|
-
|
|
244
|
-
|------|-------------|----------------|----------|
|
|
245
|
-
| **Milvus Lite** (default) | `./vector_graph_rag.db` | — | Personal use, dev — zero config |
|
|
246
|
-
| **Milvus Server** | `http://localhost:19530` | Optional | Multi-dataset, team environments |
|
|
247
|
-
| ⭐ **Zilliz Cloud** | `https://in03-xxx.api.gcp-us-west1.zillizcloud.com` | API key | Production, fully managed — [free tier available](https://cloud.zilliz.com/signup?utm_source=github&utm_medium=referral&utm_campaign=vector-graph-rag-readme) |
|
|
257
|
+
**Milvus Lite** (default) — zero config, single-process, data stored in a local file. Great for prototyping and small datasets:
|
|
248
258
|
|
|
249
|
-
|
|
259
|
+
```python
|
|
260
|
+
rag = VectorGraphRAG(milvus_uri="./my_graph.db") # just works
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
⭐ **Zilliz Cloud** — fully managed, [free tier available](https://cloud.zilliz.com/signup?utm_source=github&utm_medium=referral&utm_campaign=vector-graph-rag-readme) — [sign up](https://cloud.zilliz.com/signup?utm_source=github&utm_medium=referral&utm_campaign=vector-graph-rag-readme) 👇:
|
|
264
|
+
|
|
265
|
+
```python
|
|
266
|
+
rag = VectorGraphRAG(
|
|
267
|
+
milvus_uri="https://in03-xxx.api.gcp-us-west1.zillizcloud.com",
|
|
268
|
+
milvus_token="your-api-key",
|
|
269
|
+
)
|
|
270
|
+
```
|
|
250
271
|
|
|
251
272
|
<details>
|
|
252
|
-
<summary
|
|
273
|
+
<summary>⭐ Sign up for a free Zilliz Cloud cluster</summary>
|
|
253
274
|
|
|
254
275
|
You can [sign up](https://cloud.zilliz.com/signup?utm_source=github&utm_medium=referral&utm_campaign=vector-graph-rag-readme) on Zilliz Cloud to get a free cluster and API key.
|
|
255
276
|
|
|
256
277
|

|
|
257
278
|
|
|
258
|
-
|
|
279
|
+
</details>
|
|
280
|
+
|
|
281
|
+
<details>
|
|
282
|
+
<summary>Self-hosted Milvus Server (Docker) — for advanced users</summary>
|
|
283
|
+
|
|
284
|
+
If you need a dedicated Milvus instance for multi-user or team environments, you can deploy Milvus standalone with Docker Compose. This requires Docker and some infrastructure knowledge. See the [official installation guide](https://milvus.io/docs/install_standalone-docker-compose.md) for detailed steps.
|
|
259
285
|
|
|
260
286
|
```python
|
|
261
|
-
rag = VectorGraphRAG(
|
|
262
|
-
milvus_uri="https://in03-xxx.api.gcp-us-west1.zillizcloud.com",
|
|
263
|
-
milvus_token="your-api-key",
|
|
264
|
-
)
|
|
287
|
+
rag = VectorGraphRAG(milvus_uri="http://localhost:19530")
|
|
265
288
|
```
|
|
266
289
|
|
|
267
290
|
</details>
|
|
@@ -279,6 +302,10 @@ uv run uvicorn vector_graph_rag.api.app:app --host 0.0.0.0 --port 8000
|
|
|
279
302
|
cd frontend && npm install && npm run dev
|
|
280
303
|
```
|
|
281
304
|
|
|
305
|
+
<p align="center">
|
|
306
|
+
<img src="https://github.com/user-attachments/assets/8cc8e594-aed7-4ef5-8c3b-e5ff54275b64" alt="Frontend — interactive graph visualization with 4-step retrieval" width="800">
|
|
307
|
+
</p>
|
|
308
|
+
|
|
282
309
|
| Endpoint | Method | Description |
|
|
283
310
|
|----------|--------|-------------|
|
|
284
311
|
| `/api/health` | GET | Health check |
|
|
@@ -51,6 +51,17 @@ uv add "vector-graph-rag[loaders]"
|
|
|
51
51
|
|
|
52
52
|
</details>
|
|
53
53
|
|
|
54
|
+
<details>
|
|
55
|
+
<summary><b>With local HuggingFace embedding models</b></summary>
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pip install "vector-graph-rag[hf]"
|
|
59
|
+
# or
|
|
60
|
+
uv add "vector-graph-rag[hf]"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
</details>
|
|
64
|
+
|
|
54
65
|
## 🚀 Quick Start
|
|
55
66
|
|
|
56
67
|
```python
|
|
@@ -181,30 +192,39 @@ Evaluated on three multi-hop QA benchmarks (Recall@5):
|
|
|
181
192
|
|
|
182
193
|
## 🗄️ Milvus Backend
|
|
183
194
|
|
|
184
|
-
|
|
195
|
+
Just change `milvus_uri` to switch between deployment modes:
|
|
185
196
|
|
|
186
|
-
|
|
187
|
-
|------|-------------|----------------|----------|
|
|
188
|
-
| **Milvus Lite** (default) | `./vector_graph_rag.db` | — | Personal use, dev — zero config |
|
|
189
|
-
| **Milvus Server** | `http://localhost:19530` | Optional | Multi-dataset, team environments |
|
|
190
|
-
| ⭐ **Zilliz Cloud** | `https://in03-xxx.api.gcp-us-west1.zillizcloud.com` | API key | Production, fully managed — [free tier available](https://cloud.zilliz.com/signup?utm_source=github&utm_medium=referral&utm_campaign=vector-graph-rag-readme) |
|
|
197
|
+
**Milvus Lite** (default) — zero config, single-process, data stored in a local file. Great for prototyping and small datasets:
|
|
191
198
|
|
|
192
|
-
|
|
199
|
+
```python
|
|
200
|
+
rag = VectorGraphRAG(milvus_uri="./my_graph.db") # just works
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
⭐ **Zilliz Cloud** — fully managed, [free tier available](https://cloud.zilliz.com/signup?utm_source=github&utm_medium=referral&utm_campaign=vector-graph-rag-readme) — [sign up](https://cloud.zilliz.com/signup?utm_source=github&utm_medium=referral&utm_campaign=vector-graph-rag-readme) 👇:
|
|
204
|
+
|
|
205
|
+
```python
|
|
206
|
+
rag = VectorGraphRAG(
|
|
207
|
+
milvus_uri="https://in03-xxx.api.gcp-us-west1.zillizcloud.com",
|
|
208
|
+
milvus_token="your-api-key",
|
|
209
|
+
)
|
|
210
|
+
```
|
|
193
211
|
|
|
194
212
|
<details>
|
|
195
|
-
<summary
|
|
213
|
+
<summary>⭐ Sign up for a free Zilliz Cloud cluster</summary>
|
|
196
214
|
|
|
197
215
|
You can [sign up](https://cloud.zilliz.com/signup?utm_source=github&utm_medium=referral&utm_campaign=vector-graph-rag-readme) on Zilliz Cloud to get a free cluster and API key.
|
|
198
216
|
|
|
199
217
|

|
|
200
218
|
|
|
201
|
-
|
|
219
|
+
</details>
|
|
220
|
+
|
|
221
|
+
<details>
|
|
222
|
+
<summary>Self-hosted Milvus Server (Docker) — for advanced users</summary>
|
|
223
|
+
|
|
224
|
+
If you need a dedicated Milvus instance for multi-user or team environments, you can deploy Milvus standalone with Docker Compose. This requires Docker and some infrastructure knowledge. See the [official installation guide](https://milvus.io/docs/install_standalone-docker-compose.md) for detailed steps.
|
|
202
225
|
|
|
203
226
|
```python
|
|
204
|
-
rag = VectorGraphRAG(
|
|
205
|
-
milvus_uri="https://in03-xxx.api.gcp-us-west1.zillizcloud.com",
|
|
206
|
-
milvus_token="your-api-key",
|
|
207
|
-
)
|
|
227
|
+
rag = VectorGraphRAG(milvus_uri="http://localhost:19530")
|
|
208
228
|
```
|
|
209
229
|
|
|
210
230
|
</details>
|
|
@@ -222,6 +242,10 @@ uv run uvicorn vector_graph_rag.api.app:app --host 0.0.0.0 --port 8000
|
|
|
222
242
|
cd frontend && npm install && npm run dev
|
|
223
243
|
```
|
|
224
244
|
|
|
245
|
+
<p align="center">
|
|
246
|
+
<img src="https://github.com/user-attachments/assets/8cc8e594-aed7-4ef5-8c3b-e5ff54275b64" alt="Frontend — interactive graph visualization with 4-step retrieval" width="800">
|
|
247
|
+
</p>
|
|
248
|
+
|
|
225
249
|
| Endpoint | Method | Description |
|
|
226
250
|
|----------|--------|-------------|
|
|
227
251
|
| `/api/health` | GET | Health check |
|
|
@@ -70,7 +70,7 @@ Frequently asked questions about Vector Graph RAG — covering when to use it, c
|
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
??? note "Can I use my own embeddings?"
|
|
73
|
-
Vector Graph RAG uses OpenAI embedding models by default (`text-embedding-3-large`), but you can configure the embedding model via the `embedding_model` parameter. Any model accessible through the OpenAI-compatible API will work. If you are using a local
|
|
73
|
+
Vector Graph RAG uses OpenAI embedding models by default (`text-embedding-3-large`), but you can configure the embedding model via the `embedding_model` parameter. Any model accessible through the OpenAI-compatible API will work. If you are using a local HuggingFace embedding model, install the optional dependencies with `pip install "vector-graph-rag[hf]"`. The embedding dimensionality is detected automatically. Note that all entities, relations, and passages in a single graph must use the same embedding model — mixing models within one collection prefix is not supported.
|
|
74
74
|
|
|
75
75
|
??? note "How do I deploy to production?"
|
|
76
76
|
For production deployments, use a remote Milvus instance instead of Milvus Lite for better performance, scalability, and persistence. Run the FastAPI backend behind a reverse proxy (e.g., Nginx) with appropriate rate limiting and authentication. The frontend can be built as static files and served from any CDN or static file server.
|
|
@@ -20,6 +20,12 @@
|
|
|
20
20
|
pip install "vector-graph-rag[loaders]"
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
+
=== "With local embeddings"
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install "vector-graph-rag[hf]"
|
|
27
|
+
```
|
|
28
|
+
|
|
23
29
|
!!! note "Prerequisites"
|
|
24
30
|
- Python 3.9+
|
|
25
31
|
- An OpenAI API key (set `OPENAI_API_KEY` environment variable)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "vector-graph-rag"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.4"
|
|
4
4
|
description = "A Graph RAG implementation using pure vector search with Milvus"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = { text = "MIT" }
|
|
@@ -32,8 +32,6 @@ dependencies = [
|
|
|
32
32
|
"tqdm>=4.65.0",
|
|
33
33
|
"tiktoken>=0.5.0",
|
|
34
34
|
"tenacity>=8.2.0",
|
|
35
|
-
"transformers>=4.30.0",
|
|
36
|
-
"torch>=2.0.0",
|
|
37
35
|
"langchain-core>=0.3.0",
|
|
38
36
|
"python-multipart>=0.0.22",
|
|
39
37
|
"setuptools<71", # Required for pkg_resources used by milvus-lite
|
|
@@ -49,8 +47,12 @@ api = [
|
|
|
49
47
|
"fastapi>=0.109.0",
|
|
50
48
|
"uvicorn[standard]>=0.27.0",
|
|
51
49
|
]
|
|
50
|
+
hf = [
|
|
51
|
+
"transformers>=4.30.0",
|
|
52
|
+
"torch>=2.0.0",
|
|
53
|
+
]
|
|
52
54
|
all = [
|
|
53
|
-
"vector-graph-rag[dev,api]",
|
|
55
|
+
"vector-graph-rag[dev,api,hf]",
|
|
54
56
|
]
|
|
55
57
|
loaders = [
|
|
56
58
|
"markitdown[docx,pdf]>=0.1.4",
|
|
@@ -6,19 +6,19 @@ using only vector similarity search, without requiring a separate graph database
|
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
8
|
from vector_graph_rag.config import Settings
|
|
9
|
-
from vector_graph_rag.models import Document, Triplet, Entity, Relation, Passage
|
|
10
|
-
from vector_graph_rag.llm.extractor import TripletExtractor
|
|
11
|
-
from vector_graph_rag.storage.embeddings import EmbeddingModel
|
|
12
|
-
from vector_graph_rag.storage.milvus import MilvusStore
|
|
13
9
|
from vector_graph_rag.graph.builder import GraphBuilder
|
|
14
|
-
from vector_graph_rag.graph.retriever import GraphRetriever
|
|
15
|
-
from vector_graph_rag.graph.knowledge_graph import SubGraph
|
|
16
10
|
from vector_graph_rag.graph.graph import Graph
|
|
11
|
+
from vector_graph_rag.graph.knowledge_graph import SubGraph
|
|
12
|
+
from vector_graph_rag.graph.retriever import GraphRetriever
|
|
13
|
+
from vector_graph_rag.llm.cache import LLMCache, get_llm_cache
|
|
14
|
+
from vector_graph_rag.llm.extractor import TripletExtractor
|
|
17
15
|
from vector_graph_rag.llm.reranker import LLMReranker
|
|
16
|
+
from vector_graph_rag.models import Document, Entity, Passage, Relation, Triplet
|
|
18
17
|
from vector_graph_rag.rag import VectorGraphRAG, create_rag
|
|
19
|
-
from vector_graph_rag.
|
|
18
|
+
from vector_graph_rag.storage.embeddings import EmbeddingModel
|
|
19
|
+
from vector_graph_rag.storage.milvus import MilvusStore
|
|
20
20
|
|
|
21
|
-
__version__ = "0.1.
|
|
21
|
+
__version__ = "0.1.4"
|
|
22
22
|
|
|
23
23
|
__all__ = [
|
|
24
24
|
"Settings",
|