Scored context
A common failure mode of AI systems is to search across a huge corpus as one flat mass, let the model attend to whichever passages “look relevant,” and hope the answer is grounded. When something later turns out to be wrong, there is no way to reconstruct which sources the answer actually used.
Scored context is VeraFrame’s answer to that problem. Every request runs through an explicit retrieval-and-scoring stage before the AI sees anything. The stage is logged, the scores are stored, and the same narrowed context is used both for generation and for verification.
How it works
For each placeholder or claim that needs to be filled or checked, VeraFrame:
- Retrieves candidate blocks from the selected source groups using full-text search. A “block” is a semantic unit of source text — a contract clause, a table row, a specification paragraph.
- Scores each candidate against the target: how well the block’s topic matches the placeholder description, whether its numeric units line up, whether it is the right type of block (a clause for a clause field, a price for a price field).
- Selects a top set of blocks and passes only that set to the AI.
- Records the audit — which blocks were retrieved, what each scored, which were selected, and which were left out.
The validator then uses exactly the same block set to check the AI’s output. The AI cannot quietly claim it got something from a source that the validator does not have.
Why the scoring matters
Two concrete behaviors depend on it:
Low-gap placeholders are flagged
If the top two candidate blocks for a placeholder are scored within a narrow margin of each other, the result is ambiguous — there is no clear best source. Instead of silently picking one, VeraFrame marks the placeholder as needs review in the trust report and shows both candidates. A human makes the choice. This is especially important for legal and regulated content, where “roughly the right clause” is not acceptable.
The retrieval audit is exportable
For any verification you can retrieve the full list of which source blocks were considered, which were selected, and why. This is used by the audit trail for EU AI Act deployments and by anyone debugging an unexpected output.
When scoring runs
Scored context runs automatically whenever a request involves:
- Document templates (every placeholder is routed through scoring)
- JSON API mode with schema-constrained fields
- Generate mode when the source groups are large enough that a flat context would be prohibitive
It is not a separately licensed feature — it is part of how VeraFrame handles any non-trivial source collection.
Related
- Document templates — how the block-based pipeline is wired into template generation
- Source groups — how you structure the data VeraFrame scores against
- Audit trail — how retrieval audits are captured for compliance exports