Python library for building graph retrieval-augmented generation apps on Neo4j. Supports knowledge-graph construction, vector indexes, and multiple retriever types.
Overview
Neo4j GraphRAG for Python is the first-party library for building graph retrieval augmented generation applications with Neo4j and Python. It targets developers who want a maintained integration between generative AI workflows and a Neo4j graph database.
The package supports knowledge graph construction through customizable pipelines or a simplified knowledge-graph pipeline abstraction, including ingestion from text and PDFs. APOC core must be present on the Neo4j instance for some graph-building features. Users can create and populate vector indexes, run similarity search via retrievers such as VectorRetriever, and combine vector search with graph traversal or hybrid retrieval patterns.
Optional pip extras connect to several LLM and embedding providers, external vector stores including Weaviate, Pinecone, and Qdrant, and experimental knowledge-graph builder components with NLP and fuzzy matching helpers. Examples assume a running Neo4j instance with connection credentials supplied in code.
Install from PyPI or conda-forge into a virtual or Conda environment. Documentation and blog posts walk through populated graphs, retriever usage, and enrichment of vector search with graph operations. An experimental namespace holds features intended for evaluation rather than production.
Key features
- Graph RAG application building on Neo4j
- Knowledge graph construction pipelines
- SimpleKGPipeline for streamlined graph builds
- Vector index creation and similarity search
- Multiple retriever types beyond vector search
- Hybrid retrieval and graph traversal patterns
- Optional LLM and embedding provider extras
- External vector store integrations
Use cases
- Question answering over a knowledge graph
- Enriching vector search with graph context
- Building graphs from text or PDFs
- Retriever workflows on existing Neo4j data
- Hybrid RAG over vector and graph stores