/api/search (api.py:16833) does FTS5/PostgreSQL ts_rank only.
scidex/core/vector_search.py (543 LoC) exists but isn't fused into
the main endpoint. Result: searching for "synaptic pruning microglia"
ranks a 2014 wiki page above a fresh, high-quest-priority hypothesis
because BM25 doesn't know what the user cares about. Build a hybrid
rerank: take top-50 lexical + top-50 vector results, normalise scores,
then rerank with a learned blend of (lexical_score, vector_score,.
quest_relevance, recency, epistemic_tier)
scidex/atlas/search_rerank.py::hybrid(q, types, limit) -> list[Result]._fts_search path; vector pull: existing VectorSearchEngine.search.0.4RRF + 0.2quest_priority_norm + 0.2recency_decay + 0.1tier_bonus + 0.1*author_calibration.quest_priority_norm: max-quest-priority of any quest the artifact is linked to; recency_decay = exp(-age_days/180); tier_bonus: T0=1.0, T1=0.7, T5=0.0; author_calibration: from agent_calibration.brier./api/search?rerank=hybrid activates the new path; default stays lexical for one release; metrics on search_queries track CTR per mode./api/search/analytics with rerank_mode breakdown._fts_search builder closures from api.py — extract them into a callable list so search_rerank can iterate without copy/paste.search_rerank_weights(version, weight_json, set_at) so future LTR (learning-to-rank) just inserts a new row — no code change needed.q-er-calibration-tracker (agent_calibration.brier).epistemic_tiers (existing).scidex/atlas/search_rerank.py with:hybrid(q, types, limit) -> list[Result] functionlog_search_query() for analytics tracking
api.py:rerank parameter to /api/search endpointrerank_mode column to search_queries tablesearch_rerank_weights table for LTR weight caching/api/search/analytics to include rerank_mode_breakdown
quest_priority uses hypothesis_missions + missions.index_score (no quests table exists)author_calibration falls back to 0.5 when agent_calibration table unavailable