Skip to content

[WIP] Add merchant/entity resolution engine package#56

Closed
Copilot wants to merge 1 commit intomainfrom
copilot/add-merchant-entity-resolution
Closed

[WIP] Add merchant/entity resolution engine package#56
Copilot wants to merge 1 commit intomainfrom
copilot/add-merchant-entity-resolution

Conversation

Copy link
Contributor

Copilot AI commented Mar 22, 2026

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original prompt

This section details on the original issue you should resolve

<issue_title>feat(resolution): merchant/entity resolution engine — the core differentiator</issue_title>
<issue_description>## Summary
Build packages/resolutionthe most important package. This is what makes FinancialAdvisor actually useful. This package does not currently exist in meaningful form.

Owns

  • Merchant/entity resolution: "AMZN MKTP US*2K7X9" → "Amazon" with confidence score
  • Alias graph: Maintain a graph of merchant name variants → canonical entity
  • Duplicate clustering: Detect duplicate transactions across imports/accounts
  • Transfer detection: Identify internal transfers (matching opposite amounts, close dates)
  • Recurring series detection: Find subscriptions, bills, salary (periodic amount patterns)
  • Explanation/confidence generation: Every resolution produces a confidence score + reasoning
  • User correction learning: When user corrects a resolution, learn from it

Resolution Pipeline

Raw description → Text normalization (strip noise, uppercase, trim) →
Fuzzy match against alias graph → Confidence scoring →
If low confidence: flag for review → User decision → Update alias graph

Fuzzy Matching Strategy

  1. Exact match against alias graph
  2. Levenshtein/Jaro-Winkler distance matching
  3. Token overlap ("AMAZON" in "AMZN MKTP US*2K7X9")
  4. Historical pattern matching (this account + similar amount = likely same merchant)
  5. Optional: embedding-based semantic similarity (ai-providers, not required)

Transfer Detection

  • Match transactions across accounts: opposite amounts, within 3-day window
  • Flag for review, don't auto-resolve (false positives are costly)

Recurring Detection

  • Group by merchant → analyze date intervals → detect periodicity
  • Handle amount variance (utility bills fluctuate)
  • Confidence: strict periodic = high, irregular = low

Acceptance

  • Merchant resolution handles common bank description formats
  • Alias graph persists and grows from user corrections
  • Transfer detection finds obvious internal transfers
  • Recurring detection finds monthly subscriptions
  • Every resolution includes confidence score</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@kayodebristol
Copy link
Contributor

Closing this PR to enforce the 1-PR-per-repo rule. Only one Copilot PR is allowed per repository at a time. The oldest PR (#48) will be kept active.

Copilot stopped work on behalf of kayodebristol due to an error March 22, 2026 23:32
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.

feat(resolution): merchant/entity resolution engine — the core differentiator

2 participants