🛡️ Project Story: AUDITIA – AI-Driven Public Expenditure Oversight
Inspiration
Our inspiration stems from two powerful mandates: the Vision 2030 pillar of building an "Ambitious Nation"—committed to high performance and accountability—and a critical local issue: the lack of transparency in public spending platforms like those used in Colombia. We realized the data exists, but the human capacity to audit it does not. Countless cases of corruption (e.g., inflated prices, abnormal contracts) are hidden in plain sight because manual review is too slow and resource-intensive. We were inspired to build the technological bridge that transforms stagnant big data into proactive, actionable corruption alerts, fulfilling the promise of a truly transparent government.
What it does
AUDITIA is a real-time, three-layered AI platform designed to restore accountability in public finance. It monitors public spending and automatically flags high-risk transactions.
- AI Detection (Vertex AI): It analyzes massive streams of public spending data, identifying anomalies and *outliers* (e.g., purchases significantly above market price or suspicious vendor patterns) using Unsupervised Machine Learning models.
- Forensic Explanation (Gemini API): When a high-risk transaction is flagged, the Gemini API is instantly queried to generate a concise, natural language forensic report explaining why the transaction is suspicious (e.g., "This item price is 400% above the historical median").
- Active Transparency: It democratizes data by providing an AI-powered public query tool where citizens and officials can ask complex questions about spending in plain language.
How we built it
We implemented AUDITIA entirely within the Google Cloud ecosystem, prioritizing a robust, scalable architecture built during the hackathon:
- Data Foundation (P1): We loaded our simulated public spending dataset into BigQuery and wrote custom Python code to perform Feature Engineering on Vertex AI Workbench. This included calculating the Price Deviation Score (\(\sigma_{dev} \)) for each transaction based on its category's historical mean and standard deviation.
$$ \sigma_{dev} = \frac{( Value_{trans} - \mu_{category})} {\sigma_{category}} $$
- ML Pipeline (P2): We trained an Isolation Forest model on Vertex AI using the engineered features. We deployed the model as a Vertex AI Endpoint, providing a real-time, scalable anomaly detection API.
- Orchestration (P3): We wrote a Cloud Function/Run service in Python to act as the central API. This service handles the query, contacts the Vertex AI endpoint for the risk score, and then calls the Gemini API.
- Generative AI Integration (P4): The Gemini API was integrated using specialized Prompt Engineering to transform the raw numerical anomaly score (our core payload) into the final human-readable alert.
Challenges we ran into
The primary technical challenge was managing the ML-to-LLM handoff.
- Data Fidelity: Ensuring the Isolation Forest model accurately captured the nuances of price anomalies within highly varied public spending data.
- Prompt Engineering Fidelity: Achieving consistent and reliable forensic reports from Gemini. The challenge was designing a prompt that was specific enough to provide a high-quality explanation without hallucinating or introducing false information, relying only on the anomaly score and the transaction details.
Accomplishments that we're proud of
We are most proud of the seamless, three-tier integration we achieved:
- Vertex AI → Gemini Synergy: Successfully passing the output of a traditional Machine Learning model (Vertex AI) directly into a sophisticated Large Language Model (Gemini) to generate context and value-added alerts.
- Full Cloud Stack: Building a fully functional, serverless prototype using the complete Google Cloud stack, proving the solution is instantly scalable to national-level data volumes.
- The 'Why': Moving beyond simple flags and statistics to provide the "why" behind the corruption alert, which is the necessary step for human auditors to take action.
What we learned
We learned the critical importance of MLOps principles when combining different AI modalities. We gained deep expertise in:
- BigQuery Integration: Mastering how to use BigQuery as a data source for model training via Vertex AI, and how to query it efficiently.
- Prompt Engineering: Understanding that the quality of the generative AI output is almost entirely dependent on the rigor and specificity of the input prompt, a skill crucial for any modern AI application.
What's next for AUDITIA
AUDITIA has a clear roadmap for real-world application:
- RAG Enhancement: Integrate the Gemini API with BigQuery using a Retrieval-Augmented Generation (RAG) pipeline to allow the model to consult actual aggregated data and provide more nuanced, data-backed answers to citizen queries.
- Time Series Analysis: Upgrade the anomaly model to include Time Series Analysis to predict and flag future potential price gouging or contract anomalies before they occur.
- Deployment Pilot: Seek a partnership with a government entity to test AUDITIA against real, anonymized public spending data, driving direct, measurable social impact.
Built With
- cloud-functions/cloud-run
- gemini-api
- google-bigquery
- google-cloud
- numpy
- pandas
- python
- scikit-learn
- streamlit
- vertex-ai
Log in or sign up for Devpost to join the conversation.