forked from zovos/vk_hackathon
1.4 KiB
1.4 KiB
AI Update Log
Scope
- File:
search/main.py - Purpose: fixed and extended retrieval/rerank pipeline according to TODO items.
Done Changes
- Switched base query selection to
question.search_textwith fallback toquestion.text. - Added support for
question.variantsas additional query variants in retrieval. - Added support for
question.hydeas additional dense-only queries. - Added support for
question.keywordsas the primary source for sparse query text with fallback to current query variant. - Stopped losing retrieval candidates after rerank: rerank is applied to head (
RERANK_LIMIT), tail candidates are preserved. - Added deduplication of retrieval points by Qdrant point id before rerank.
- Implemented score aggregation by
message_id(sum of chunk scores mapped to same message). - Limited final response to
top-50message ids viaFINAL_TOP_K = 50. - Final output message ids are now selected from aggregated scores (sorted by score desc, tie-break by message_id).
Notes
- Earlier step introduced direct
message_idsdeduplication before response. - Current logic supersedes this by ranking and selecting unique
message_idvalues from aggregated scores.
Verification
- Syntax check passed after each main change:
python -m py_compile search/main.py.
How To Use This Log
- Treat this file as the source of truth for already completed
search/main.pytasks. - On next tasks, read this file first to avoid duplicate edits.