Skip to content

Improve wallet matching in SuggestionEnricher via prompt engineering and validation #209

@nfebe

Description

@nfebe

Problem

The LLM enricher sometimes assigns transactions to wallets with mismatched currencies (e.g. a EUR transaction assigned to a USD wallet).

Current Behavior

The enricher prompt instructs the LLM to match by currency and presents wallets with their currencies, but the LLM occasionally ignores this. There is no server-side validation of the LLM's wallet suggestion.

Suggested Improvements

  • Add post-LLM validation: verify the suggested wallet's currency matches the transaction's currency, clear if mismatched
  • Experiment with stronger prompt phrasing or few-shot examples
  • Consider a deterministic fallback: if only one wallet matches the currency, auto-assign without LLM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions