💡 Inspiration
Managing finances can be overwhelming—especially for individuals who are not tech-savvy or well-versed in financial terminology. I was inspired to build this Financial Agent after observing how difficult it can be for elderly individuals and even young adults to find reliable financial information or interpret stock market data. I wanted to create an AI-powered assistant that can simplify financial queries into human-like conversations, using real-time data and trusted sources.
🛠️ What I Built
This project is a Conversational Financial Agent using:
- 🧠 LangChain for tool-chaining and agent behavior
- 📊 yFinance for real-time stock data
- 📚 Wikipedia for factual knowledge
- 🧾 Pandas for data analysis
- 🎯 Google Generative AI (Gemini Pro) for reasoning and text generation
- 🖥️ Streamlit to provide an easy-to-use web interface
The agent takes user queries (e.g., "Tell me about Tesla stock performance" or "What is inflation?") and intelligently routes the task to the appropriate tool or knowledge source, then returns a detailed and friendly response.
🧠 What I Learned
- How to combine multiple tools like yFinance, pandas, and Wikipedia within an agentic AI architecture.
- How to use LangChain's agent types (like
zero-shot-react-description) to let the model choose tools dynamically. - How to build Streamlit interfaces that make AI tools accessible to users with no technical background.
- Best practices around environment management,
.envfiles, and API key safety. - The importance of prompt design and how it directly impacts the agent’s reasoning behavior.
🚧 Challenges I Faced
- Tool Output Integration: Formatting and presenting multi-step results from different tools in a unified way was tricky.
- Model Prompting: It took several iterations to design the right system prompt (
prefixandsuffix) that guides the agent to answer clearly. - Streamlit UI Limitations: Streamlit is great for quick prototypes but required extra effort to handle edge cases like empty input, error handling, and improving visual structure.
- API Errors: Occasionally faced issues with rate limits or missing API keys, which I later handled using try-except blocks and better config files.
🚀 Next Steps
- Add voice input and text-to-speech for elderly users.
- Include support for pension schemes, tax queries, and banking FAQs.
- Integrate a chat history feature so users can scroll through their financial queries.
- Add charts using Plotly or Matplotlib for better visualization of stock data.
🔗 Try It Yourself
To run this project locally:
- Clone the repository
- Install dependencies: ```bash pip install -r requirements.txt
Built With
- google-generativeai
- langchain
- pandas
- streamlit
- yfinance
Log in or sign up for Devpost to join the conversation.