LightRAG icon

LightRAG

Index documents into a LightRAG Knowledge Graph (entity + relation extraction) stored in CosmosDB vCore, and run hybrid KG + vector queries.

Insert Text

AI-generated

Summary

Chunk input text by headers, extract entities and relationships using an LLM, embed the chunks and indexed data, and insert them into the specified MongoDB LightRAG knowledge graph database for indexing and retrieval.

Inputs

  • Database Name or ID (required) — Select the MongoDB database where LightRAG collections exist or provide a database name expression.
  • Text (required) — The markdown-supported document text to index; long texts are chunked by headers.
  • Document ID — Optional unique identifier for the document; if omitted, it is auto-generated from the content hash. Used for updating or deleting the document later.
  • Workspace Override — Optional override for the workspace from credentials to route to a specific knowledge base.
  • Enable Gleaning — If true, runs a second LLM pass to extract entities missed in the first extraction, improving accuracy but doubling token usage.
  • Batch Processing — Options to control batch size and delay between batches for rate limiting concurrent LLM and embedding calls.

Output shape

a list of JSON objects, each representing a processed document with fields including the document ID, workspace, counts of inserted chunks, extracted entities, extracted relations, and status 'INDEXED'.

Output corresponds to each input item and includes the processing results. Documents are chunked internally based on headers; each chunk is processed for entity and relation extraction and embedding. The operation requires connected LLM and embedding nodes for extraction and vectorization. If batch processing options are set, documents are processed in batches with optional delay for rate limiting.

Links

Discussion