Insights & guidesAI SYSTEMS EXPLAINED

Decision models in agentic RAG: nine checkpoints.

A useful business assistant needs to know when to search again, which evidence to keep and when a person must decide. This guide maps nine places to test those judgments, with Jev as one possible decision model.

Sources checked 24 October 2026

Conceptual architecture, not a connected demonstration. Our current AI Lab runs local OCR and MiniLM passage retrieval; it does not run Jev, hybrid RAG, generated answers or business-system actions. This article makes no model calls or document uploads.

One system, nine decision checkpoints. One possible architecture. Retrieved passages are judged, filtered by code, then checked as the actual retained set. Missing evidence or incomplete work follows a bounded retry or review path. Trace evaluation observes the system; it does not certify the answer. This architecture is not installed in the public AI Lab.
One possible architecture. Retrieved passages are judged, filtered by code, then checked as the actual retained set. Missing evidence or incomplete work follows a bounded retry or review path. Trace evaluation observes the system; it does not certify the answer. This architecture is not installed in the public AI Lab.
Open the complete SVG diagram (opens in a new tab)
Read the diagram as text
  1. 1 · 2 · Screen and route

    Code policy. Model signals inform approved routes; access stays in code.

  2. Retrieve permitted sources

    Source evidence. Keyword and vector search return a bounded shortlist.

  3. 4 · Judge candidate passages

    Model estimate. Ask independent questions about each passage.

  4. Build the retained set

    Code policy. Apply tested thresholds; keep source IDs and conflicts.

  5. 3 · Check retained evidence

    Model estimate. A later check asks whether this set covers the question.

  6. Draft from the evidence

    LLM draft. Use the query and retained passages; preserve citations.

  7. 5 · 6 · Verify and authorize

    Code policy. Check support; enforce permissions and required approval.

  8. 7 · Finish or stop for review

    Model estimate. Check acceptance criteria. Hard limits always apply.

  9. 8 · Retry within the budget

    Code policy. Keep policy and sources. Budget spent? Stop for review.

  10. Return or report unresolved work

    Human review. Return supported results; abstain or seek review at the limit.

  11. 9 · Evaluate authorized traces

    Trace evaluation. Version checks and audit the judge against human labels.

Connections and alternatives

  • Screen and route Retrieve permitted sources
  • Retrieve permitted sources Judge candidate passages
  • Judge candidate passages Build the retained set
  • Build the retained set Check retained evidence
  • Check retained evidence Draft from the evidence (Yes)
  • Draft from the evidence Verify and authorize
  • Verify and authorize Finish or stop for review
  • Check retained evidence Retry within the budget (Retry)
  • Finish or stop for review Retry within the budget (Retry)
  • Retry within the budget Retrieve permitted sources (Retry)
  • Verify and authorize Evaluate authorized traces (Trace)
  • Finish or stop for review Return or report unresolved work (Done)
  • Retry within the budget Return or report unresolved work (Stop)
RAG
Retrieval-augmented generation: give a writing model selected source material alongside a question.
Agentic workflow
A workflow that can choose among permitted next steps, such as another search or a review request.
Decision model
A model that returns typed judgments about supplied information rather than writing a free-form answer.
Threshold
An application rule that converts a model estimate into a route, such as retain, review or stop.

What does the decision layer add?

Separate writing from judgment. An assistant answering an expense-policy question may find documents, compare versions, draft a reply and propose a ticket. Each transition needs a rule. A fluent final answer cannot establish that those earlier choices were sound.

Jev is one implementation. TypeSafe’s decision API accepts supplied state and named questions, returning typed results. A yes/no question can return an estimated probability of yes. This is neither proof of truth nor a written explanation; preserve the evidence that a reviewer needs. [1][3]

Calibration still needs evaluation. Calibration describes how probabilities match observed outcomes across groups of predictions. It does not guarantee one answer. Test reliability on the documents, languages and risk categories you actually use. [5]

Batch independent questions. Checks sharing the same supplied state can travel together. They do not consume one another’s answers within that request. In the architecture below, code first filters passages; a later check receives the actual retained set. [2]

1–2. Choose the route and screen the boundaries.

Match the task to an approved handler. A lookup, ambiguous request and specialist review need different paths. Evaluate routing by the task and its consequences; an expensive or larger model is not automatically correct. [4]

Screen at both ends. Separate checks can flag sensitive input or unsupported output. A prompt-injection estimate can be useful, but it cannot grant access or replace isolation, limited privileges and approval. [10][11]

