
Building Financial Pandit: Automating Financial Data and Knowledge Ingestion
- Purvish Shah
- AI Agents
- 03 Dec, 2026
Part 2 of my Financial Pandit series: designing two Azure ingestion pipelines to bring personal financial transactions and public financial knowledge into the application.
In Part 1, I walked through how I evolved Financial Pandit from a local CrewAI application into a Docker-based application hosted on Azure.
I covered the four-agent architecture, FastAPI, LibreChat, Azure Container Apps, PostgreSQL, and Microsoft Entra ID authentication. The application was running in Azure, and I could ask questions about financial transactions already stored in PostgreSQL, but one important capability was still missing: how would users get their financial data into the application?
I wanted to move beyond manually loading transactions into the database. Users should be able to upload their own bank and credit card statements and have the application process them automatically.
I also wanted Financial Pandit to retrieve information from public financial websites, making that knowledge available to the AI application.
These requirements led me to design two separate ingestion pipelines:
- Personal financial transaction ingestion using CSV uploads.
- Public financial knowledge ingestion using website URLs.
Both workflows start from the same upload application, but they have different processing requirements and destinations.
Introducing the Financial Pandit Upload SPA
I decided to create a separate upload application hosted in Azure Container Apps.
The SPA provides two options:
| Option | Purpose | Destination |
|---|---|---|
| CSV Upload | Import personal financial transactions | Azure Database for PostgreSQL |
| Website URLs | Ingest public financial knowledge | Azure AI Search |
I wanted to keep the user experience straightforward while allowing the backend to handle the processing asynchronously.
The architecture diagram below shows how these two workflows fit into the wider Financial Pandit Azure environment.

Pipeline 1: Personal Financial Transaction Ingestion
The first pipeline focuses on converting uploaded financial statements into structured transaction records.
In Part 1, I explained that I already use OpenAI’s Decision API to categorize transactions. At that stage, the transaction data was already loaded into PostgreSQL.
The next step is to automate the complete journey, starting with a user’s CSV upload.
Step 1: Uploading a CSV
The user signs in to the Financial Pandit Upload SPA, a Single Page Application running in an Azure Container App, using Microsoft Entra ID authentication. After signing in, the user selects the CSV upload option and uploads a financial statement. The SPA sends the file to an HTTP-triggered Azure Function, and I wanted the upload endpoint to handle the initial request without making the user wait for the entire transaction-processing workflow to finish.
Step 2: Storing the original file in Azure Blob Storage
The HTTP-triggered Azure Function receives the CSV file and uploads it to Azure Blob Storage.
I chose Blob Storage to retain the original uploaded file separately from the structured transaction records.
This gives the ingestion process a source file that can be retrieved for processing and provides a reference for troubleshooting or reprocessing when necessary.
Once the file is stored, the next stage is triggered automatically.
Step 3: Using Event Grid and Azure Queue Storage
When a new file is created in Blob Storage, an Event Grid event is generated and routed to Azure Queue Storage. The queue message contains the Blob path of the uploaded file. This is an important architectural decision because it separates file uploading from transaction processing: the initial HTTP request can complete without waiting for the CSV to be parsed, categorized, and written to the database, while the queue acts as the handoff between the upload process and the background processing function.
Step 4: Processing the CSV using an Azure Function
A queue-triggered Azure Function receives the message and retrieves the original CSV file from Blob Storage.
This function is responsible for processing the transaction records.
I have broken this stage into several operations:

Step 5: Storing transactions in PostgreSQL
The existing PostgreSQL schema has been designed around users, accounts, statements, transactions, and categories.
The main tables include:
| Table | Purpose |
|---|---|
application_users | Maps Entra ID identities to application users |
accounts | Stores financial account information |
statements | Tracks uploaded statements and processing status |
transactions | Stores individual financial transactions |
categories | Stores supported transaction categories |
I also want to preserve the relationship between a statement and its transactions.
For example, when a user uploads a credit card statement, the application should create a statement record and associate the extracted transactions with that statement.
This provides traceability. If a transaction needs to be investigated, the application can identify which uploaded statement it came from.
Another important consideration is user-level data isolation.
The Entra ID Object ID identifies the signed-in user, while the application maintains its own internal user UUID. The backend maps these identities and uses PostgreSQL Row-Level Security to help ensure that users can only access their own financial records.
The end result is a pipeline that converts an uploaded CSV into structured, categorized financial data.
Pipeline 2: Public Financial Website Ingestion
The second pipeline addresses a different requirement.
Financial Pandit should not only analyze a user’s own financial transactions. It should also be able to retrieve relevant information from public financial knowledge sources.
For example, users may ask questions about financial concepts, investment terminology, or other topics that require information beyond their transaction history.
For this, I designed a separate ingestion workflow that takes website URLs and indexes their content in Azure AI Search.
Step 1: Submitting website URLs
The user selects the website ingestion option in the Upload SPA and submits one or more public website URLs by clicking Start Ingestion. The SPA sends the request to an HTTP-triggered Azure Function. Unlike the CSV workflow, this process starts with URLs rather than a file upload.
Step 2: Creating an ingestion job
The HTTP-triggered Azure Function creates an ingestion job to represent the overall request.
For example, if a user submits three websites, the application creates three individual website tasks under the same parent job.
| Website task | Submitted URL | Initial status |
|---|---|---|
| Website A | URL A | PENDING |
| Website B | URL B | PENDING |
| Website C | URL C | PENDING |
The function then publishes one message per website to Azure Queue Storage.
Each message contains the ingestion job ID, website task ID, and URL.
This allows each website to be processed independently.
Step 3: Processing website URLs asynchronously
A queue-triggered Azure Function receives each website message and executes the existing Python website ingestion logic.
I wanted to reuse the Python processing logic rather than introduce a completely different ingestion implementation.
The processing workflow follows these stages:

