Financial operations of a FIDC
Conversational intelligence for financial analysis
Applying artificial intelligence to financial queries, indicators and projections in natural language.
- Context
- Financial operations of a FIDC
- Period
- 2024
- My role
- Concept, solution design, development and technical experimentation
- Technologies
- Python, SQL, OpenAI API, language models and WhatsApp integration
- Status
- Working proof of concept, not deployed to production
The challenge
“How can users query financial indicators and get analyses without depending on manually prepared reports or on using Business Intelligence tools directly?”
In the financial operations of a FIDC (a Brazilian receivables investment fund), the volume of transactional data can be high, and information relevant to decision-making depends on applying specific business rules and calculations.
The idea was to try out a conversational interface that could turn questions asked over WhatsApp into financial queries, indicators, reports and projections.
The challenge was not only connecting an AI model to the database, but defining how the data would be retrieved, processed and presented in a consistent way.
My contribution
I conceived and developed a prototype in Python, integrating a language model through the OpenAI API, a database and a conversational interface on WhatsApp.
I was responsible for structuring how the application worked, exploring different strategies for retrieving and processing the data and defining which indicators and analyses would be available.
The development involved decisions about the technology used, the agent's logic, the calculation methods and how results would be presented.
The project was run as a proof of concept, so that alternatives could be tested before considering a possible operational deployment.
The solution
The prototype let users ask questions in natural language and get financial information through a conversation. The features developed included:
- Queries of financial indicators (KPIs).
- Retrieval of information from a database.
- Generation of analytical reports.
- Queries about the fund's operated volume (VOP).
- Financial projections based on the available information.
The application used Python to connect the components of the solution and run the query and processing steps.
The AI took part in interpreting requests and presenting results, with different calculation strategies evaluated during experimentation.
Technical and product decisions
Building the prototype involved decisions that went beyond implementing a conversational agent.
Choosing the API and the language model
One technical decision involved evaluating the available models and APIs, including solutions from OpenAI and Gemini. The development described here used the OpenAI API directly.
The choice of technology had to consider the ability to interpret financial requests, integration with the Python application, processing limits and the feasibility of running the proposed features.
Defining the indicators offered
Another decision was establishing which information made sense in a conversational interface.
Rather than exposing everything in the database, it was necessary to define relevant indicators, calculation rules and answers users could understand. The features tested included KPI queries and VOP projections.
Dynamic queries versus predefined queries
Two approaches to retrieving information were tested:
The comparison made it possible to explore the trade-off between flexibility in interpreting questions and control over access to and processing of the information.
Calculations by the model versus Python
Two analytical processing strategies were also tested:
These alternatives made it possible to investigate how to divide responsibilities between the language model and conventional analytical processing.
Interactive demo
Try the flow of a financial query. Select a question, choose the query strategy and the calculation strategy, and follow how the agent processes the question, up to the result and the natural-language answer.
Agent response
Sample responseSimulation with synthetic financial data
1What came in
What was December's VOP?
2How it was processed
- Query
- Predefined SQLQuery vop_by_period, 2024‑11 to 2024‑12. Returned: 2 rows.
- Calculation
- Calculations run in Python and presented by GPTPython calculates the monthly change; GPT only writes the answer.
3What came out
| Change vs Nov 24 | +6.6% |
|---|
Answer sent
December 2024 VOP was R$ 65.7M, +6.6% compared with November.
Interpretation
December came in above the six-month average (R$ 64.1M).
Calculated in code: with the same data, the same request always produces the same number.
Technical flow
- WhatsAppMessage received
What was December's VOP?
- ModelThe model interprets the request
{ "intent": "query_vop", "period": "2024-12" } - ApplicationThe application runs a predefined SQL query
-- predefined query: vop_by_period SELECT month, vop FROM monthly_vop WHERE month BETWEEN :start AND :end ORDER BY month; -- parameters: start = 2024-11, end = 2024-12
- DatabaseThe database returns 2 rows
2024-11 61.6 2024-12 65.7
- PythonPython runs the calculations
change = vop["2024-12"] / vop["2024-11"] - 1
- ModelGPT presents the answer in natural language
The final text appears in the Agent response panel.
What matters in this combination
Predefined SQL: more control over the data retrieved and the rules implemented, covering the anticipated questions.
Calculations in Python: the application calculates programmatically and the model handles interpretation and presentation in natural language.
In this demo, every route reaches the same number; in a real system, it is the reliability of each route that has to be assessed.
Demonstrated results
The project resulted in a working proof of concept of conversational intelligence applied to financial analysis.
The solution made it possible to try indicator queries, report generation and VOP projections from natural-language requests.
The development also made it possible to compare different query and processing strategies, assessing how language models could be combined with programmatic calculations.
The solution was not deployed to production, so there are no adoption, productivity or operational financial impact metrics to report.
Limitations and lessons
The development revealed challenges in using language models to work with large volumes of financial data.
What I would take into a next version
If the project were resumed, the next steps would be to strengthen validation mechanisms, query control, systematic evaluation of answers and monitoring of the application's behavior.
The architecture could also separate more explicitly the steps of interpreting the question, running the queries, calculating the indicators and generating the answer.
These points are possible next steps, not features actually implemented in the original prototype.