LightRAG Tool icon

LightRAG Tool

LightRAG knowledge-graph retrieval as an AI Agent tool

LightRAG Tool

AI-generated

Summary

Retrieve context from a LightRAG knowledge graph database by submitting a plain-text query string. Use embeddings and optional reranker inputs to perform hybrid vector, full-text, and knowledge graph entity retrieval according to the selected mode.

Inputs

  • Tool Description (required) — Description of the tool explaining its purpose to the LLM for invocation guidance.
  • Database Name or ID (required) — The LightRAG database name or ID to query, selectable from the connected CosmosDB instance.
  • Workspace Override — Optional workspace namespace to override the default workspace set in credentials.
  • Retrieval Mode (required) — Specifies the retrieval strategy: hybridKG (hybrid chunk + knowledge graph), hybrid (hybrid vector and full-text chunks), mix (entity vector + graph context), naive (vector chunks only), or entity (entity vectors only).
  • Top K Entities (required) — Number of top matching entities to retrieve from the knowledge graph.
  • Top K Chunks (required) — Number of top matching text chunks to retrieve.

Output shape

A single item containing a JSON object with 'entities', 'relations', and 'chunks' arrays summarizing retrieved knowledge graph entities, relations, and text chunks.

The output includes arrays of entities (name, type, description), relations (source, target, description, weight), and chunks (document ID, chunk index, content, chunk document). The query input must be provided via the incoming item property 'input'. Embeddings input is required; reranker input is optional and used to reorder results.

Links

Discussion