Spaces:
Sleeping
Sleeping
Commit History
-
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