How It Works
Quick Start
CLI Flags
| Flag | Values | Default | Description |
|---|---|---|---|
--context-estimation-mode | heuristic, accurate, validated | heuristic | How tokens are counted |
--context-log-mismatch | flag | off | Log when heuristic differs from accurate |
Interactive Commands
config.yaml
PRAISONAI_CONTEXT_ESTIMATION_MODE, PRAISONAI_CONTEXT_LOG_MISMATCH.
Best Practices
Use heuristic in production
Use heuristic in production
Heuristic mode is fastest and sufficient for compaction triggers in normal use.
Switch to accurate when counts look wrong
Switch to accurate when counts look wrong
If compaction fires too early or too late, run with
--context-estimation-mode accurate and check /context stats.Use validated mode briefly when tuning
Use validated mode briefly when tuning
Enable validated + log-mismatch for a short session to calibrate heuristic accuracy for your model and prompt style.
Related
Context Budgeter CLI
Allocate token budgets per segment
Context Management
Full context system overview

