Skip to content

LLM Refund Extraction Overfits to Hardcoded Merchant Examples in Prompts #1

@AJ

Description

@AJ

Description:

The transaction extraction prompt currently relies on hardcoded, specific merchant names (e.g., URBAN COMPANY LIMITEDGURUGRAM) to teach the LLM how to parse HDFC reward point reversals. Testing reveals that if these specific examples are replaced with generic placeholders, the LLM fails to identify the -[Points] + [Amount] pattern as a refund, instead extracting it as a debit->purchase.

Reproduction Steps:

  1. Locate the few-shot examples in CC_TRANSACTIONS_PROMPT.
  2. Replace specific merchant names with generic placeholders (e.g., Generic Merchant).
  3. Parse a statement containing a refund formatted as -Points + Amount.
  4. Observed: The LLM extracts the transaction as type: "debit".
  5. Expected: The LLM should extract type: "credit".

Impact:

  • Verification Failure: Misclassifying a refund as a debit breaks the CC reconciliation formula.
  • Fragility: Refunds from merchants not named in the prompt are likely misclassified.

Proposed Solution:
None at this time

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinghelp wantedExtra attention is needed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions