Skip to content

Fix agreement extraction failures from source citation mismatches - #116

Open
Mplee1 wants to merge 1 commit into
mainfrom
codex/fix-agreement-evidence
Open

Mplee1 wants to merge 1 commit into
mainfrom
codex/fix-agreement-evidence

Conversation

@Mplee1

@Mplee1 Mplee1 commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator

Agreement extraction rejected the entire Gemini response whenever a quote differed from the source, including harmless PDF whitespace differences or a uniquely identifiable quote assigned to the wrong page. There was no automatic retry for invalid citations.

Restore quotes to exact source excerpts when only whitespace differs, repair incorrect page IDs only when one source page matches, and retry extraction once with stronger citation instructions if evidence remains invalid. Fabricated quotes, ambiguous page references, missing commercial evidence and invalid schema values remain blocked. Original source spans and database evidence validation are unchanged.

Validation: the 12 agreement extraction tests passed, including three focused regression cases for whitespace, page references, and bounded retry. TypeScript, ESLint on changed files, and git diff --check passed. Per the requested time constraint, no broader suite or live Gemini calls were run.

Restore exact source whitespace, repair unambiguous page references, and retry extraction once when citation evidence is invalid. Keep fabricated evidence blocked.

Assisted-by: GPT-6
@vercel

vercel Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
bridgify Ready Ready Preview Oct 18, 2026 4:40pm UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant