homelab-codex-ws/services/kb-query/app
oskar a640cf1455 feat(kb-retrieval,kb-query): add hybrid retrieval mode (faza mailowa Krok 3)
Mail (gmail) envelopes never get a document_summary (Decyzja 6 -- a mail
"summary" would usually be longer than the mail itself), so they're invisible
to the cascade's stage-1 pre-filter. hybrid_retrieve runs the existing
cascade for summarized sources (paperless) and, in parallel, a direct chunk
scan restricted to summaryless_sources (gmail), merging both by dist -- same
embedder/cosine space, so the merge is a plain sort, no re-normalization.
hybrid_query mirrors cascade_query (one shared query embed).

kb-query: mode pattern extended to ^(cascade|flat|hybrid)$, /search routes
"hybrid" to hybrid_query. Default mode stays "cascade" until the quality gate
(plan §8) PASSes on the full mail corpus -- flipping the default, and
deploying this to the running kb-query container, are separate follow-ups
for the operator; this task only adds the code path + tests
(docs/kb/modules/05-faza-mailowa-plan.md, §6, Krok 3).
2026-07-23 17:06:49 +02:00
..
static feat(kb-query): add search frontend (module 5 phase 4, plan §7, Krok 4) 2026-07-22 16:49:36 +02:00
templates feat(kb-query): add search frontend (module 5 phase 4, plan §7, Krok 4) 2026-07-22 16:49:36 +02:00
db.py feat(kb-query): add search frontend (module 5 phase 4, plan §7, Krok 4) 2026-07-22 16:49:36 +02:00
links.py feat(kb): add kb-query service skeleton (search API, no ingress yet) 2026-07-22 16:06:18 +02:00
main.py feat(kb-retrieval,kb-query): add hybrid retrieval mode (faza mailowa Krok 3) 2026-07-23 17:06:49 +02:00
search.py feat(kb-retrieval,kb-query): add hybrid retrieval mode (faza mailowa Krok 3) 2026-07-23 17:06:49 +02:00
startup.py feat(kb): add kb-query service skeleton (search API, no ingress yet) 2026-07-22 16:06:18 +02:00