Skip to content

Improvement: OCR artifact warning is not actionable — needs concrete grep patterns #7

Description

@Augustas11

Problem

The prompt notes pre-1996 OCR artifacts (l↔1, O↔0, dropped commas, shifted columns) but provides no concrete grep strategy for handling them. A model reading a warning cannot act on it — it needs tool call patterns.

Suggested Fix

Replace the warning with actionable patterns in the TABLE READING section:

# For pre-1996 files, use alternates to handle OCR l/1 and O/0 confusion:
grep -iE "pub1ic|publ.c|pubiic" /app/corpus/treasury_bulletin_199[0-5]_*.txt
grep -iE "[0O]utlays|0utlays" FILE

# For shifted columns: extract a wider sed window (+/- 5 lines) to catch misaligned data
sed -n -5,5p FILE

Also add: "For pre-1996 bulletins, always verify extracted numbers by checking the row sum against a known total in the same table."

Impact

Low-medium — pre-1996 documents are a known accuracy gap; concrete patterns would help the model recover some of the always-fail questions in that date range.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions