FinNova 📈
A conversational financial document analyst powered by Amazon Nova and RAG — built in a few hours to learn retrieval-augmented generation from scratch.
Inspiration
I wanted a hands-on way to learn RAG in preparation for a larger upcoming project. The hackathon was the perfect excuse to spend a few hours going from zero to a working conversational AI over financial documents — and to experiment with Amazon Nova as the LLM backbone.
What It Does
FinNova is a Streamlit chat app that lets you ask questions about financial documents:
- Pre-indexed knowledge base — financial PDFs in
docs/are chunked, embedded, and stored in ChromaDB at startup - Upload your own PDF — tax returns, financial statements, or any document you want the assistant to reference as personal context
- Conversational memory — follow-up questions work naturally; the assistant understands pronouns and references from earlier in the chat
- Two-LLM pipeline — a fast rephraser rewrites your question into a standalone query using chat history, then Nova answers using the retrieved documents
The retrieval scoring uses cosine similarity over embedded chunks. For a query $q$ and document chunk $d$, the relevance score is:
$$\text{score}(q, d) = \frac{\vec{q} \cdot \vec{d}}{|\vec{q}||\vec{d}|}$$
The top $k=5$ chunks are passed as context to the answering LLM.
How I Built It
Tech Stack
| Layer | Technology |
|---|---|
| UI | Streamlit |
| Main LLM | Amazon Nova (nova-pro-v1) via langchain_amazon_nova |
| Rephraser LLM | Groq llama-3.3-70b-versatile (temperature=0) |
| RAG chains | langchain_classic — create_history_aware_retriever, create_retrieval_chain, create_stuff_documents_chain |
| Vector store | ChromaDB |
| Embeddings | OpenAI text-embedding-3-large |
Learning Arc
- Started with a basic
prompt | llmchain and a simple retriever (the CLI inmain.py) - Learned LangChain's conversational chain abstractions and refactored
app.pyto usecreate_history_aware_retriever+create_retrieval_chainfor proper memory - Wired in a second LLM (Groq) as a zero-temperature rephraser to improve retrieval quality on follow-up questions
Key constraint: Used ChatAmazonNova directly rather than going through AWS Bedrock, due to credential complexity and request limits during the hackathon.
Accomplishments That I'm Proud Of
- Went from knowing nothing about RAG to shipping a working conversational RAG app with memory in a few hours
- The two-LLM architecture — using a cheap, fast model to rephrase and a powerful model to answer — is a pattern I'll carry forward
- Learned by building, not just reading docs
Challenges
- LangChain chain abstractions —
create_history_aware_retriever,MessagesPlaceholder, andcreate_stuff_documents_chainall had subtle wiring requirements that took time to understand - Two-LLM coordination — getting the rephraser output to feed cleanly into the retriever, then into the answering chain, required understanding how LangChain passes state between chain components
@st.cache_resourceand session state — cached LLM instances don't re-initialize when the temperature slider changes, a subtle Streamlit gotcha
What's Next for FinNova
The current version is intentionally simple — a foundation for learning. The next version is a full rethink:
- Multimodal input — voice dictation as the primary input method
- LaTeX output — financial formulas and equations rendered as $\LaTeX$ instead of plain text, e.g.
- Voice → LaTeX editor — the real goal: a tool that lets you speak financial calculations and get back structured, editable math notation
- Beyond RAG — richer document understanding using Nova's multimodal capabilities (tables, charts, scanned PDFs)
Log in or sign up for Devpost to join the conversation.