N8N Tools - GraphRAG
Actions9
Overview
The "Graph Construction - Build" operation of the GraphRAG tool is designed to build knowledge graphs from input document text or data. It processes textual data by chunking it, optionally enhancing analysis with Large Language Models (LLMs), and storing the resulting graph and vector embeddings in configurable vector and graph databases. This node is useful for scenarios where users want to transform unstructured documents into structured knowledge graphs for advanced querying, semantic search, or AI-driven insights.
Practical examples include:
- Building a knowledge graph from company documents to enable relationship exploration.
- Creating a graph-based index of research papers for semantic search.
- Integrating with external vector and graph databases to scale knowledge graph storage and retrieval.
- Enhancing graph construction with LLMs for deeper entity extraction and relationship inference.
Properties
| Name | Meaning |
|---|---|
| Input Data | Document text or data to process into a knowledge graph. |
| Additional Options | Collection of options including: • 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 between text chunks. |
| Database Configuration | Configure external vector and graph databases: • Vector Database: Choose provider (Local FAISS/ChromaDB, Pinecone, Weaviate, Qdrant, Milvus). • Vector DB Connection URL & API Key: For external vector DB authentication. • Graph Database: Choose provider (Local NetworkX, Neo4j, ArangoDB, Amazon Neptune). • Graph DB Connection URL, Username, Password, Database Name: For external graph DB authentication. • AWS Access Key ID, Secret Access Key, Region: For Amazon Neptune access. |
| 🤖 LLM Enhancement | Configure Large Language Model enhancement: • Enable LLM Enhancement: Toggle LLM-powered analysis. • LLM Provider: Select provider (N8N Tools internal, OpenAI, Anthropic). • LLM Model: Specific model selection depending on provider. |
Output
The node outputs a JSON object containing the response from the GraphRAG API after building the knowledge graph. The structure typically includes details about the created graph, status messages, and any metadata returned by the service.
If enabled, the output may also reflect enhanced analysis results powered by LLMs.
No binary data output is indicated.
Dependencies
- Requires an API key credential for the GraphRAG service (
n8nToolsApi). - Optional integration with external vector databases (e.g., Pinecone, Weaviate) requiring connection URLs and API keys.
- Optional integration with external graph databases (e.g., Neo4j, ArangoDB, Amazon Neptune) requiring connection credentials.
- Optional AWS credentials if using Amazon Neptune.
- Optional configuration for LLM providers which may require additional API keys or tokens (not detailed here).
Troubleshooting
- Authentication errors: Ensure that all required API keys and credentials for the GraphRAG service and any external databases are correctly configured.
- Connection failures: Verify that the connection URLs for vector and graph databases are reachable and correct.
- Invalid input data: Confirm that the input document text is properly formatted and not empty.
- Exceeded limits: Adjust "Result Limit" or chunk sizes if processing large documents causes timeouts or incomplete results.
- LLM configuration issues: If enabling LLM enhancement, ensure the selected provider and model are supported and credentials are valid.
- Error messages from API: The node throws errors prefixed with "GraphRAG Tool error:" followed by the message from the API. Review the message for specific issues such as invalid parameters or service downtime.
Links and References
- GraphRAG API Documentation (hypothetical link based on API endpoint)
- Vector database providers documentation: Pinecone, Weaviate, Qdrant, Milvus official sites.
- Graph database providers documentation: Neo4j, ArangoDB, Amazon Neptune official sites.
- n8n documentation on credential management and HTTP request nodes for configuring API keys and connections.
- Large Language Model providers: OpenAI GPT models, Anthropic Claude models official docs.