DSAIL Quickstarts Guides Compare REST MCP tools Errors

Check LLM output against a written policy without another LLM as the judge

How to check extracted values against a written policy with no model in the loop — extraction on your model, the check on a solver, and what that buys you.

The common pattern for checking an LLM's work is a second LLM: a judge prompt, a rubric, a score. It inherits every property of the first model — variance, prompt sensitivity, an explanation written after the fact. DSAIL keeps the model where it is good, at reading the document, and puts no model in the loop for the check itself.

The seam

document ──(your model, prompt pack)──► claim dictionary ──(solver)──► per-assertion results

What crosses the wire is the claim dictionary — a handful of typed values bounded by a JSON Schema — never the document.

What this buys

What it does not do

It does not assess tone, relevance, toxicity or grounding; those are content properties, and guardrail frameworks are built for them. It checks whether the facts extracted from a document satisfy a written policy. Many applications need both, on different layers.

Fitting it into a pipeline

  1. Compile the policy once; keep the ruleset_hash.
  2. For each document: fetch the prompt pack (or cache it per hash), run the prompts on your model, assemble the claim dictionary, check.
  3. Read rules[].assertions[].check and act on it in your own code. The service publishes no verdict, because what a FALSE costs is your decision.
  4. If validation rejects the dictionary, error.failures names every failing field at once — fix them in one pass and resubmit. The dsail Python client's check_with_repair does this loop for you.

Try it