Context relevance filter
Decide what an agent keeps in context: keep, compress or drop each chunk.
Scores each tool result, retrieved passage or old message for how useful it is to the current task, and drops stale results such as errors that were already fixed. Smaller contexts mean cheaper, faster and more accurate agents.
Try it live
Real calls to Jev. Pick an example or paste your own.
Pick an example or paste your own input, then run it.
Under the hood
Every question and rule, in the open. Fork it to change any of them.
What it asks
Reads task and chunk, then asks 3 questions in one call.
- Q1UsefulnessScore
How useful is the
chunkfor completing thetask?- 0Irrelevant
- 1Background only
- 2Useful
- 3Essential
- Q2Contains what's neededYes / no
Does the
chunkdirectly contain a fact, code or instruction thetaskneeds? - Q3StaleYes / no
Is the
chunka superseded or outdated result (an old error that was since fixed, or an earlier version of a file)?
How it decides
Rules run in code, top to bottom. The first one that matches gives the verdict.
- 1If Stale ≥ 0.7Drop
- 2If Contains what's needed ≥ 0.7Keep
- 3If Usefulness ≥ 2 of 3Keep
- 4If Usefulness ≥ 1 of 3Compress
- ·DefaultDrop
Call it from your code
Every template runs as-is with an API key, no setup: POST /api/v1/judges/context-filter/run.
curl -X POST https://tryevally.com/api/v1/judges/context-filter/run \ -H "Authorization: Bearer $EVALLY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "input": { "task": "Add pagination to the /orders API", "chunk": "Error: Cannot find module '\''zod'\'' (resolved by running npm install zod in step 3)" }}'Seen in the wild
Community builds on Jev that use this pattern. Not affiliated with Evally.
More in Agents
- Agents
Tool-call firewall
Judge every agent tool call before it touches your machine: allow, ask a human, or deny.
AllowAsk a humanDeny10 questions - Agents
Is the task done?
Don't trust an agent's "done". Check the transcript for proof, open errors and skipped work.
DoneDone, but unprovenNot done5 questions - Agents
Agent loop & drift detector
Spot an agent that's stuck in a loop, drifting off-goal, or blocked, and stop wasting tokens.
ContinueNudge: change approachStop and escalate4 questions - Agents
Model router
Send each prompt to the cheapest model that can handle it.
Small modelMid-size modelFrontier model+14 questions - Agents
Tool router
Pick the right tool for a request without an LLM tool-calling round trip.
Ask to clarifyConfirm firstWeb search+62 questions - Agents
Memory gate
Decide which messages in an agent's chat are worth remembering next session, and which change what it already knows.
Save itReplace a lineSkip4 questions