1 · 2 — Route and screen a request. Separate hazard and routing estimates from enforced access and handler policy. Unclear or disallowed requests go to clarification or review. A larger model is not a correctness guarantee; a screening score does not grant access.
Separate hazard and routing estimates from enforced access and handler policy. Unclear or disallowed requests go to clarification or review. A larger model is not a correctness guarantee; a screening score does not grant access.
Open the complete SVG diagram (opens in a new tab)
Read the diagram as text
  1. A business request

    Source evidence. Question, permitted context and a known user scope.

  2. 1 · 2 · Independent semantic checks

    Model estimate. Which task? Which hazards? Is clarification needed?

  3. Apply the approved policy

    Code policy. Enforce scope, approved handlers and cost limits.

  4. Proceed or seek review

    Code policy. Choose an allowed handler, clarify or decline the task.

Connections and alternatives

  • A business request Independent semantic checks
  • Independent semantic checks Apply the approved policy
  • Apply the approved policy Proceed or seek review
1

Model routing

Which approved handler fits this request?

Code restricts the available handlers, data scope and budget; uncertain cases can go to a reviewer.

2

Guardrails

Does this input or draft raise a defined hazard?

Keep separate hazard checks and explicit review or stop routes. A score does not override access policy.

4 → 3. Filter the evidence, then ask whether it is enough.

Retrieve a broad, bounded shortlist. Hybrid search combines keyword and vector results; rank fusion can merge their lists. Exact identifiers and paraphrases may both matter. Retrieval still sets the ceiling: no reranker can recover a missing candidate. [6][8]

Ask precise candidate questions. Is a passage useful evidence, a contradiction, or merely related? Keep source identifiers and conflicts visible. Application code applies the evaluated filtering and ranking policy; similarity and yes probabilities are different quantities. [7]

Check what survived. Once code has retained the passages, ask whether that set supports every required part of the answer. A check on the original shortlist cannot establish sufficiency of a different subset. Missing evidence leads to a bounded retry, clarification or an honest no-answer response. [2]

4 · 3 — From candidates to enough evidence. Independent passage checks may be packed together. Code then creates the retained set. Checking that filtered set for sufficiency is a later request, because one packed answer cannot depend on another answer from the same call. Insufficient evidence routes to bounded retrieval, clarification or abstention.
Independent passage checks may be packed together. Code then creates the retained set. Checking that filtered set for sufficiency is a later request, because one packed answer cannot depend on another answer from the same call. Insufficient evidence routes to bounded retrieval, clarification or abstention.
Open the complete SVG diagram (opens in a new tab)
Read the diagram as text
  1. Hybrid retrieval shortlist

    Source evidence. Merge keyword and vector ranks; preserve source access.

  2. 4 · Judge each candidate

    Model estimate. Estimate relevance, evidence and conflicting statements.

  3. Filter in application code

    Code policy. Use versioned thresholds to form the actual kept set.

  4. 3 · Check this set afterwards

    Model estimate. Does the retained evidence cover all required parts?

  5. Draft with kept passages

    LLM draft. Evidence sufficient? Produce a source-linked draft.

  6. Retrieve, clarify or abstain

    Code policy. No evidence? Use bounded retries or return for review.

Connections and alternatives

  • Hybrid retrieval shortlist Judge each candidate
  • Judge each candidate Filter in application code
  • Filter in application code Check this set afterwards
  • Check this set afterwards Draft with kept passages (Yes)
  • Check this set afterwards Retrieve, clarify or abstain (No)
  • Retrieve, clarify or abstain Hybrid retrieval shortlist

Illustrative P(usable evidence). C1: 0.92; C2: 0.74; C3: 0.18. Example estimates, not measured. At threshold 0.80, retain C1; exclude C2/C3. Evaluate your own policy.

4

Passage filtering and reranking

Which candidates provide usable evidence or a relevant conflict?

Code retains, excludes and orders candidates using reviewed policy; keep provenance attached.

3

Retrieval sufficiency

Does the retained set cover this question?

Check after filtering. If evidence is insufficient, retry within limits, clarify or abstain.

5–6. Verify support before a draft becomes an action.

A citation needs to support its claim. Finding a source link is not enough. Check exact quotations mechanically, then assess whether the cited passage supports, contradicts or fails to address the draft proposition. Disputes and missing context need review. [9]

Permission is a separate decision. A proposed action can be semantically plausible yet unauthorized. The application validates identity, access, arguments and required approval before execution. A positive model score never authorizes a payment, email or record change. [11]

