- Add max_chunks: 50 gate in upload.py β docs >50 chunks skip contextual
retrieval entirely with logged warning (~17 min hang for 104-chunk files)
- Trim full_doc_text context from [:3000] to [:1500] in both sync and async
contextualization paths β drops TPM burst from ~3240 to ~2115, below 3000
TPM free-tier window, reducing 429s for smaller docs
- Update contextual retrieval model to openai/gpt-oss-20b (llama-3.1-8b-instant
being decommissioned by Groq)
- Same model update propagated to eval script judge defaults
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
10-sample eval on BF Q3 / NPCI UPI / RBI FY2024 corpus via Groq + Euron embeddings.
Fix score extraction: use to_pandas().mean() instead of results[] dict access.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat: RAGAS benchmark driven by JSON, local runner scriptβ
- frontend/src/data/ragas_benchmark.json: source of truth for benchmark scores
- EvalPanel imports JSON directly (no more hardcoded values)
- scripts/run_ragas_local.py: run RAGAS locally against ChromaDB, saves to JSON
Works locally (asyncio loop); not on Render (uvloop incompatible with nest_asyncio)
Usage: python scripts/run_ragas_local.py --n 10
Then commit updated ragas_benchmark.json to update dashboard
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>