Web app that uses LLMs and LangChain to turn PDFs, docs, videos and web pages into a knowledge graph stored in Neo4j.
neo4j/neo4j-graphrag-python
Official first-party Python package for building GraphRAG applications that combine Neo4j graph databases with LLMs and vector search.
- Stars
- 1,316
- Forks
- 257
- Open issues
- 44
- Last commit
- 6 hours ago
What is it?
neo4j-graphrag is the official Python library from Neo4j for graph retrieval augmented generation (GraphRAG). It lets developers build knowledge graphs from unstructured text and PDFs using an LLM, store them in Neo4j, and then answer questions by retrieving relevant nodes and relationships from the graph alongside vector search results.
The package includes a Pipeline class for customizable knowledge graph construction and a SimpleKGPipeline wrapper for a more streamlined setup. It also provides retrievers for vector, hybrid and graph-traversal search, a Text2CypherRetriever that generates Cypher queries, and helpers for creating and populating Neo4j vector indexes. Knowledge graph construction requires the APOC core library installed in the Neo4j instance.
LLM and embedding providers are installed as optional extras, including OpenAI, Azure OpenAI, Anthropic, Google Gemini, Vertex AI, Cohere, Mistral, Amazon Bedrock and Ollama, with sentence-transformers supported for local embeddings. External vector stores Weaviate, Pinecone and Qdrant can also be used with retrievers. The package supports Python 3.10 through 3.14.
Key features
- 01Builds knowledge graphs from text and PDFs with an LLM and stores them in Neo4j.
- 02Provides vector, hybrid, graph-traversal and Text2Cypher retrievers.
- 03Includes helpers for creating and populating Neo4j vector indexes.
- 04Supports OpenAI, Anthropic, Gemini, Cohere, Mistral, Bedrock and Ollama LLMs.
- 05Can use external vector stores such as Weaviate, Pinecone and Qdrant.
Use cases
- Turning a corpus of documents into a queryable knowledge graph in Neo4j.
- Adding graph context to a vector-search RAG chatbot.
- Letting users ask natural-language questions answered by Cypher queries over existing graph data.
Topics
FAQ
- What is neo4j-graphrag-python?
- Official first-party Python package for building GraphRAG applications that combine Neo4j graph databases with LLMs and vector search. neo4j-graphrag is the official Python library from Neo4j for graph retrieval augmented generation (GraphRAG). It lets developers build knowledge graphs from unstructured text and PDFs using an LLM, store them in Neo4j, and then answer questions by retrieving relevant nodes and relationships from the graph alongside vector search results.
- Is neo4j-graphrag-python free to use? What license does it have?
- neo4j-graphrag-python is open source under the Other license. Check the license terms before using it in commercial products.
- Is neo4j-graphrag-python still maintained?
- Actively maintained. The last commit to neo4j-graphrag-python was on Oct 22, 2026.
- What can I use neo4j-graphrag-python for?
- Turning a corpus of documents into a queryable knowledge graph in Neo4j. Adding graph context to a vector-search RAG chatbot. Letting users ask natural-language questions answered by Cypher queries over existing graph data.
- Where can I get neo4j-graphrag-python?
- The source code and installation instructions are on GitHub: https://github.com/neo4j/neo4j-graphrag-python
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A graph-native memory system for AI agents that stores conversations, builds knowledge graphs and records reasoning, backed by Neo4j.
Neo4j is a graph database that stores data as nodes and relationships and is queried with the Cypher language.
A graph database that stores adjacency as sparse matrices and queries with OpenCypher, aimed at knowledge graphs for LLM and GraphRAG workloads.
Open-source AI memory platform that turns documents, code and conversations into a self-hosted knowledge graph for AI agents.
A lightweight knowledge-graph RAG framework and server that indexes documents into entities and relations for retrieval-augmented LLM answers.