A Context Compiler for Agents: Broad Retrieval, Small-Model Reranking, Deterministic Assembly
Bavwu · reddit · 2026-11-23
The author is experimenting with Jev plus semantic search to improve how agents retrieve and assemble context. The problem: as an agent accumulates tools, skills and memories, deciding what to feed the LLM gets harder — sending everything is expensive and noisy, while plain semantic search can't distinguish "related" from "actually useful."
The proposed lightweight context compiler in front of the main LLM:
- Semantic search retrieves a broad candidate set of tools, skills, memories and examples.
- Jev evaluates user intent and candidates with fast structured decisions, narrowing what's relevant, missing, or needs another retrieval pass.
- Code handles deterministic logic, permissions, dependencies and assembly within a token budget.
- The main LLM receives the compiled context and does the reasoning, planning and tool use.
It's adaptive rather than single-pass: retrieve, evaluate, re-search if key context is missing. The goal isn't classic document RAG but dynamically assembling the smallest useful context from a larger environment. The author says it's promising but not yet stress-tested, and asks whether others use small decision models as a reranking/routing layer.
More from coding & agent
- Dev builds qorx MCP in Rust: serves Claude Code exact code lines, 975 vs 6,535 tokens — Separate_Jacket2133 · 2026-11-23
- MyClaw 3.0 Ships AI Teammates With Built-In Tools, Declaring the Agent Harness War Over — SucceededMind · 2026-11-23
- Claude vs Codex rivalry gets a meme: weird 3D blob vs human photo — willcb · 2026-11-23
- External dev's fix for i2rt teleop freeze from signal-pipe leak merged — eigenron · 2026-11-23
- Alibaba open-sources its internal code reviewer: 352K tokens vs Claude Code's 2,062K with higher F1 — victor_explore · 2026-11-23
- How do you manage multiple AI coding agents on the same project? — Diligent-Line-8668 · 2026-11-23