Skip to content

Financial Analyst Chatbot

November 2024·6 min read

AI-powered financial analysis assistant for brokers

Financial Analyst Chatbot

TL;DRI 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 an underlying model such as Gemini 2.5 Pro yielded reliable answers, and that 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 structures them into readable data for answering user queries. Think of it as a file management portal where the admin can upload new report files to extend the knowledge base of the chatbot. The inference workflow takes user input via the chatbot interface, calls a cloud-hosted LLM, and pulls in self-hosted report data as needed to reply to the user.

Data ingestion
PDF reports
Broker research
Parse & structure
Per report, per section
Knowledge base
Structured & queryable
Inference
User query
Retrieve context
LLM synthesis
Cited answer

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)

Here's a real exchange, end to end:

Worked example
Q"What was the value of FPT in Q1?"
1 get_date() "17-07-2025"
2 list_reports() "FPT_Q1Y25.json", "FPT_Q4Y24.json"
3 read_report("FPT_Q1Y25.json") "FPT shares rose to 1000 VND this quarter"
A"The value of FPT in Q1Y25 is 1000 VND."
Source: FPT_Q1Y25.json

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.



LLM · chatbot · finance