Corpus Command¶
The corpus command allows you to inspect, evaluate, and monitor your knowledge base.
Usage¶
Subcommands¶
stats¶
Get statistics about the corpus (document counts, entity counts, etc.).
Options:
-t, --tenant <id>: Tenant ID.-s, --space <id>: Space ID.-f, --format <type>: Output format (json,table).
evaluate¶
Evaluate corpus quality using LLM-as-a-judge metrics.
Options:
-t, --tenant <id>: Tenant ID.-s, --space <id>: Space ID.--metric <name>: Evaluation metric (relevance,coherence,diversity).-f, --format <type>: Output format.
improve¶
Get improvement suggestions for corpus quality.
Options:
-t, --tenant <id>: Tenant ID.-s, --space <id>: Space ID.--focus <area>: Focus area (coverage,quality,diversity).-f, --format <type>: Output format.
eval-snapshot (alias: realtime-eval)¶
Snapshot corpus evaluation — a one-shot call (not a recurring stream).
The --interval flag is the window size in seconds the server uses
to compute the snapshot, not a poll interval; the CLI calls once.
Options:
-t, --tenant <id>: Tenant ID.-s, --space <id>: Space ID.--interval <seconds>: Server-side window size (default:300).-f, --format <type>: Output format.
monitor¶
Monitor corpus quality with anomaly detection.
Options:
-t, --tenant <id>: Tenant ID.-s, --space <id>: Space ID.--threshold <number>: Anomaly threshold (default:0.8).-f, --format <type>: Output format.
freshness¶
Check corpus freshness against external sources.
Options:
-t, --tenant <id>: Tenant ID.-s, --space <id>: Space ID.--sources <json>: External sources as JSON.-f, --format <type>: Output format.
drift¶
Detect concept drift over time in corpus content.
Options:
-t, --tenant <id>: Tenant ID.-s, --space <id>: Space ID.--time-window <days>: Time window for comparison (default:30).-f, --format <type>: Output format.