FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: improve numeric knowledge retrieval ranking by EDDIWARD · Pull Request #3621 · ModelEngine-Group/nexent · GitHub

fix: improve numeric knowledge retrieval ranking - #3621

Merged
WMC001 merged 5 commits into
developfrom
edward/bugfix-hybrid-retrieval-numeric
Aug 20, 2026
Merged

fix: improve numeric knowledge retrieval ranking#3621
WMC001 merged 5 commits into
developfrom
edward/bugfix-hybrid-retrieval-numeric

Conversation

EDDIWARD commented Aug 10, 2026
edited
Loading

Copy link
Copy Markdown
Member

Summary

This revision keeps the Bug2 fix intentionally lightweight: when the caller has not configured a hybrid-search weight, digit-containing queries use a higher accurate-search weight. Explicit caller weights are preserved.

The previous numeric phrase boost and extra exact-query processing have been removed.

Root cause

For an identifier-like query such as an alert number or IP address, semantic ranking can place a nearby-but-wrong record above the requested record. In the original flow, searching alert 01999 returned 记录01699.

Change

  • SDK hybrid search: use 0.7 accurate-search weight for digit-containing queries only when weight_accurate is omitted; non-numeric queries retain the SDK default of 0.3.
  • REST hybrid-search endpoint: retain its ordinary-query default of 0.5; use 0.7 only for digit-containing queries with no explicit weight.
  • Frontend: omit weight_accurate when the user has not configured it, so the backend/SDK can select the appropriate default.
  • No index mapping changes, no additional Elasticsearch requests, and no numeric phrase boost.

Before

With the same reproduction knowledge base and alert-number query for 01999, the agent reported the unrelated 记录01699.

After

With the lightweight routing enabled, the first retrieved result and final answer are the requested 记录01999.

Validation

  • Focused SDK regression suite: 106 passed.
  • Manual local reproduction using DeepSeek-V4-Flash and the same 1,999-row alert knowledge base: 01999 now retrieves 记录01999 first.
  • Additional identifier checks (00001, 01000, 01500, 01999, and 192.168.19.33) improved from the former 0.3 default to the intended record with the adaptive 0.7 weight.
  • Explicit caller weights and non-numeric default behavior are covered by regression tests.

codecov Bot commented Aug 10, 2026
edited
Loading

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

EDDIWARD marked this pull request as ready for review August 10, 2026 03:03
EDDIWARD changed the title fix: prioritize exact numeric knowledge retrieval fix: improve numeric knowledge retrieval ranking Aug 11, 2026
WMC001 merged commit 2e77e55 into develop Aug 20, 2026
17 checks passed
Hengaku added a commit to Hengaku/nexent that referenced this pull request Aug 26, 2026
…eam 2e77e55)

A query containing digits -- part numbers, invoice ids, versions -- now gets
0.7 accurate-search weight instead of the flat 0.5, while the REST API's
historical default is preserved for callers that pass one explicitly.

Language-independent: digits are digits in Hungarian documents too, so this
helps our tenants without any localisation work.

Upstream commit: 2e77e55 "fix: improve numeric knowledge retrieval ranking (ModelEngine-Group#3621)"

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL