N8N Tools - GraphRAG icon

N8N Tools - GraphRAG

AI Tool for GraphRAG operations: document processing, knowledge graphs, vector search, and intelligent analysis. Can be used by AI agents.

Actions9

Overview

This node implements the "Chunk" operation under the "Document Processing" resource of the GraphRAG AI tool. It is designed to split large documents or text data into smaller, manageable chunks for further processing such as indexing, embedding, or analysis. This chunking facilitates efficient handling of lengthy texts by downstream AI models or databases.

Common scenarios where this node is beneficial include:

  • Preparing large documents for semantic search by breaking them into overlapping chunks.
  • Preprocessing text data before feeding it into vector databases or knowledge graphs.
  • Segmenting content for more granular natural language processing tasks.

For example, a user might input a long article and configure chunk size and overlap to create text segments that preserve context between chunks, enabling better semantic understanding in subsequent steps.

Properties

Name Meaning
Input Data The raw document text or data string to be processed and chunked.
Additional Options Collection of optional parameters:
- Language: Language of the input text (English, Portuguese, Spanish, French).
- Result Limit: Max number of results to return.
- Chunk Size: Size of each text chunk.
- Chunk Overlap: Number of characters overlapping between consecutive chunks.
Database Configuration Settings to connect to external vector and graph databases:
- Vector Database provider (Local FAISS/ChromaDB, Pinecone, Weaviate, Qdrant, Milvus).
- Connection URL and API key for vector DBs.
- Graph Database provider (Local NetworkX, Neo4j, ArangoDB, Amazon Neptune).
- Connection details and credentials for graph DBs.
🤖 LLM Enhancement Optional configuration to enable Large Language Model powered enhancement:
- Enable/disable LLM enhancement.
- Select LLM provider (N8N Tools internal, OpenAI, Anthropic).
- Choose specific LLM model if using N8N Tools provider.

Output

The node outputs a JSON object containing the result from the GraphRAG API after performing the chunking operation. This typically includes the generated text chunks along with metadata such as chunk positions or identifiers.

If enabled, the output may also contain enhanced analysis results powered by an LLM.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for the GraphRAG service (n8nToolsApi).
  • Optionally requires credentials and connection details for external vector and graph databases if configured.
  • If LLM enhancement is enabled, access to the selected LLM provider's API is necessary (e.g., OpenAI or Anthropic), which may require additional API keys or tokens configured outside this node.

Troubleshooting

  • API Key Errors: If the node fails due to authentication errors, verify that the provided API key credential for the GraphRAG service is valid and has appropriate permissions.
  • Connection Issues: When using external vector or graph databases, ensure the connection URLs and credentials are correct and that the services are reachable from the n8n environment.
  • Invalid Input Data: Empty or malformed input text may cause the chunking process to fail or return empty results. Ensure the "Input Data" property contains valid textual content.
  • LLM Configuration Problems: Enabling LLM enhancement without proper API access or misconfigured provider/model options can lead to errors. Double-check LLM settings and credentials.
  • Error Messages: The node throws errors prefixed with "GraphRAG Tool error:" followed by the specific message. Use these messages to identify issues such as invalid parameters or network problems.

Links and References

Discussion