AI Fiscal Attribution Platform
Program
- Program: AI Incubation for Public Sector
- Supported by:
- Pijar Foundation
- AMANA
- British Embassy Jakarta
- UK International Development
- UK Indonesia Tech Hub
- Role: AI Technical Mentor for One of the Top 5 Selected Teams
- Location: Jakarta, Indonesia
- Date: July - September 2026
AI for Public Sector is an innovation program that brings together AI practitioners and public-sector stakeholders to develop and pilot AI solutions addressing real-world public-sector challenges in Indonesia.
Developing an AI-powered solution for Kementerian Keuangan (Kemenkeu) to analyze government spending and identify how budget allocations contribute to strategic programs and priorities, enabling more data-driven and effective public-sector decision-making.
Sources: aiforpublicsector.id
Overview
Kementerian Keuangan wants to know how government spending contributes to national development goals, starting with stunting. Today analysts read spending records one by one, which is slow, inconsistent and depends on a few experts. This platform automates that analysis while keeping people in control of uncertain cases. I built it as a complete reference solution for the team I mentored, so they could learn from working code and compare it with their own.
Main Features
- Ingestion: reads raw Excel spending ledgers into clean, structured records
- Harmonization: maps each regional spending line to a standard national sub-activity code
- Tagging: checks each record against the government's existing stunting decisions
- AI classification: for records with no existing decision, an AI agent decides Related or Not Related, with a category (Spesifik, Sensitif, Dukungan), a confidence score and a reason
- Evidence: the agent searches past government decisions by meaning and shows the precedents it used
- Human review: a queue where analysts approve or correct the AI's decisions
- Analytics: spending attributed to the theme, by category and confidence
- Not only stunting: designed so a new theme doesn't need a new system
Tech Stack & Libraries
The stack
| Layer | Built with |
|---|---|
| Backend | Python · FastAPI · PostgreSQL (plain SQL with psycopg) · Docker Compose |
| AI | OpenAI through LangChain; one tool-calling classification agent |
| Semantic search | Pinecone with multilingual-e5-large embeddings, 537 tagged activities |
| Frontend | Next.js 16 · React 19 · shadcn/ui · Tailwind CSS · Recharts |
Engineering highlights
- Agentic only where it helps: ingestion, harmonization and tagging are deterministic code; only classification is an AI agent.
- Measured, then fixed: a 20-record precision test found a systematic false-positive pattern; after the fix, "Related" went from 10 to 4 with no over-correction.
- 100× faster: spending records moved into Postgres.
- Explained as it was built: 13 documentation chapters, one per pipeline step, with real examples.