Spaces:
Sleeping
Sleeping
Commit History
-
v0.4.0-beta: chitchat short-circuit + rate-limit bump for live demo
Two fixes triggered by live issues on screenireland-eolas.vercel.app. 1. "Hi" / "Hello" now returns a friendly welcome instead of the IDK message. New app/intents.py runs anchored regexes BEFORE the gate; greetings, thanks, and "what can you do?" hit a canned reply with zero LLM cost. Real questions ("Hi, what is Section 481?") still go through the full RAG pipeline. 2. Rate limit bumped 20 → 60 requests/minute per IP. Friends behind the same Wi-Fi share an IP via NAT; 20/min exhausted within seconds during demos, making the bot look broken for everyone after the first burst. Override per-deployment via RATE_LIMIT_CHAT env var. Eval unchanged: 30/30 pass, MRR 0.927, nDCG@10 0.942.1fce8c7 -
v0.4.0-alpha: cross-encoder reranking + eval harness with CI gate
Phase 0 — fixes the v0.3.x "head of Screen Ireland → wrong person" vocab-mismatch bug on the live HF deployment. - Cross-encoder reranker (flashrank + ms-marco-MiniLM-L-12-v2, ~22 MB ONNX, no torch). Dense top-20 → rerank → top-5. Relevance gate still runs on the dense score so OOC negatives are still rejected. - Targeted query expansion at rerank time only (head/runs/leads/boss → chief executive/ceo). Surgical, not generative. - Reranker pre-warmed in the Docker image alongside BGE so HF cold starts have no network fetch. - RERANK_ENABLED / RERANK_TOP_N / RERANK_MODEL settings; /health reports reranker state. Phase 1 — eval harness so quality is measurable. - 30-question stratified eval set (vocab-mismatch / entity-lookup / fact-lookup / multi-hop / OOC-negative). - Recall@5, Recall@10, MRR, nDCG@10 metrics (binary relevance). - LLM-as-judge faithfulness scorer (NVIDIA Llama 70B). - GitHub Action eval gate: blocks merge on Recall@5 < 0.85 or OOC refusal rate < 0.90. R…310c2f8
-
Initial commit — Stage 1 POC complete (1A–1E)
Stage 1A — Ingestion: async crawler (2,551 pages + 196 PDFs), trafilatura + PyMuPDF extraction, heading-aware chunking (~600t/80t overlap) with category + lang tagging. 13,414 chunks. Stage 1B — Indexing: 11,995 English chunks embedded with bge-small-en-v1.5 via fastembed (ONNX, no torch dependency) into LanceDB. Stage 1C — Retrieve+Answer: FastAPI /chat (SSE) with two safeguards — retrieval relevance gate (0.35 threshold) and strict grounding prompt (citations + prompt-injection defense). Gemini Flash primary, Groq fallback, Anthropic Claude paid-switch ready via provider abstraction. Stage 1D — Widget: self-mounting vanilla JS widget in a Shadow DOM (style-isolated), streams from /chat via fetch + SSE parser. Stage 1E — Eval: 15-question battery (10 answerable + 4 IDK + 1 prompt injection) scoring gate / answered / cited / refused / leaked_prompt. Baseline: 15/15 (100%) with --delay 7 (under Gemini's 10 RPM).9345109