Spaces:
Paused
Paused
metadata
title: OSH Agentic RAG
emoji: π€
colorFrom: purple
colorTo: blue
sdk: docker
pinned: false
tags:
- ml-intern
π€ OSH Agentic RAG
An agentic RAG system that uses tool-calling to answer legal questions about Kenyan OSH law.
How it works
Unlike traditional RAG (retrieve β generate), this agent decides what to do:
- Receives question β analyzes what information is needed
- Calls tools β
search_documentsorsearch_specific_act - Reviews results β decides if it has enough context
- Generates answer β with citations to specific Acts/sections
Architecture
| Component | Role | Size |
|---|---|---|
| Qwen3 1.7B (Q4_K_M) | Agent brain with tool-calling | 1.1 GB |
| BGE-small-en-v1.5 | Semantic search embeddings | 130 MB |
| FAISS | Vector similarity search | β |
Speed
Expected ~10-20s per response on free HF CPU (vs 75-90s for the non-agentic version).
API
from gradio_client import Client
client = Client("Rofati/osh-agentic-rag")
result = client.predict("What are noise exposure limits?", api_name="/ask")