Added scope_tags column to knowledge base entries with GIN index; retriever now hard-filters by detected department (CS, Engineering, Business, Pharmacy, etc.) before ranking.
Dominance gate: if top result scores ≥ 1.5× the second, only the best match is sent to the AI — eliminates cross-department answer leakage.
Switched default model to gpt-4o-mini at reasoning_effort: minimal; fallback to gpt-4o only for borderline-confidence queries with KB context.
Prompt tightened: max_completion_tokens 512 → 220, temperature 1.0 → 0.3, history budget capped at 1,500 tokens per call.
Hybrid retrieval (pgvector cosine + lexical) shipped behind HYBRID_RETRIEVAL_ENABLED flag for future activation.
Frontend KB entry form: scope-tag chip selector and optional Urdu / Pashto Roman content fields.
v0.8.0Apr – May 2026
Feature
Admin panel — full feature set
Conversation threads with real-time SSE updates and message bubbles supporting text, images, audio, and documents.
Smart handoff queue: assign, tag, resolve, and track SLA per ticket.
Dead letter queue view: inspect failed WhatsApp deliveries and retry individually or in bulk.
Blocked numbers list: block by SHA-256 phone hash, unblock with audit trail.
Analytics dashboard: messages per day, auto-resolve rate, avg confidence, smart handoff breakdown — powered by Recharts via next/dynamic.