TransparentApe
Open map of LATAM public works that auto-flags contract irregularities, with a WhatsApp data agent
Selected project at hack@latam 2026 (Transparency & Corruption track, 15–17 May). Didn’t take the top prize, but it made the selected round — and it’s one of the builds I’m most proud of.
El billete deja huella. Lo grabamos. — public money should leave a trail; TransparentApe records it.
In Peru and LATAM, public spending exists in open data (OCDS, OECE, INFOBRAS) but it’s fragmented, raw, and never crossed. A citizen can’t find out in seconds who got paid, how much, whether the work exists, and whether the contractor has sanctions. Corruption hides in the friction of searching.
What it does
- 🌎 Interactive 3D globe of public works (Peru + Chile) with filters by country, region and risk level
- 🚩 Automatic red-flag detection — crossing RUC ↔ sanctions / penalties / judicial disqualifications (OECE)
- 🔬 Forensic panel per project: weighted severity score + timeline of events
- 🛰️ OCDS ↔ INFOBRAS crossing — real physical progress, site photos and coordinates from the Comptroller
- 📸 Street View before/after comparator and an immersive 360° / VR view of each work’s location
- 💬 Spanish WhatsApp agent — ask the database questions in natural language
The WhatsApp agent
A production-grade conversational bot over Postgres: two-tier intent recognition (regex fast-path → LLM + tools), a ReAct loop with ~14 typed tools (buscar_obras, ranking_contratistas, investigar_contratista, inhabilitados, streetview_obra…), durable per-wa_id state with message dedup, and Groq models (llama-3.1-8b-instant for routing/synthesis, llama-3.3-70b-versatile for SQL) guarded with statement_timeout and mandatory LIMIT.
Architecture
Open sources → ETL (Python) → Postgres (Supabase) → App + Agent
OCDS · OECE · INFOBRAS · ChileCompra
download → filter → geocode → crossref → load → cron refresh
Built with a teammate crew at hack@latam — multi-country from day one (country / city in the schema), scalable across LATAM.
Learnings
- Two-tier intent recognition (cheap regex Tier 1, LLM Tier 2) keeps the WhatsApp agent fast and cheap — most messages never hit a model, only ambiguous ones pay for an LLM call
- A ReAct tool-use loop with ~14 typed tools plus conversational carry-forward ("obras en Piura" → "¿y el ranking?") lets people drill into data without repeating context every message
- Splitting Groq models by job — a small fast one for routing/synthesis, a bigger one for SQL generation — with mandatory statement_timeout and LIMIT keeps a natural-language-to-SQL agent both safe and responsive
- Cross-referencing RUC across OCDS contracts and OECE sanctions is what turns raw open data into an automatic red-flag signal — the value is in the join, not any single source
- Cron-refreshed ingestion keeps the map a living dataset instead of a one-off hackathon snapshot