5 · 6 — Evidence is not permission. Check exact provenance in code and semantic support separately. For a proposed tool action, the application enforces authorization, valid arguments and approval before execution. A high model score cannot authorize a payment or a data change. Check the actual action result afterwards.
Check exact provenance in code and semantic support separately. For a proposed tool action, the application enforces authorization, valid arguments and approval before execution. A high model score cannot authorize a payment or a data change. Check the actual action result afterwards.
Open the complete SVG diagram (opens in a new tab)
Read the diagram as text
  1. A draft claim or action

    LLM draft. Keep the claim, source ID and proposed tool arguments.

  2. 5 · Does the source support it?

    Model estimate. Support, contradiction and absence need different routes.

  3. 6 · Enforce action authority

    Code policy. Check source IDs, permissions, arguments and limits.

  4. Approve, ask or deny

    Human review. Required approval precedes action; verify its result.

Connections and alternatives

  • A draft claim or action Does the source support it?
  • Does the source support it? Enforce action authority
  • Enforce action authority Approve, ask or deny
5

Citation checking

Does this source support this particular claim?

Preserve claim-to-source links and document versions; disputed conclusions go to review.

6

Tool-call gating

Is this proposed action consistent with the request?

Code enforces allow, ask or deny; validate permissions and arguments before any approved execution.

7–8. Keep the loop finite and the context accountable.

“Done” needs acceptance criteria. An assistant may believe it has finished while a required part is missing. Compare results with explicit criteria. Hard iteration, elapsed-time and cost ceilings stop work regardless of a model’s desire to continue. [13]

Select context without erasing obligations. Removing irrelevant or stale material can reduce clutter. Preserve required policy, source provenance, unresolved conflicts and necessary task state. Context selection is not permission to delete audit records or silently alter retention policy. [12]

7 · 8 — More attempts need a hard limit. A completion estimate cannot extend the application budget. If the task remains incomplete and retries are allowed, select context while preserving instructions and source provenance. At any hard limit, stop and report the unresolved work. Context selection is not a policy for deleting audit records.
A completion estimate cannot extend the application budget. If the task remains incomplete and retries are allowed, select context while preserving instructions and source provenance. At any hard limit, stop and report the unresolved work. Context selection is not a policy for deleting audit records.
Open the complete SVG diagram (opens in a new tab)
Read the diagram as text
  1. 7 · Compare with acceptance criteria

    Model estimate. Does the result satisfy the specific requested task?

  2. Enforce the hard budget

    Code policy. Attempts, elapsed time and cost cannot be extended by a score.

  3. 8 · Keep the necessary context

    Code policy. Preserve policy and source IDs; remove stale duplicates.

  4. Try the next bounded step

    Source evidence. Retrieve or revise only when policy still permits it.

  5. Finish or report unresolved work

    Human review. Complete tasks return; exhausted budgets go to review.

Connections and alternatives

  • Compare with acceptance criteria Enforce the hard budget
  • Enforce the hard budget Keep the necessary context (Retry)
  • Keep the necessary context Try the next bounded step
  • Try the next bounded step Compare with acceptance criteria
  • Enforce the hard budget Finish or report unresolved work (Stop)
7

Loop termination

Does the result satisfy the stated acceptance criteria?

Code enforces hard limits; unresolved work ends in a visible incomplete result or human handoff.

8

Context selection

Which material remains useful for the next step?

Retain required instructions and provenance. Selecting context is distinct from summarizing or deleting records.

9. Observe more traces, and keep testing the judge.

Coverage and accuracy answer different questions. Running a check on every recorded trace can broaden monitoring coverage. It does not prove that every verdict is correct or every failure is covered. Keep human-labelled examples, inspect disagreements and report unavailable or failed evaluations. [14]

Make changes comparable. Version the model, question wording, source set and threshold policy. Measure false approvals, missed evidence, abstentions, reviewer effort and end-to-end cost and latency against the current workflow. Test on held-out cases before changing production policy.

Tracing is evidence of execution. Opik can record TypeSafe calls and evaluation results. The external patchy631/jev-as-judge repository demonstrates a tutorial approach; it is its author’s work, not a GTC deployment. A recorded experiment is not a quality certificate. [15][19]

9 — Evaluate the judge as well as the agent. Evaluate permitted, minimized traces using named criteria and pinned versions. Compare estimates with human-labelled examples, inspect false positives and negatives, and monitor drift. Scoring every trace would increase monitoring coverage, not establish that every verdict is correct.
Evaluate permitted, minimized traces using named criteria and pinned versions. Compare estimates with human-labelled examples, inspect false positives and negatives, and monitor drift. Scoring every trace would increase monitoring coverage, not establish that every verdict is correct.
Open the complete SVG diagram (opens in a new tab)
Read the diagram as text
  1. A permitted, minimized trace

    Source evidence. Retain only evidence the evaluation is authorized to use.

  2. 9 · Apply the versioned rubric

    Model estimate. Estimate support, request coverage and action honesty.

  3. Compare with human labels

    Human review. Review errors, difficult cases and distribution changes.

  4. Track quality and overhead

    Trace evaluation. Measure quality, cost and latency before expanding coverage.

