N8N Tools - GraphRAG
Actions9
Overview
The "Hybrid Search" operation of the GraphRAG tool performs a hybrid search combining vector-based semantic search and graph database querying. It processes input document text or data along with a user query to retrieve relevant information by leveraging both vector similarity and knowledge graph relationships.
This node is beneficial in scenarios where you want to perform advanced searches that combine semantic understanding (via vector embeddings) with structured graph queries, such as:
- Searching large document collections with contextual relevance.
- Querying knowledge graphs enriched with vector embeddings for better recall.
- Enhancing search results with graph-based relationships and metadata.
- Use cases in research, customer support, or any domain requiring deep semantic and relational search.
For example, you could input a set of documents describing products and ask a complex question about product features, retrieving answers that consider both textual similarity and graph connections between entities.
Properties
| Name | Meaning |
|---|---|
| Input Data | Document text or data to process. This is the main content on which the hybrid search operates. |
| Query | Query or question for the GraphRAG system to answer or search against the processed data. |
| Additional Options | Collection of optional parameters: - Language: Processing language (English, Portuguese, Spanish, French). - Result Limit: Maximum number of results to return. - Chunk Size: Size of text chunks for processing. - Chunk Overlap: Overlap size between text chunks. |
| Database Configuration | Configure external databases used in the hybrid search: - Vector Database: Select provider (Local FAISS/ChromaDB, Pinecone, Weaviate, Qdrant, Milvus). - Vector DB Connection URL: URL for external vector DB. - Vector DB API Key: API key for authentication. - Graph Database: Select provider (Local NetworkX, Neo4j, ArangoDB, Amazon Neptune). - Graph DB Connection URL: URL for external graph DB. - Graph DB Username/Password: Credentials for graph DB. - Graph DB Database Name: Specific database or collection name. - AWS Access Key ID/Secret Access Key/Region: For Amazon Neptune authentication and region configuration. |
| 🤖 LLM Enhancement | Configure Large Language Model enhancement: - Enable LLM Enhancement: Enable deeper analysis using an LLM. - LLM Provider: Choose provider (N8N Tools internal, OpenAI, Anthropic). - LLM Model: Select specific model depending on provider (e.g., GPT-4o Mini, Claude Haiku). |
Output
The node outputs a JSON object containing the response from the GraphRAG API. The structure depends on the API's returned data but generally includes:
- Search results combining vector similarity and graph query matches.
- Possibly enriched insights if LLM enhancement is enabled.
- Metadata about the search such as result counts or processing details.
If the node encounters an error, the output JSON will contain an error field with the error message.
The node does not output binary data.
Dependencies
- Requires an API key credential for the GraphRAG service (
n8nToolsApi). - Optionally requires credentials and connection details for external vector databases (Pinecone, Weaviate, Qdrant, Milvus) and graph databases (Neo4j, ArangoDB, Amazon Neptune).
- If LLM enhancement is enabled, it may require additional API keys or tokens depending on the selected LLM provider.
- The node makes HTTP POST requests to the GraphRAG API endpoint at
https://graphrag.n8ntools.io/api/v1/graphrag.
Troubleshooting
Common issues:
- Missing or invalid API key for the GraphRAG service will cause authentication errors.
- Incorrect or incomplete database connection details can lead to connection failures.
- Exceeding rate limits or quota on external services (vector DB, graph DB, LLM providers) may cause request failures.
- Improperly formatted input data or queries might result in no results or errors.
Error messages:
"GraphRAG Tool error: <message>": General error from the API or node execution. Check the message for specifics.- Authentication errors indicate missing or wrong API keys.
- Connection errors suggest misconfigured URLs or credentials for vector or graph databases.
Resolution tips:
- Verify all API keys and credentials are correctly configured in n8n.
- Ensure external database URLs and credentials are reachable and valid.
- Validate input data format and query syntax.
- Enable "Continue On Fail" option in the node to handle errors gracefully during workflow runs.
Links and References
- GraphRAG API Documentation (hypothetical link)
- Vector Databases:
- Graph Databases:
- Large Language Models: