Files
ai-kit/src
ce95a19b5b fix(grounding): a markdown table is not a fabrication (#54)
A live answer laid its findings out as a table and was reported as fabricating.
Every claim in it was cited and correct; the flagged "novel proper nouns" were:

    Item
    Item Status Notes Pending

Those are the header cells of `| Category | Item | Status | Notes |`. A pipe is
not a word character, so it was not a boundary — the header tokenised as one
capitalised run, and the run then continued past the row break into the FIRST
CELL OF THE NEXT ROW to produce a phrase that appears nowhere on screen.

This is the worst direction for this check to fail in. FleetCrown now renders a
prominent "some of this is not backed by your records" warning on a flagged
answer, so a false positive does not merely add noise — it teaches the operator
to dismiss the warning, which costs more than the fabrication the check exists
to catch. A grounding check that cries wolf is worse than one that is absent,
because absence is at least legible.

Fix: pipes become line breaks alongside the existing code-fence stripping. A
cell is its own utterance and a run must not span two of them.

Recall is barely touched, and the test says so. Splitting per cell makes each
header word cell-initial, and sentence-initial single words were ALREADY skipped
for exactly this reason ("Rotate the key" must not flag "Rotate"). A fabrication
inside a cell still trips its remaining tokens — pinned by a test asserting that
"Program Manager at Impact Hub Zurich" in a table cell is caught as both the
composite run and its individual tokens. If that test ever goes quiet, this
boundary has become a blindfold.

Found by reading the grounding verdict on a real production answer rather than
by testing the parser, which is the only way this shape shows up: it needs a
model that chose a table, and every unit fixture used prose.

239 tests, up from 236.

Co-authored-by: Cato <georgy.butaev@revamp-it.ch>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-12 12:37:49 -07:00
..
2026-08-31 10:42:02 +02:00
2026-08-31 10:42:02 +02:00
2026-08-31 10:42:02 +02:00
2026-08-31 10:42:02 +02:00