Skip to content

fix(entity-gate): avoid false abstain on topic phrases + date fragments - #15

Merged
benjsmith merged 1 commit into
mainfrom
fix/entity-gate-topic-phrases
Sep 16, 2026
Merged

benjsmith merged 1 commit into
mainfrom
fix/entity-gate-topic-phrases

Conversation

@benjsmith

Copy link
Copy Markdown
Owner

Summary

  • Stop entity_gate from false-abstaining when a query mixes a long topic phrase with abbreviated months / numeric date fragments (e.g. “Mar 4th, 2024”). Abbreviated months are stopwords; numeric date fragments are skipped; exact identity resolves before longest-first fuzzy suppression; duplicate n-grams that resolve to the same page collapse.
  • graph.py rebuild now emits degraded, wiki_embeddings_reason, and degraded_reason when embeddings are configured but skipped or incomplete.
  • Motivating case: kb_qa/36-style questions about career-development discussion meetings in a dated week; fix is general robustness, not eval-key hardcoding.

Test plan

  • python3 -m unittest tests.test_entity_gate -v (24 tests OK, including test_topic_phrase_and_abbreviated_date_do_not_false_abstain)
  • Spot-check retrieve on a topic+date query against repair-v18 wiki: target career-development page in seeds; n_hits > 0

Abbreviated months and numeric date fragments are no longer treated as
entity mentions; exact identity resolves before longest-first fuzzy
suppression; duplicate n-grams to the same page collapse. Rebuild now
flags degraded when embeddings are enabled but skipped.

Signed-off-by: benjsmith <benjamincharlessmith@gmail.com>
@benjsmith
benjsmith merged commit fc2efe6 into main Sep 16, 2026
@benjsmith
benjsmith deleted the fix/entity-gate-topic-phrases branch September 16, 2026 19:34
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.

1 participant