Civic AI · 2024

Every voter,
their own research team.

A free, Spanish-language AI assistant that read every 2024 Panamanian presidential platform and answered voters' questions with cited, grounded text — launched weeks before the May 5, 2024 election.

Client
Public civic initiative · Panama
Year
2024
Role
Product, AI engineering, full-stack
Model
Pro-bono · Zero cost to voters
  • 6
    presidential candidates covered
  • 0
    party affiliation or political framing
  • <2s
    median response latency, with citations
  • 0
    ads, tracking, or paywalls
The problem

Platforms are unreadable.

Panama's 2024 presidential candidates each published lengthy government plans — hundreds of pages of policy prose written for committees, not for voters. Traditional media compared candidates on personality and polls; nobody was making the actual content searchable.

At the same time, electoral officials were publicly worried about AI-generated misinformation and deepfakes eroding trust. The civic gap was clear: voters needed a way to query candidates' real positions, and they needed to trust the tool itself.


The approach

Retrieval over every plan, with citations at every step.

We shipped a conversational assistant that grounded every answer in the candidates' own documents, with clickable citations. No opinions, no ranking, no paraphrasing without a source — and a hard refusal for questions the documents didn't answer.

  • Verified ingest — we collected and manually verified each candidate's official plan, chunked by policy area (health, security, corruption, water, education).
  • Custom retrieval — embeddings indexed in a vector store with source tracking, tuned for Panamanian Spanish and local political vocabulary.
  • Grounded answers — a strict system prompt forced the model to quote and cite; out-of-scope questions got a polite refusal instead of a hallucination.
  • Anti-manipulation — bias-mitigation checks, rate-limiting, and an eval suite we ran before every deploy to catch regressions and political tilt.
  • Next.js
  • OpenAI
  • Python
  • Postgres
  • pgvector
  • Vercel
  • Cloudflare

Outcome

A national conversation, built to survive scrutiny.

The assistant launched weeks before the May 5, 2024 election. Thousands of Panamanians used it to compare candidates across health, security, corruption and infrastructure. It received coverage in national media and helped set a precedent for transparent civic AI in Latin America.

AI misuse could cloud our electoral process.— Alfredo Juncá, electoral magistrate (Panama Tribunal Electoral)

Nothing about this was technically exotic. The work was in the care: verified ingestion, forced citations, refusals, latency, and the decision to never monetise civic infrastructure. That is what senior engineering looks like when it is pointed at a public good.

Visit the project