# v0.6 Adaptive Context Planner

> Frozen multilingual context planning with explicit quality and safety checks

The offline suite compares raw context, naive prefix truncation, fixed-ratio compression, and adaptive planning. It uses task-grounded string constraints rather than an LLM judge.

Target: Provider-neutral model profiles · Baseline: Raw, prefix, and fixed-ratio baselines

## Environment

| Setting | Value |
|---|---|
| cpu | Environment-dependent; benchmark locally |
| ram | Environment-dependent |
| os | Cross-platform Python |
| pythonVersion | Python 3.9+ |
| packageVersion | llmslim v0.6.0 release candidate |
| tokenizerVersion | tiktoken when available; otherwise documented heuristic |
| sampleSize | 28 frozen context-planning cases |
| iterationsPerSample | One deterministic plan per case and baseline; rerun for local latency |

## Methodology

Run the frozen 28-case corpus across chat, RAG, tools, mixed, external-source, and multilingual scenarios. Check budget fit, required facts, complete tool schemas, hard constraints, and stale-plan rejection.

## Results

| Method | Token reduction | Latency | Cost per 10k requests | Semantic retention | Instruction retention | Entity preservation |
|---|---|---|---|---|---|---|
| Raw full context | 0.0% | Measurement only | Profile-dependent | 100% required facts | 100% hard constraints | 71.4% budget success |
| Naive prefix | 9.2% | 2.21 ms* | Profile-dependent | 100% required facts | 100% in scoped checks | 100% budget success |
| Fixed ratio | 9.6% | 26.55 ms* | Profile-dependent | 94.0% required facts | 96.4% hard constraints | 78.6% budget success |
| Adaptive planner | 11.4% | 208.02 ms* | Estimated, labelled | 100% required facts | 100% hard constraints | 96.4% budget success |

## Findings

- All required trusted instructions and complete selected tool contracts were retained in the checked-in run.
- The one infeasible case is intentionally impossible and is reported explicitly rather than truncated.
- SELECTIVE tool exposure remains experimental; FULL and MEASURE_ONLY remain production-safe.

## Limitations

- The corpus is compact and synthetic; it is not a universal task-quality claim.
- Latency is environment-specific and the checked-in run is not a throughput guarantee.
- The live Sarvam harness requires explicit opt-in and credentials and is not part of the offline result.

## Reproduce

```bash
python benchmarks/v06_planner.py --output benchmarks/results/v0.6-planner-latest.json --report docs/planning/BENCHMARK_REPORT.md
```

Canonical page: https://www.llmslim.app/benchmarks/adaptive-context-planner
