
Financial Analyst Chatbot
AI-powered financial analysis assistant for brokers
TL;DR — I built an AI chatbot to provide fast, contextual financial analysis based on in-house research, enabling brokers to scale personalized client support without scaling headcount.
Stack: Python, LangGraph, Gemini 2.5 Pro, PDF ingestion, vector search | GitHub
The bot answers user questions by:
- Reads the company or industry-specific reports relevant to the question
- Finds the key information needed to answer, if it exists
- Synthesizes an accurate, natural-language answer
- Cites the sources used
During testing, we found that using underlying model such as Gemini 2.5 Pro yielded reliable answers, and that the the bot will correctly identify when information is missing to answer.
Code and documentation available: Github — AI Financial Research Assistant
Thanks to Hugo Bosch — financial research professional and AI enthusiast — for his clear vision on how LLMs can address challenges in finance and for helping shape this work.
Context
Financial brokers publish research reports and provide personalized advice — but answering individual client questions requires deep expertise and doesn’t scale with headcount alone. The goal: let brokers query their own research corpus in natural language, with cited answers.
A Q&A chatbot with access to in-house financial reports can answer technical questions from clients—accurately, instantly, and with source citations.
Design Philosophy
Retrieves the Right Report
The chatbot uses cues from the user's question (e.g. company name, report date, type) to select the most relevant report from a structured list of reports (e.g. "FPT_Q1Y25.pdf", "FPT_Q2Y25.pdf",...).
Cites the source
Every answer comes with the exact report name and section, enabling clients or compliance teams to audit the result.
Avoid hallucination
If the answer isn't available in the report, the chatbot says so—making it reliable for high-stakes environments like finance.
Understands financial language
Thanks to a glossary of synonyms and definitions, plus clarification-seeking prompts, the chatbot handles varied client inputs without confusion.
Agent architecture
There are two main workflows in this system -- a data ingestion workflow and a chatbot workflow (inference).
The data ingestion workflow takes the raw report PDF files and structure them into readable data when addressing user queries. Think of it as a file management portal where the admin can upload new reports files to extend the knowledge base of the chatbot.
Data ingestion system design

The inference workflow takes user inputs via the chatbot interface, process them by calling a cloud hosted LLM and accessing self-hosted report data if needed, and replies to the user.
The chatbot system is built around a modular function-calling architecture where the model can perform the following actions:
- get_date()
- list_reports()
- read_report(report_name)
For example:
> User asks: “What was the value of FPT in Q1?”
> Bot logic:
get_date() → "17-07-2025"
list_reports() → "FPT_Q1Y25.json", "FPT_Q4Y24.json"
read_report("FPT_Q1Y25.json") → "FPT shares rose to 1000 VND this quarter"
Answer: "The value of FPT in Q1Y25 is 1000 VND."
Chatbot (inference) system design

Chatbot (inference) workflow

Why it matters
This approach is not just a proof-of-concept. It demonstrates that generative AI + structured financial data can:
- Reduce workload on sales and research teams
- Improve client responsiveness and satisfaction
- And scale operations without increasing headcount
For brokers, this is a glimpse of how AI can augment expertise and automate insight delivery.