Chunking is important because the AI application needs to retrieve relevant portions of a page rather than an entire website.
Step 4: Storing website knowledge in Azure AI Search
Azure AI Search becomes the destination for the public website ingestion pipeline.
Unlike PostgreSQL, which stores structured financial records, Azure AI Search provides a searchable index for retrieving relevant content.
The website ingestion process prepares the content so that the AI application can search across it and retrieve useful information when a user asks a question. I also want to track the processing status of each website so that, if three websites are submitted and two are successfully indexed, the application can show that result rather than treating the entire request as a single success or failure. This is why I am separating the parent ingestion job from the individual website tasks.
Why two separate ingestion pipelines?
Although both workflows begin in the same SPA, I decided to keep their processing logic separate.
The reason is simple: the data and processing requirements are different.
| Area | CSV ingestion | Website ingestion |
|---|---|---|
| Input | CSV file | Website URLs |
| Initial storage | Azure Blob Storage | Job and task metadata |
| Trigger | Blob Created event through Event Grid | HTTP-triggered job creation |
| Queue | Transaction queue | Website ingestion queue |
| Processing | Parsing, validation, categorization | Crawling, extraction, chunking |
| AI capability | OpenAI Decision API | Azure OpenAI embeddings |
| Destination | PostgreSQL | Azure AI Search |
Both pipelines use Azure Functions and Queue Storage, but they should be independently scalable and manageable.
For example, processing a CSV statement is different from crawling several websites and generating embeddings for hundreds of pages.
Separating the queues and workers gives me more flexibility around concurrency, retries, and failure handling.
It also means that a website ingestion failure does not need to affect personal financial transaction processing.
Reliability and operational considerations
As I design these workflows, I also need to account for what happens when something goes wrong.
A successful upload does not automatically mean that every transaction or website page has been processed successfully.
Some of the areas I want to address include:
- Retry handling for temporary processing failures.
- Poison queues for messages that repeatedly fail.
- Duplicate detection for repeated CSV uploads.
- Idempotent processing to avoid duplicate transactions or indexed documents.
- Processing status tracking.
- Error details for failed statements and website tasks.
- Appropriate concurrency limits for website crawling.
- Monitoring of Azure Functions and queue processing.
- Preserving source information for traceability.
I also want the SPA to provide useful feedback so users can understand whether their uploads are pending, processing, completed, or failed.
These details become increasingly important as the application moves beyond a development workflow.
What’s next: Modernizing the AI agent architecture
With the ingestion architecture in place, the next phase will focus on how Financial Pandit consumes and reasons over the new data.
The application will have two distinct information sources:
- PostgreSQL for personal financial transactions.
- Azure AI Search for public financial knowledge.
The existing agents need to be reconfigured to work with the updated PostgreSQL schema and the new Azure AI Search index.
I also want to revisit the agent orchestration architecture.
I started this project using CrewAI to understand multi-agent development. As the application evolves, I plan to evaluate replacing CrewAI with Microsoft’s Agent Framework.
The next phase will also include several enterprise architecture improvements:
- Microsoft Agent Framework: Rebuild the agent orchestration and workflows using Microsoft’s framework, with clearer tool boundaries and more controlled execution.
- Microsoft Foundry: Introduce Microsoft Foundry for model management, model access, and AI evaluation capabilities.
- Azure API Management: Introduce APIM as a controlled API entry point, with authentication policies, rate limiting, and centralized API governance.
- Enterprise networking: Review VNet integration, private endpoints, private DNS, network access restrictions, and controlled outbound connectivity.
- Observability: Introduce OpenTelemetry and Azure Monitor/Application Insights to trace requests across APIs, agents, model calls, and tools.
- Security and reliability: Strengthen authorization, data isolation, prompt-injection protection, evaluation, error handling, and deployment practices.
I want to approach these changes incrementally, validating each capability rather than replacing everything at once.
Continuing the journey
Financial Pandit started as a way for me to learn how multiple AI agents could work together to answer financial questions.
Part 1 focused on moving that application from my local machine into Docker and Azure.
This part focuses on the next fundamental requirement: getting the right information into the application.
The two ingestion pipelines serve different purposes. One converts personal financial statements into structured transactions in PostgreSQL. The other converts public website content into searchable knowledge in Azure AI Search.
Together, they establish the data foundation that the AI agents will use.
The next stage is to modernize the agents and the surrounding platform so that Financial Pandit can use these data sources in a more controlled, observable, and enterprise-ready way.
The ingestion pipeline is the bridge between the data and the intelligence of the application.
This is Part 2 of my Financial Pandit series. In Part 1, I covered the evolution from a local CrewAI application to Docker and Azure. In Part 2, I focused on the two ingestion pipelines. Part 3 will explore agent modernization using Microsoft Agent Framework and the enterprise capabilities needed around it.
Explore My Krishna
You can also explore My Krishna on the App Store.
