Delete Document
AI-generatedSummary
Delete all entities, relations, chunks, and document status entries associated with a specified document ID from a LightRAG knowledge graph stored in a selected MongoDB database.
Inputs
- Database Name or ID (required) — Select the MongoDB database containing the LightRAG collections or specify its name via expression.
- Document ID (required) — The identifier of the document to remove from the knowledge graph.
- Workspace Override — Optionally override the workspace specified in the credentials, allowing routing deletions to different knowledge bases.
Output shape
a single record indicating counts of deleted entities, relations, and chunks, along with database, document ID, and workspace info.
The operation deletes all knowledge graph data related to the specified document ID, including entities, relations, chunks, and document status records, within the specified database and workspace context.
Examples
Example 1: Delete a document's knowledge graph data
Set 'Database Name or ID' to the target database, enter the document's ID in 'Document ID', and optionally set 'Workspace Override' if needed. Running executes deletion of all related entities, relations, chunks, and status records from LightRAG collections in the database.