Probability-scored filtering with a small model beats LLM summarization for RAG and context compaction

marlene_zw · x · 2026-09-23

The author shares a hands-on technique for context compaction in the Copilot SDK: instead of one-shot summarization with Opus or GPT, a small model (Jev) scores each passage with probabilities and keeps/drops by thresholds — P(relevant) < 0.45 → drop, P(has answer) > 0.55 → keep. They're now extending it to 4-level scoring: probability still needed for the goal, superseded by later activity, and needed again. Cheaper and faster, though final output still needs evaluation.

Related event: Small-Model Probability Scoring for Cheaper RAG and Agent Context Management(3 posts)→

Original post →

More from coding & agent

coding & agent channel →