Practical overview
When it fits
Use it when developing a Python RAG application that should retrieve context from Neo4j, or when building a Neo4j knowledge graph from text or PDF sources.
Who it is for
- Python developers building generative AI applications grounded in Neo4j graph data.
- Teams that need to construct knowledge graphs from text or PDF documents.
Documented uses
- Retrieve relevant graph context for a generative AI application.
- Build question-answering applications grounded in a Neo4j graph.
- Construct a knowledge graph from text or PDFs using a customizable or streamlined pipeline.
Requirements & limits
- A running Neo4j instance and connection details are needed for the documented examples.
- RAG and the knowledge-graph builder pipeline require at least one LLM provider integration.
- Graph construction requires APOC core installed in Neo4j.
- The
Pipelineoffers more customization;SimpleKGPipelineprovides a more streamlined abstraction. - The optional spaCy-based NLP features are not supported on Python 3.14.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install the Neo4j GraphRAG Python package
Set up the library in an isolated Python environment using the documented pip installation.
Before you start
- Python 3.10–3.14
- An activated virtual environment
Steps
Activate a Python virtual environment.
Run the command below.
pip install neo4j-graphrag
Expected outcome
The Neo4j GraphRAG package is installed in the active environment.
Guide limitations
- Installation alone does not configure a Neo4j connection or an LLM provider.
- At least one LLM provider dependency is required for RAG and the knowledge-graph builder pipeline.
Prepare a knowledge-graph construction example
Configure the documented example’s Neo4j and OpenAI prerequisites before running it.
Before you start
- A running Neo4j instance
- Neo4j URI, username, and password
- An OpenAI API key
- The APOC core library installed in the Neo4j instance
- The package and the example's required dependencies
Steps
Set the example's
NEO4J_URI,NEO4J_USERNAME, andNEO4J_PASSWORDvalues to match the Neo4j instance.Export the OpenAI key as
OPENAI_API_KEY.Choose the documented
Pipelinefor customization orSimpleKGPipelinefor a more streamlined construction workflow.
Expected outcome
The documented prerequisites and pipeline choice are prepared for constructing a graph from text or PDFs.
Guide limitations
- The knowledge-graph construction feature requires APOC core.
- The experimental namespace is not recommended for production use.
Compare options for Retrieval-augmented applications
These projects document a common task and share a project role. This is a source-based comparison, not an execution benchmark or a guarantee of interchangeability.
| Project | Documented purpose | Platform | Access and requirements |
|---|---|---|---|
| Neo4J Graphrag Python | Retrieve relevant graph context for a generative AI application. | Server | |
| Langsearch | Crawl website or local data for a knowledge base. | CLI, Self-hosted, Server | |
| Hybrid Search Rag | Combine document retrieval and language-model generation in a configurable workflow. |
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 October 2026
- Original website title
- neo4j/neo4j-graphrag-python · Official homepage title · retained in its source language

