Neo4j GraphRAG
Learn how to use Langtrace with Neo4j GraphRAG for Retrieval Augmented Generation with knowledge graphs
Neo4j GraphRAG enables developers to build graph retrieval augmented generation (GraphRAG) applications using the power of Neo4j and Python. As a first-party library, it offers a robust, feature-rich, and high-performance solution, with the added assurance of long-term support and maintenance directly from Neo4j.
Here’s how to use it with Langtrace:
Setup
- Install the Langtrace’s SDK and initialize the SDK in your code.
- Install the Neo4j driver and the Neo4j GraphRAG library.
- Setup environment variables:
Usage
Initialize Langtrace before creating your Phidata agent:
Create and run the RAG pipeline:
What’s being traced?
With Langtrace, the following operations are automatically traced:
Knowledge Graph Building: -Document ingestion and processing -Entity extraction and relationship creation -Vector embedding generation
Search and Retrieval:
- Vector similarity search operations
- Subgraph extraction for context
- Retrieved document chunks
LLM Generation:
- Prompt construction with retrieved context
- Model completion generation
- Response processing
View all these trace details in the Langtrace dashboard: