I built Financial Intelligence RAG around a problem that comes up pretty quickly when working with financial documents: there is a lot of useful information, but finding the exact piece of information you need can mean digging through hundreds of pages of reports.
The project uses Retrieval-Augmented Generation (RAG) to turn that process into a conversation. Instead of reading through an entire SEC 10-K filing, annual report, or earnings call transcript just to answer one question, I can ask the system directly and get an answer grounded in the relevant parts of the original document.
I wanted the retrieval side to be just as important as the language model itself. The pipeline includes layout-aware document parsing, semantic chunking, query rewriting, hybrid retrieval, metadata filtering, contextual compression, and cross-encoder reranking to improve the chances of finding the right information before generating an answer.
I also kept the retrieval layer modular. The system can work with both ChromaDB and FAISS, while the language model can be switched between Ollama and OpenAI. This made it possible to experiment with different combinations without having to rebuild the entire pipeline whenever I wanted to change a vector database or LLM provider.
One thing I didn’t want was a chatbot that simply gives a confident-sounding answer and leaves it at that. The system therefore focuses heavily on grounding and citations. Responses can point back to the relevant pages and source material so that the information can be checked against the original financial report.
I also used RAGAS to evaluate how well the retrieval and generation pipeline was actually performing. Metrics such as Faithfulness, Answer Relevancy, Context Precision, and Context Recall helped me identify cases where the system retrieved the wrong context or produced an answer that wasn’t sufficiently supported by the available evidence.
The project is exposed through FastAPI and includes a Gradio interface for interacting with the system. I also containerized the application with Docker, making it easier to run the different pieces together without having to manually configure the entire environment.
What I found most interesting while building this was that making a RAG system useful isn’t just about connecting a PDF to an LLM. The real challenge is everything in between: how the document is understood, how information is retrieved, how relevant context is selected, and how the final answer proves where it came from.
The end result is a financial research assistant that can take large collections of financial documents and turn them into something much easier to explore, while still keeping the original sources close to the answers.