Skip to content

Cookbook: bank statement extraction with cross-field validation #84

Description

@pranjalparmar

This is the best showcase for the project's most distinctive feature, the failed_check flag from a custom cross-field rule (e.g. line items summing to a stated total), and it currently has zero worked example anywhere in the docs.

What's needed

A new docs/cookbook/bank-statement.md (create docs/cookbook/ if it doesn't exist yet) containing:

  1. A schema for a bank statement with a list of transactions (date, description, amount) plus a stated closing balance or total.
  2. A custom cross-check rule using numeric_sum_rule (already exported from fastdocparse, see grounding.py) or a hand-written rule, wired up via DocumentParser's cross-check hook (see docs/output-format.md for how custom rules plug in).
  3. A real synthetic bank statement (do not use a real person's actual financial document) run through fastdocparse extract, with the cross-check rule enabled.
  4. The actual output showing a case where the check passes, and ideally a second run showing it catching a real mismatch (e.g. deliberately altering one transaction amount in the source document), flagged failed_check. Both need to be genuine output from a real run, not fabricated.

This requires an actual LLM call (OpenAI key or local Ollama model), that's why it's a separate task rather than something scripted.

Where it's linked from

Add a link to the new page from the "Full documentation" list in README.md.

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

    documentationImprovements or additions to documentationgood first issueGood for newcomershelp wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions