On this page
Measure & evaluate
Inspect what was actually delivered.
Connect a context operation to its sources, returned representation and measured outcome.
LeanCTX is the Context Gateway for AI systems. It selects context, controls what reaches the model, learns how your work connects and proves what was delivered. The delivery records on this page belong to the Prove step.
Ask three separate questions
| Question | Evidence |
|---|---|
| What did LeanCTX return? | The tool result, source references and available operation metadata |
| How much input changed? | Before/after counts with a declared tokenizer and measurement scope |
| Did the task improve? | A task-specific quality check under comparable conditions |
A smaller result answers only the second question.
Inspect local usage
lean-ctx gain --json
lean-ctx spend --json
gain reports observed or estimated local context usage. spend reports provider usage where the integration captures it. Missing provider measurements must not be replaced with a claim about an actual bill.
Open lean-ctx cockpit for local activity, context and project views. The Cockpit guide explains setup, each area and empty-state diagnosis. Its coverage depends on observed operations; it does not see every action outside LeanCTX.
Choose the right report
| Report | Purpose |
|---|---|
lean-ctx gain --by-tool --json |
Local context usage grouped by tool |
lean-ctx token-report --json |
Project/session context and memory signals |
lean-ctx output-savings --json |
Output-token estimates; not quality proof |
lean-ctx value-report --format json |
Recorded task outcomes and associated cost |
lean-ctx cep |
Context-processing and cache metrics |
lean-ctx savings |
Representation-change ledger; verification does not establish task quality |
gain --svg and gain --share write local share artifacts. Inspect their contents before publishing them yourself. Hosted publication and public rankings remain Research. For advanced comparison, shadow, verification and evidence commands, use the evaluation directory; a signed artifact authenticates its recorded contents, not the success of an undeclared quality test.
Follow evidence back to a source
Keep source identity, representation and available receipt references together. When an output is archived, inspect the archive before treating a summary as complete evidence.
Not every tool or integration emits the same receipt fields. Verify the actual artifact contract rather than relying on a mock dashboard.
Evaluate a change fairly
Use the same task, source revision, model configuration and success criterion for a comparison. Include retries, recovered context and failed attempts. Separate estimated token reduction from measured billing.
For a reproducible research example, see the Wavect case study. For local measurement semantics, use token measurements.
Sources & versions
- pipeline.rsrust/src/server/call_tool/pipeline.rsReviewed checkout
- keyed.rsrust/src/core/context_admission/receipt_store/keyed.rsReviewed checkout
- 11-analytics-and-insights.mddocs/reference/11-analytics-and-insights.mdReviewed checkout
- Core checkout
0ce2207ee4- Reviewed runtime
- 3.10.2
- SDK release
- 1.1.0
Separate baselines for source, CLI/configuration and SDK contracts. Review does not certify every platform or integration.
Versions & compatibility