
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
End-to-end GraphRAG toolkit that takes you from raw documents to a knowledge graph and then to retrieval-augmented generation (RAG) with large language models.
👉 Use the GraphRAG Accelerator
👉 Read the docs
👉 GraphRAG Arxiv
dgraphrag
是一个端到端 GraphRAG 工具包,帮助开发者从原始文本到知识图,再到 LLM 检索增强生成,串联完整流程并提供可插拔组件。
本项目由 eust-w 发起,由 D-Robotics(https://d-robotics.cc/)开源。
要了解 GraphRAG 如何从非结构化数据中构建知识图并增强 LLM,请参考官方文档。
pip install dgraphrag[neo4j,openai] # 典型组合
dgrag ingest docs/ # 构建图
dgrag ask "What is GraphRAG?" # 提问
详细教程见 docs/quickstart.md。
本仓库提供一个最小可行实现(MVP),方便你快速试用 GraphRAG 思路。请注意,默认索引构建与 LLM API 调用可能产生成本,使用前请理解相应流程及费用。
⚠️ Warning:
dgrag index
可能在大规模数据时耗费较多资源,请先评估数据量与预算。
使用你自己的数据与 LLM 时,参考提示工程指南 来微调或构建高质量 prompt。
版本遵循 语义化版本 (SemVer)。重大变更请查看 CHANGELOG.md。
使用前请始终运行:
dgrag info # 检查当前索引版本与配置格式
详见 RAI_TRANSPARENCY.md,其中解答了:
本项目可能包含第三方商标或徽标,其所有权归原持有人所有。本仓库仅出于学术与工程示范目的使用,不代表对这些商标或徽标的任何认可。
dgraphrag 不会在本地以外收集或存储任何用户数据;所有内容均在你的控制下处理。请在提交敏感数据前自行评估风险。
pip install dgraphrag[arangodb,tigergraph,vector]
# 或者开发模式
pip install -e .[arangodb,tigergraph,vector]
from pathlib import Path
from dgraphrag import (
LocalTextLoader,
SimpleParagraphSplitter,
RegexExtractor,
InMemoryGraphAdapter,
SimpleGraphBuilder,
BasicGraphRetriever,
)
# create a small demo file
Path("demo.txt").write_text("GraphRAG is RetrievalAugmentedGeneration.\n\nRetrievalAugmentedGeneration is Powerful.")
loader = LocalTextLoader()
text = loader.load("demo.txt")
paragraphs = SimpleParagraphSplitter().split(text)
triples = RegexExtractor().extract(paragraphs)
adapter = InMemoryGraphAdapter()
SimpleGraphBuilder(adapter).build(triples)
retriever = BasicGraphRetriever(adapter)
print(retriever.answer("What is GraphRAG?"))
FAQs
End-to-end GraphRAG toolkit that takes you from raw documents to a knowledge graph and then to retrieval-augmented generation (RAG) with large language models.
We found that dgraphrag demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.