teleo-infrastructure/telegram
m3taversal e17e6c25db
Some checks failed
CI / lint-and-test (pull_request) Has been cancelled
feat: two-pass retrieval with sort order and graph expansion
lib/search.py — shared search library:
- Pass 1 (default): top 5 from Qdrant, score >= 0.70, no expansion
- Pass 2 (expand=True): next 5 via offset=5, score >= 0.60, plus
  graph expansion from YAML frontmatter edges. Hard cap 10 total.
- Sort order: cosine desc → challenged_by → other graph-expanded
- result_type internal tag for stable sort (direct/challenge/graph)
- Module-level constants for easy threshold tuning post-calibration
- Structural file exclusion (_map.md, _overview.md)
- Within-vector dedup via _dedup_hits()

Caller updates:
- kb_retrieval.py: retrieve_vector_context() calls search(expand=True)
- diagnostics/app.py: search endpoint passes expand query param
- Argus imports from lib/search.py via sys.path (no longer owns search)

Tests: 5 new tests covering pass1-only, pass2 expansion, hard cap,
sort order, challenges-before-other-expansion.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 22:34:45 +00:00
..
bot.py feat: atomic extract-and-connect + stale PR monitor + response audit 2026-03-28 22:34:20 +00:00
kb_retrieval.py feat: two-pass retrieval with sort order and graph expansion 2026-03-28 22:34:45 +00:00
market_data.py epimetheus: sync VPS-deployed code to repo — Mar 18-20 reliability + features 2026-03-20 20:17:27 +00:00
teleo-telegram.service epimetheus: source archive restructure — inbox/queue + inbox/archive/{domain} + inbox/null-result 2026-03-18 11:50:04 +00:00
worktree_lock.py epimetheus: sync VPS-deployed code to repo — Mar 18-20 reliability + features 2026-03-20 20:17:27 +00:00
x_client.py epimetheus: fix article content parsing — contents[] array, not text field 2026-03-23 15:30:59 +00:00
x_search.py epimetheus: direct tweet lookup via /tweets?tweet_ids= endpoint 2026-03-23 15:17:11 +00:00