Inspiration
Financial pricing and interchange decisions depend on multiple sources of information, changing market conditions, business policies, and accurate calculations. While generative AI can help people understand complex information, relying on a language model alone for financial arithmetic can produce unreliable results. I wanted to explore a better approach: combining AI-powered knowledge retrieval with deterministic calculations, traceable data, and responsible decision-support controls. This led to PICI-Agent, a platform designed to make complex business analysis more explainable and auditable.
What it does
PICI-Agent is an AI-powered decision-support platform for merchant pricing, payment interchange, and market revenue analysis.
Its key capabilities include:
Knowledge-grounded answers: Uses retrieval-augmented generation (RAG) to retrieve relevant business-policy documents and support analytical explanations with evidence.
Deterministic financial analytics: Separates numerical calculations from language-model generation to calculate revenue, margins, comparisons, and differences using application logic.
Time-aware analysis: Records analysis identifiers, timestamps, and market-data snapshots to support reproducibility.
Data provenance: Uses document metadata, SHA-256 hashes, and data-status labels to make information easier to trace.
Responsible AI controls: Includes validation and boundaries for unsupported questions and markets.
Interactive interfaces: Provides a Streamlit dashboard and a FastAPI-powered web interface for exploring analytical results.
The repository uses synthetic demonstration data. It is an educational decision-support prototype, not a source of live market information or financial advice.
How we built it
PICI-Agent uses Python as its primary language, with FastAPI for API services and Streamlit for the interactive dashboard.
The architecture combines LangGraph and LangChain for workflow orchestration, FAISS for vector retrieval, SQLite and SQLAlchemy for structured data, and supporting data-processing and visualization libraries.
The analysis workflow separates the main responsibilities: identifying the query type, retrieving relevant policy evidence, selecting the applicable data snapshot, computing financial metrics deterministically, and validating the resulting analysis before presenting it to the user.
This separation is important because financial calculations need to be reproducible, while AI-generated explanations need to remain grounded in relevant evidence.
The project also includes automated tests and configuration for local execution, with a documented deployment approach for a web-based environment.
Challenges we ran into
One of the central engineering challenges was separating natural-language reasoning from numerical computation. A fluent explanation is not sufficient when a business decision depends on accurate financial metrics.
Another challenge was maintaining consistency between retrieved policy information, structured market data, timestamps, and the final analytical response. Data provenance and validation help make the analysis easier to inspect.
Supporting different execution environments also requires careful handling of configuration, data persistence, dependencies, and errors.
These considerations shaped the architecture around traceability, deterministic calculations, explicit boundaries, and testability rather than relying on a single generative model to perform every task.
Accomplishments that we're proud of
Designed an architecture that separates AI-based information retrieval from deterministic financial calculations.
Incorporated time-aware analysis records and data-snapshot provenance.
Built document retrieval and analytical workflows for complex business questions.
Added responsible-AI boundaries for unsupported questions and markets.
Created interactive interfaces for examining analytical outputs.
Organized the project with setup instructions, configuration examples, and an automated test suite.
The main accomplishment is bringing these capabilities together into one coherent decision-support application, with an emphasis on making results more transparent and reviewable.
What we learned
This project reinforced the importance of choosing the right tool for each task. Language models are useful for interpreting questions and explaining results, but structured calculations should be handled by deterministic application logic.
We also learned that trustworthy AI systems need more than generated answers. Relevant evidence, reproducible inputs, validation, clear limitations, and understandable interfaces are equally important.
Finally, building an analytical workflow highlighted how architecture, testing, data quality, and user experience must work together for a system to be useful.
What's next for PICI-Agent: Auditable AI Decision Support
Future improvements include richer conversational workflows, clearer evidence exploration, stronger evaluation of retrieval quality, and additional integrations that allow users to access analytical capabilities through structured tools.
The longer-term goal is to make complex decision-support workflows easier to use while preserving traceability, numerical consistency, and appropriate human oversight.
Log in or sign up for Devpost to join the conversation.