Skip to content

fix: pin exact EIP/ERC number matches to top of search results#91

Merged
samcm merged 1 commit intomasterfrom
fix/eip-number-search
Mar 20, 2026
Merged

fix: pin exact EIP/ERC number matches to top of search results#91
samcm merged 1 commit intomasterfrom
fix/eip-number-search

Conversation

@parithosh
Copy link
Copy Markdown
Member

Summary

  • Searching eip-4844 returned numerically similar EIPs (4834, 1844) instead of the actual EIP-4844
  • Root cause: embedding model treats short identifiers as semantically similar, and containsText never checked the Number field
  • Added extractEIPNumber to parse EIP/ERC numbers from queries (e.g. eip-4844, ERC-20, EIP 4844) and pin exact matches to score 1.0

Test plan

  • TestExtractEIPNumber — table-driven tests for various query formats
  • TestEIPSearchExactNumberMatch — verifies EIP-4844 is top result when searching "eip-4844"
  • Existing TestEIPSearchIndex still passes
  • Manual: rebuild server, run panda search eips "eip-4844" and verify 4844 is the top hit

🤖 Generated with Claude Code

Searching "eip-4844" returned numerically similar EIPs (4834, 1844) instead
of the actual EIP-4844 because the embedding model treats short identifiers
as semantically similar and the text-match boost wasn't checking the Number
field. Add extractEIPNumber to parse EIP/ERC numbers from queries and pin
exact matches to score 1.0.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@samcm samcm merged commit bb5d8de into master Mar 20, 2026
4 checks passed
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.

2 participants