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

The "Extract Entities" operation of the Document Processing resource in this node is designed to analyze input text or document data and extract named entities from it. Named entities typically include people, organizations, locations, dates, and other significant terms that are identifiable within unstructured text.

This node is beneficial in scenarios where automated extraction of structured information from large volumes of text is needed, such as:

  • Extracting key information from customer feedback or support tickets.
  • Identifying important entities in legal or financial documents.
  • Preparing data for knowledge graph construction or further semantic analysis.
  • Enhancing search and retrieval by tagging documents with extracted entities.

For example, given a paragraph describing a business meeting, the node can extract names of participants, company names, dates, and locations mentioned, enabling downstream workflows to act on these entities.

Properties

Name Meaning
Input Data The raw document text or data string to be processed for entity extraction.
Additional Options Collection of optional parameters to customize processing:
- Language: Language of the input text (English, Portuguese, Spanish, French).
- Result Limit: Max number of entities to return.
- Chunk Size: Size of text chunks for processing.
- Chunk Overlap: Overlap size between chunks to maintain context.
Database Configuration Settings to connect to external vector and graph databases for storing or querying extracted data:
- Vector database provider (local or cloud services like Pinecone, Weaviate, Qdrant, Milvus).
- Connection URLs and API keys for vector DB.
- Graph database provider (local or Neo4j, ArangoDB, Amazon Neptune).
- Connection details and credentials for graph DB.
- AWS credentials and region if using Amazon Neptune.
🤖 LLM Enhancement Optional Large Language Model (LLM) powered enhancement for deeper analysis:
- Enable/disable LLM enhancement.
- Select LLM provider (internal service, OpenAI, Anthropic).
- Choose specific LLM model when using internal provider.

Output

The node outputs a JSON object containing the results returned by the external GraphRAG API after processing the input text. This typically includes:

  • Extracted named entities with their types and possibly confidence scores.
  • Metadata about the processing such as language used, chunking info, or limits applied.
  • If LLM enhancement is enabled, additional insights or refined entity extraction results may be included.

The output is structured as a single JSON object per execution, accessible via the json property of the output item.

No binary data output is produced by this operation.

Dependencies

  • Requires an API key credential for the external GraphRAG service (n8nToolsApi), which handles the actual processing.
  • Optional configuration for connecting to external vector and graph databases, which may require URLs, API keys, usernames, passwords, and AWS credentials depending on the chosen providers.
  • Optional integration with Large Language Models (LLMs) from various providers, which may require additional API keys or tokens configured outside this node.

Troubleshooting

  • Common issues:

    • Missing or invalid API key for the GraphRAG service will cause authentication failures.
    • Incorrect or incomplete database connection details can prevent storing or retrieving data from vector or graph databases.
    • Exceeding result limits or providing very large input data without appropriate chunking settings may lead to timeouts or partial results.
    • Enabling LLM enhancement without proper provider credentials or network access may cause errors.
  • Error messages:

    • "GraphRAG Tool error: <message>" indicates an issue reported by the external API or during request execution.
    • Authentication errors suggest checking the API key credential.
    • Connection errors to databases indicate verifying URLs, credentials, and network accessibility.
    • Validation errors on input properties suggest reviewing the provided parameters for correctness.

To resolve errors, ensure all required credentials and configurations are correctly set, input data is valid and appropriately sized, and network connectivity to external services is available.

Links and References

Discussion