Hey fellow developers! 👋
We’ve just rolled out version 0.4.0 of GraphRAG-SDK, and I’m excited to share what’s new.
If you’ve been wrestling with graph structures in your LLM-powered apps, this might be right up your alley.
What’s GraphRAG-SDK?
It’s our open-source toolkit designed to simplify building RAG (Retrieval-Augmented Generation) applications using graph databases. We created it after noticing many developers struggling to effectively use graph structures in their LLM projects.
What’s New in 0.4.0?
- Multi-LLM Support: Now works with OpenAI, Anthropic, and Cohere
- Smarter Queries: Improved query planning for more efficient graph traversals
- RAG Utilities: New functions to streamline common RAG operations
- Better Docs: Enhanced documentation and examples to get you up and running quickly
How It Works
GraphRAG-SDK breaks down the RAG process into three main steps:
- Creating Ontologies: Automate or manually define your data structure
- Building Knowledge Graphs: Construct, query, and manage graphs optimized for retrieval
- Querying Your Graph RAG: Interact with your knowledge graph using natural language
Here’s a quick example of how you might use it:
# Set up your knowledge graph
kg = KnowledgeGraph(
name="movie_kg",
model_config=KnowledgeGraphModelConfig.with_model(model),
ontology=ontology,
host="127.0.0.1",
port=6379
)
# Process your data sources
kg.process_sources(sources)
# Start a chat session
chat = kg.chat_session()
response = chat.send_message("Who directed The Matrix?")
print(response)
Why GraphRAG-SDK?
It lets you focus on your application logic rather than getting bogged down in the details of graph operations or LLM interactions. Whether you’re building a movie recommendation system or a complex knowledge base, GraphRAG-SDK aims to make the process smoother.
If you’re curious about how this could fit into your project or just want to chat about RAG systems and graph databases, feel free to check out the GitHub repo or join our Discord. We’re always happy to geek out about this stuff!
What are your thoughts on using graph structures for RAG applications? Any cool projects you’re working on where this might be useful?