Back to Aarogya Atlas
Architecture · 5 planes · 12 tools · critic-verified

How Aarogya Atlas thinks

Five planes — UI, supervisor, twelve tools, critic, data. The supervisor (GPT-OSS-120B via Groq, OpenAI-compatible function calling) coordinates the tools in a streaming loop, and every final answer is then graded by a critic pass — a second call to the same Groq model with a strict critic prompt — that issues a 0–100 trust score + structured flags before the user sees it (or reports "critic unavailable"). Vision triage routes to Gemini Flash-Lite (cloud) when GOOGLE_API_KEY is set, else on-device medgemma; capability extraction runs on Groq when GROQ_API_KEY is set, else on-device Ollama; everything else runs in Postgres or Databricks. Hover any tool to see what it does.

UI PlaneNext.js 16 · MapLibreSupervisorGPT-OSS-120B · Groq12 Toolsmanual streaming loopCriticTrust 0–100 · PASS / WARN / FAILcritic verdict streamed back to UI on every answergeocodeNominatim → lat/lonfacility_searchPostgres + Haversineextract_capabilities_from_noteCloud LLM in the demo; local Qwen on Oll…check_hoursFHIR HealthcareService hoursstatus_feedCrowd-sourced live updatessemantic_intake_searchbge-m3 on Ollama (multilingual)databricks_vector_searchMosaic AI VS Delta Sync Indexestimate_journeyKSRTC bus + auto-rickshawtotal_out_of_pocketMGNREGA wage-loss + treatment + transpor…trust_score7 contradictions + 5 metadata signals + …find_medical_desertsDistrict-level coverage gapsvalidate_recommendationPASS / WARN / FAIL with cited evidenceData PlanePostgres 17 + pgvector · Databricks (UC + Genie + MLflow + Mosaic VS) · Ollama
Hover a tool to inspect.
UI Plane
  • ·Next.js 16 + React 19 + MapLibre + framer-motion
  • ·Server-Sent Events stream the trace + final answer
  • ·Map shows clusters, heatmap, 3D buildings, ranked DOM pins, OSRM routes, desert overlay
Supervisor
  • ·Groq SDK — openai/gpt-oss-120b (free tier, 30 RPM / 1,000 RPD)
  • ·OpenAI-compatible function calling, max_iterations=14
  • ·Manual streaming loop — no LangGraph, no LangChain
  • ·Provider-agnostic loop — swap Groq → Cerebras with one config change
12 Tools
  • ·Trust Scorer with a rule-based 80% band
  • ·Validator agent (PASS/WARN/FAIL)
  • ·Optional on-device Qwen 2.5 32B + bge-m3 when run locally
  • ·Mosaic AI Vector Search for cloud retrieval
  • ·Cost ranker: ₹ + travel time + MGNREGA wage-loss
Critic
  • ·Mandatory second-pass LLM verification on every supervisor answer
  • ·Strict rubric: -25 for unscored facility, -25 for high-stakes without validate, -20 for hallucinated capability, etc.
  • ·Returns 0-100 trust score + PASS/WARN/FAIL + structured flags
  • ·Streamed as a typed event so the banner appears as soon as it lands
  • ·Answers the brief's 'how do you account for messy data' question by surfacing every contradiction the supervisor missed
Data Plane
  • ·Postgres 17 + pgvector — local Lakebase analog
  • ·Databricks Unity Catalog · Genie · MLflow · Mosaic AI VS
  • ·Cloud vision: Gemini Flash-Lite (live demo path)
  • ·On-device fallback: Ollama (Qwen 2.5 32B + bge-m3 + medgemma 27B) — hospital-VPC mode
  • ·PHI mask UDF on patient_phone column