CoolFace
Apppublic

Izhaar8455/voice-rag-msmarco-xi

sourceHugging Facemitupdated 1mo agoView on Hugging Face
0likes
App README

Voice RAG over MSMARCO-XI

Built for Hacker House Goa 2026, Task 2. Ask a question by voice or text in seven languages; the answer is grounded in retrieved passages, and the interface shows which passages were used, where the milliseconds went, and why a question was or was not answered.

  • —691,786 passages across Hindi, Bengali, Tamil, Marathi, Urdu, Telugu and English
  • —One FAISS HNSW index per language, SQLite for chunk text and provenance
  • —Chunking chosen by measurement, not preference: five strategies scored on 7,000 labelled queries using the dataset's own is_selected relevance flags
  • —Guardrails in layers: input filter, retrieval confidence gate, prompt constraint, post-hoc groundedness check with one stricter retry

Source, evaluation harness and the full write-up: see the GitHub repository.

Required Space secrets

namepurpose
GROQ_API_KEYanswer generation, openai/gpt-oss-20b
ELEVENLABS_API_KEYstreaming speech to text, scribe_v2_realtime
ARTIFACT_REPOdataset repo holding the prebuilt index, e.g. you/voice-rag-artifacts
HF_TOKENonly if ARTIFACT_REPO is private

Set STT_PROVIDER=elevenlabs as a variable so the app does not prefer an unfunded Sarvam key.

First boot

The Space downloads roughly 2.6 GB of prebuilt index from ARTIFACT_REPO, because Space disks are not persistent and the index is far too large to commit next to the code. Expect several minutes on the first start and on any restart after the Space sleeps. Subsequent queries are fast: retrieval is about 15 ms.

Known limits on this deployment

  • —Free Spaces sleep after inactivity; the first request afterwards pays the artifact download again.
  • —Groq's free tier allows roughly 8,000 tokens per minute, so concurrent traffic can rate-limit. The pipeline backs off using the server's own reset headers and degrades to an abstention rather than an error.
  • —Marathi and Urdu are text-only. There is no speech path for them here because no voice was available to test them with.