CoolFace
Apppublic

Viraj0601/agentic-rag-eval-lab

sourceHugging Faceupdated 4mo agoView on Hugging Face
0likes
App README

Agentic RAG + Eval Lab

A live demo showcasing agentic AI, hybrid RAG (FAISS + BM25), LLM evaluation, and observability — built for Hugging Face Spaces on free CPU.

Live demo: [add your Space URL here]

What it does

  • —Tab 1 — Agent Chat: Chat with an agent over a preloaded sample corpus. Retrieves relevant chunks, generates grounded answers with citations, and (in later phases) shows tool-call traces.
  • —Tab 2 — Eval Lab: Run a fixed eval set and measure recall@k, hit rate, and latency (Phase 4).

Tech stack

LayerChoice
UIGradio
HostingHugging Face Spaces (CPU basic)
LLMGroq (Llama 3.x)
Embeddingssentence-transformers (all-MiniLM-L6-v2)
RetrievalFAISS (dense) + rank-bm25 (sparse)
PDF parsingpypdf

Local setup

bash
python -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env        # add your GROQ_API_KEY
python app.py

If you're behind a corporate proxy with SSL issues when downloading the embedding model, add HF_SSL_VERIFY=false to your .env (local dev only; not needed on HF Spaces).

Screenshots

<!-- Add screenshots after deployment --> | Agent Chat | Eval Lab | |---|---| | screenshot placeholder | screenshot placeholder |

Deploy to Hugging Face Spaces

  1. 1.Create a new Space (SDK: Gradio, hardware: CPU basic).
  2. 2.Push this repo to the Space.
  3. 3.Add GROQ_API_KEY as a Space secret (Settings → Variables and secrets).
  4. 4.The Space auto-builds from requirements.txt and launches app.py.

License

MIT — sample corpus text is original and public-domain style.