No More Hallucinations or Half-Baked Output: How to Dramatically Elevate Your AI's Quality
Dr. Aaron Hutzler · 10 min · Deutsch

aisen blog | target audience: everyone
You hand an AI your specification sheet, bill of materials, or contract for review. You naturally assume it reads every document thoroughly. The response sounds polished and convincing. Unfortunately, it sounds just as convincing when the work behind it was sloppy. Flawed work and missed details are easily masked by fluent phrasing.
To bridge this gap, we built a tool in-house that is free, deliberately minimal and runs as a single HTML file with an embedded verification script, in the browser or locally. Nothing needs to be installed.
Whether an AI answer holds up is decided mechanically. At the end of the check stands a clear verdict:
Table 1: The three verdicts and what each one means.
| Verdict | Meaning |
|---|---|
| ACCEPTED | clean, verified work |
| REJECTED | sloppy or hallucinated work |
| INCONCLUSIVE | the document cannot be checked |
In addition, the tool provides an exact rework list and a log of measured values: checksums, character counts and document coverage. None of these values comes from the AI itself.
What the Tool Proves and What It Does Not
To set expectations right from the start: the file verifies two specific criteria.
- Proof check: Does the supporting evidence for every single claim actually stand in the source document?
- Coverage check: Has the response covered the whole document, measured by the file's coverage rules?
This is not a limitation we downplay. It is a conscious division of labor: the tool takes over the tedious cross-referencing and while reading you focus entirely on the substance. Whether the numbers exist in the source document at all has already been settled for you.
Three Ways to Provide Proof
The core principle stays the same: the AI may claim whatever it wants, but it must supply proof for every claim. The tool verifies that proof itself and detects the proof method from how the response is structured. You never select a mode.
1. The location. The AI names the exact place for each point: a line, a section, or a page. The tool reads that exact place from the original file and verifies numbers and terms against it. Nothing is transcribed, which makes this the most robust method: nothing can get corrupted on the way through a chat window.
2. The rule, for tables. For spreadsheets the burden of proof is reversed. The AI states the rules it applied and its findings. A rule consists of a column, a condition and an optional exception, for example: column Hazardous substance, condition contains lead, exception contains RoHS exemption. The tool applies these rules to every single row itself and compares the outcome. A row that violates a rule but is missing from the AI's findings is flagged by name. Measured on the testkit's example: a bill of materials with 800 rows hides five planted violations. The AI reported one of them. The verification tool named all five.
3. The quote. Every point carries a word-for-word quote from the document and together all quotes must cover the whole source. This catches both failure modes: the hallucinated claim and the half-read document. The tool compares the word sequence, never the typography. Quotation marks, bold text, line breaks, or thousands separators never change a verdict. A changed word or a changed number always does:
Table 2: Which deviations from the source text the check still accepts as a quote. And which it rejects.
| Quote in the answer | Result | Reason |
|---|---|---|
"The insured sum is 85,000 euros" | accepted | exact match |
The insured sum is 85,000 euros | accepted | bold formatting does not count |
The insured sum is 85000 euros | accepted | the thousands separator does not count |
The insured sum is 92,000 euros | rejected | the number differs from the source |
Supported File Formats
PDF, Word, Excel, PowerPoint, the corresponding OpenDocument formats, CSV and plain text. The PDF must be digitally generated; a scan without a text layer is honestly rejected rather than guessed at. Core information should stand in the main body text, because footnotes, page headers and secondary spreadsheet tabs are not read.
How the Verification Process Works
Choose the route that suits your environment.
Route 1: In the browser, no installation.
- Open pruefung-im-browser.html from the testkit with a double click.
- Paste the AI response into the upper field.
- Drag your original document into the lower field.
- Click the check button. Verdict and audit log appear immediately on the page.
- Repeat the check after every rework round until ACCEPTED appears. If ACCEPTED never appears, switch to a better AI.
- After that, you can work with the AI: it has now read the document and is ready. Ask your remaining questions promptly in the same conversation. Assistants shorten long chats. Once that happens, the proven reading state is gone without anyone telling you.
Your files stay entirely on your machine on this route. The page needs no internet connection; the kit's build proves that with a test that opens the finished page with the network cut and still demands a verdict.
Route 2: Directly within the AI chat.
- Upload the verification file from the testkit together with your source document.
- State your task and instruct the assistant to verify its own response with the file. Any assistant that can execute code will.
- Read the verdict at the end of the log.
- On REJECTED, reply with one sentence: Fix precisely the points listed in the log and verify again.
- Repeat steps 3 and 4 until ACCEPTED is displayed. Only then read the answer yourself.
The log prints the tool's checksum, a digital fingerprint of its content. A faked test run is caught by it immediately.
Route 3: On your machine, for scripts and automation.
Run the tool on the command line with the AI response and the source document as arguments. The verdict is identical to the other routes. For automation, the tool additionally reports the result as a number a script can act on.
What the Verification Loop Achieves: A Real Case Study
An AI assistant compared two revisions of a technical specification against 28 differences the checker itself had computed beforehand.
Table 3: Three runs against the same 28 pre-computed differences.
| Run | Result | Verdict |
|---|---|---|
| Round 1 | 23 of 28 changes, 82%, plus one stitched-together quote the check found nowhere | REJECTED |
| Round 2 | 25 of 28 changes, 89%, the removed requirements backed at only one of their two locations | REJECTED |
| After two rounds of rework | 28 of 28 changes backed, nothing hallucinated | ACCEPTED |
No prompt alone produced this precision. The automated rework list enforced it: it points the AI at every missing change with its exact wording.
After the passed run, the assistant evaluated the confirmed changes. Three examples from its answer: The availability requirement was downgraded from MUST to SHOULD. The acceptance test was shortened from a 40-hour endurance run to 40 cycles. The warranty period was halved from 24 to 12 months. Its conclusion: the counterparty's claim that the changes were purely editorial is objectively false. This assessment carries genuine weight because the check had measured beforehand that all 28 differences were backed.
Feature Overview
You do not need to specify which test to run. The tool analyzes the structure of the response and selects the appropriate mode itself:
Table 4: The three checking modes with the inputs each one needs and the criteria it evaluates.
| Use case | Required inputs | Evaluated criteria |
|---|---|---|
| Document summarization | response and source document | hallucinated statements, skipped sections, coverage |
| Reference verification | response and source document | whether numbers and terms stand at the named locations |
| Table auditing | response and spreadsheet | row-by-row rule execution, missed rows |
| Version comparison | response, old and new draft | missed and hallucinated changes against the computed difference |
| Action plan approval | response and optionally your policy | undisclosed impacts, irreversible steps without cover |
| AI code review | response and source code | executes the code: crashes, broken invariants |
| Graphic compliance | PNG or SVG plus a spec file | colors, dimensions, contrast, print resolution, active content in SVGs |
| Testing the assistant itself | responses and a key file | whether a second model spots damaged quotes, whether yours agrees with leading questions, how far it drifts over time |
The test material for the last row is produced by the file on demand, each piece with a solution file:
An exam piece for a second model. The call pruefstueck antwort.txt dokument.txt turns your
checked answer into an exam in which single quotes are quietly damaged on purpose. If a second
model finds the damaged spots, it is fit to act as a reviewer.
Leading questions. The call fragen dokument.txt produces questions about your document, each
of which contains a false claim. If your assistant agrees with them, it is telling you what you
want to hear.
Reference tasks. The call aufgaben produces fixed tasks with a solution file. With those you
measure the same assistant against itself over months: after a silent update, does it still
deliver what it did in spring?
The solution files stay with you. They must never enter the chat they are meant to test, or the assistant reads the solution along with the task.
Who Uses This and Why
Table 5: Where the tool is used, with the task, the mode and the practical benefit per area.
| Area | Task | Mode | Practical benefit |
|---|---|---|---|
| Private | Checking an insurance policy or a rental contract | location | The AI likes to skip the exclusions; the coverage check demands a statement for every page. Numbers that are not in the contract surface immediately. |
| Engineering, quality | Comparing spec revisions, auditing bills of materials against RoHS and REACH | version comparison, rule | MUST turned into SHOULD, removed requirements, changed units. All 800 rows are checked, not the first fifty. |
| Management | Checking board slides against the quarterly report | document | Slide figures without backing in the report surface before they wander through the company. |
| Procurement | Comparing quotes and price lists | location, version comparison | Unquoted line items and quietly raised unit prices become visible. |
| Legal, compliance | Checking terms and contract drafts after a negotiation round | version comparison | Changes declared as purely editorial that are not. |
| Administration, HR | Holding applications and job profiles against guidelines | location, document | Criteria and commitments without backing in the source surface. |
| Finance | Checking invoices and expense claims line by line | rule | All violations and deviations, not only the conspicuous ones. |
| IT, software | Checking AI-written code | code | The file executes the code; a sort that silently drops duplicates fails at the invariant. |
Where the Tool Has Its Limits
Its real value is time. The tool strips away the error-prone routine work that nobody enjoys and that therefore rarely gets done thoroughly: checking every line, reading every page, looking up every figure. What remains is the evaluation you were trained to do.
Try It Yourself
The testkit is available free of charge: agent-quality-control
Anyone who would rather not run the check themselves gets it built into the aisen platform, with verified citations and an audit log for every answer:
Betteryields
Betteryields GmbH builds quality gates for AI: aisen for AI research, documents and data analysis (www.myaisen.com), agentic-gates for code (agentic-gates.dev)
Betteryields GmbH. No account needed to take a look.
