LightRAG icon

LightRAG

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

Graph Stats

AI-generated

Summary

Return statistics about the number of entities, relations, chunks, and documents stored in a LightRAG knowledge graph for a specified MongoDB database and workspace.

Inputs

  • Database Name or ID (required) — Select the MongoDB database housing the LightRAG collections for which to retrieve statistics.
  • Workspace Override — Optionally override the default workspace defined in the credential; useful for targeting different knowledge bases.

Output shape

a single JSON object containing counts of entities, relations, chunks, and documents for the workspace in the given database.

Returns the counts as fields 'entities', 'relations', 'chunks', and 'documents' along with the specified database and workspace names. No pagination or additional metadata is present.

Examples

Example 1: Get current counts of graph elements in the 'company_kg' database and default workspace.

Set operation to 'Graph Stats', select 'company_kg' as Database Name or ID, and optionally specify a Workspace Override if needed.

Links

Discussion