Connections and alternatives

  • A permitted, minimized trace Apply the versioned rubric
  • Apply the versioned rubric Compare with human labels
  • Compare with human labels Track quality and overhead
9

Trace evaluation

Does this trace meet a named, testable criterion?

Audit the judge against human labels, preserve raw results and versions, and expose missing evaluation coverage.

Three business workflows worth testing.

Start with an accountable decision. These are illustrative pilot ideas, not completed client projects or measured savings. Each needs authorized sources, a process owner and a clear point where the system must stop.

Illustrative scenario · not a client result

Administration: an internal policy inbox

Business question
An employee asks which documents an equipment request needs.
Proposed workflow
Retrieve the current procedure, filter relevant passages and check whether it covers the employee’s circumstances. Missing contractor rules trigger clarification.
Human responsibility
The administrator resolves policy gaps and approves any ticket-creation action.
Possible deliverable
A source-linked draft reply or a clearly explained handoff.
Pilot measures
Supported answers, missed policy conditions, abstentions and handling time.
Illustrative scenario · not a client result

Law firms: matter-scoped research support

Business question
A lawyer needs the termination provisions for one authorized matter.
Proposed workflow
Restrict retrieval by matter before scoring; keep amendments, conflicting clauses and document versions visible. Check each draft proposition against its source.
Human responsibility
The lawyer assesses applicability and approves advice. A probability cannot establish a legal conclusion.
Possible deliverable
A review packet of clauses, source links and unresolved questions.
Pilot measures
Retrieval recall, citation support, missed amendments and cross-matter access failures.
Illustrative scenario · not a client result

Finance: expense-policy exception triage

Business question
A team receives a receipt and a reimbursement exception request.
Proposed workflow
OCR and field checks precede policy retrieval. Code calculates amounts and dates; decision checks flag possible exceptions and evidence gaps.
Human responsibility
A finance reviewer decides the exception; payment approval and execution remain separate.
Possible deliverable
A draft recommendation with the policy, source receipt and missing information.
Pilot measures
False approvals, missed exceptions, review volume and trace completeness.

Turn the architecture into a bounded pilot.

Agree the decision before selecting the model. Choose one recurring task and the mistakes that matter. A pilot should reveal whether a decision layer improves that workflow enough to justify operating it, including the cost of review and failures.

Scope the data boundary. A hosted Jev integration sends selected state to a provider. Agree permitted data, hosting, access, retention and contractual terms before connecting records. Nothing in this article activates that integration. [16]

  • One task, a named owner and approved English/Arabic requirements.
  • A representative labelled set, including missing, conflicting and hostile evidence.
  • A baseline and held-out tests with acceptance criteria for consequential errors.
  • Versioned questions, models and policy, with explicit review and no-answer routes.
  • An access design, operating limits, monitoring owner and rollback plan.

Sources, inspiration and scope

Technical claims were checked against the primary documentation below on 24 October 2026. Original GTC prose and diagrams were inspired by the nine-checkpoint illustration credited to Aurimas Griciūnas / SwirlAI, and by Akshay Pachaar and Daily Dose of Data Science. Their artwork is not reproduced. Vendor documentation and external tutorials do not establish GTC results; features can change.

  1. TypeSafe · Typed decision questions
  2. TypeSafe · Independent questions in one request
  3. TypeSafe · Reading a yes probability
  4. TypeSafe · Confidence and decision policies
  5. TypeSafe · Calibration across groups of predictions
  6. Microsoft · Hybrid search and rank fusion
  7. TypeSafe · Classifying retrieved passages
  8. TypeSafe · Reranking a retrieved shortlist
  9. TypeSafe · Checking citations
  10. TypeSafe · Input and output guardrail examples
  11. OWASP · Prompt injection and layered controls
  12. LangGraph · Graph nodes, edges and transitions
  13. LangGraph · Hard step limits
  14. Comet Opik · Decision-model evaluation rules
  15. Comet Opik · TypeSafe tracing integration
  16. TypeSafe · Submitted data and retention
  17. Inspiration · Akshay Pachaar’s Jev/RAG explanation
  18. Inspiration · Daily Dose of Data Science
  19. External tutorial · patchy631/jev-as-judge