finance_ops · finance · workflow

Q4 Inc. builds a RAG and SQL generation Q&A chatbot on Amazon Bedrock for investor relations data

Investor Relations Officers at Q4's customers needed an intuitive, fast way to query diverse financial datasets including CRM, ownership records, and stock market data via natural language, but standard LLM approaches — pre-training, fine-tuning, and RAG with embeddings — all produced suboptimal or prohibitively expensive results for numerical and structured financial data.

How it works
Common implementation structure
How this type of workflow is generally built, generalized across documented cases — not tied to any one vendor's stack. Click any stage to read what happens there. Specific products that implement these stages appear in “Tools commonly seen” below.
Stage 1 · User question received
The user submits a question in natural language as the starting input to the system.
Tools used
Amazon BedrockLangChainSQLDatabaseChainClaude V2Claude InstantTitan Text Express
Outcome

The SQL generation approach satisfied all functional and non-functional requirements: Q4 was satisfied with the SQL quality for both simple and complex queries, and the end-to-end latency came within the acceptable range of single-digit seconds.

What failed first

Pre-training was resource-intensive and cost-prohibitive, requiring continuous incremental training as new time-series data arrived. Fine-tuning showed initial success but suffered from model hallucination on nuanced queries. RAG with semantic search and embeddings was suboptimal for numerical data because embeddings from numbers struggled with similarity ranking and returned incorrect information.

Results
Time savedsingle-digit seconds
Source

https://aws.amazon.com/blogs/machine-learning/how-q4-inc-used-amazon-bedrock-rag-and-sqldatabasechain-to-address-numerical-and-structured-dataset-challenges-building-their-qa-chatbot?tag=soumet-20

How we source this →

Grounding & classification
Source type: technical build writeup
24 fields verified against source quotes.
chatbotdata extractionragsummarizationknowledge basefailure mode describedmetric backednamed customersource backedtools describedworkflow describedfinancial servicessoftwareaccuracy improvementcycle time reductiontechnical build writeupfinance opsrag answering