fix(rag): category filter + reranker-grounded source documents + grounding flag
Cherry-pick of the El Salvador RAG fixes onto main (El-Salvador-only observability/gpu commits excluded).
What
- Retriever category filter: bump langchain-arangodb 0.0.4 → >=1.2.0 in the retriever Dockerfile. 0.0.4 silently ignored filter_clause (no FILTER in the AQL), so category/label selection had no effect.
- chatqna grounding: source documents now reflect the reranker verdict (not raw retriever cosine hits); is_grounded flag emitted in the stream metadata; empty view URL (clients build it from their public base).
- backend: forwards chatqna's in-stream metadata instead of re-running a filter-less retriever call.
- web + mobile: grounding flag (AI-generated) when is_grounded=false, else confidence bar.
- config: RERANKING_THRESHOLD/STRATEGY/TOP_N moved to chatqna (the orchestrator that reads + forwards them) and removed from the reranker service.
Commits
- fix(rag): apply category filter + reranker-grounded source documents
- fix(chatqna): read reranker verdict from correct orchestrator key
- fix(compose): put RERANKING_THRESHOLD/STRATEGY/TOP_N on chatqna
- fix(compose): remove RERANKING_* from reranker service
- fix(chatqna): emit empty view URL
Validation
Validated end-to-end on the El Salvador deployment (apiary/aquaculture/grain queries). Tests: chatqna 79, backend 162, frontend ChatBotComponent 74, mobile 20, retriever 48 — all green. Cherry-pick verified clean on this branch (same test results).