Repolode
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