neo4j-graphrag-skill

Build GraphRAG retrieval pipelines on Neo4j using the neo4j-graphrag Python package.

Updated Aug 25, 2026
One-click install
npx skills add https://github.com/cardox6/steuer-graph --skill neo4j-graphrag-skill-cardox6
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: neo4j-graphrag-skill
Source: https://github.com/cardox6/steuer-graph/tree/main/.agents/skills/neo4j-graphrag-skill
Command: npx skills add https://github.com/cardox6/steuer-graph --skill neo4j-graphrag-skill-cardox6

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires neo4j-graphrag, neo4j, and includes references (resource) components.

What problem does it solve? Building retrieval-augmented generation over a Neo4j knowledge graph requires choosing the right retriever, writing retrieval_query Cypher fragments, wiring embedders and LLMs, and managing indexes — this Skill provides the correct patterns and API usage for the neo4j-graphrag Python package so you avoid common misconfigurations. ## Core Features & Use Cases - Retriever Selection Guidance: Decision logic for VectorRetriever, HybridRetriever, VectorCypherRetriever, HybridCypherRetriever, Text2CypherRetriever, ToolsRetriever, and external vector DB retrievers (Weaviate, Pinecone, Qdrant). - Pipeline Wiring: Complete patterns for GraphRAG(retriever, llm) with prompt templates, message history, filters, query_params, return_context, and token usage tracking across OpenAI, Anthropic, VertexAI, Bedrock, Cohere, Mistral, and Ollama. - Index & Error Reference: Vector/fulltext index creation, schema inspection, and a table of common errors (missing score in RETURN, index not ONLINE, dimension mismatch) with fixes. - Use Case: You have Chunk nodes with embeddings in Neo4j and want a question-answering pipeline that traverses from matched chunks to related articles and organizations — use HybridCypherRetriever with a retrieval_query and GraphRAG.search(). ## Quick Start Ask the assistant to build a GraphRAG pipeline over your Neo4j database using HybridCypherRetriever with an OpenAI embedder and a retrieval_query that traverses from matched chunks to related entities.

Frequently Asked Questions about neo4j-graphrag-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a GraphRAG pipeline with Neo4j in Python?▼

Install neo4j-graphrag, create a vector index on your Chunk nodes, instantiate a retriever such as HybridCypherRetriever with an embedder, and pass it with an LLM to GraphRAG. Call rag.search(query_text=..., retriever_config={"top_k": 5}) to get answers.

VectorRetriever vs HybridCypherRetriever — which should I use?▼

Use VectorRetriever for baseline semantic search without graph traversal. Use HybridCypherRetriever when you have both vector and fulltext indexes and need graph expansion after lookup — it is the recommended default for production GraphRAG.

Does neo4j-graphrag support Anthropic or local Ollama models?▼

Yes. The package includes AnthropicLLM, OllamaLLM, OpenAILLM, VertexAILLM, BedrockLLM, CohereLLM, and MistralAILLM, all supporting sync and async invocation. Ollama runs locally without an API key.

Why does my retrieval_query return a KeyError for score?▼

The retrieval_query Cypher fragment must include score in its RETURN clause, and you must not re-declare score since it is auto-injected along with node. Add score to the RETURN statement to fix the error.

Can I use vectors stored in Pinecone or Weaviate with Neo4j GraphRAG?▼

Yes. WeaviateNeo4jRetriever, PineconeNeo4jRetriever, and QdrantNeo4jRetriever map external vector store IDs to Neo4j node IDs and run a retrieval_query for graph context. Install the matching extra such as neo4j-graphrag[pinecone].

When should I not use the neo4j-graphrag retrievers?▼

Use a different approach for KG construction from documents (SimpleKGPipeline/document import), plain vector search without graph traversal, GDS algorithms like PageRank, or agent long-term memory — those are covered by separate Neo4j skills.