Skip to main content
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

  1. Install the Langtrace’s SDK and initialize the SDK in your code.
  1. Install the Neo4j driver and the Neo4j GraphRAG library.
  1. Setup environment variables:

Usage

Initialize Langtrace before creating your Phidata agent:
Python
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: traces traces

Resources