Hello everyone,
I’m part of a team developing a chatbot for financial document Q&A using LLM. Our current process involves:
- Uploading financial reports (PDF, TXT, CSV, PNG) and streaming stock data.
- Chunking documents.
- Embedding chunks and storing them in Chroma DB (vector database).
- Retrieving relevant information and generating answers.
We’re using OpenAI’s LLM and Langchain for Retrieval-Augmented Generation (RAG). Initial development was done in Jupyter Notebook, and I now have a stockagent.py file that I want to convert into a Streamlit web app.
I have a few key questions:
- What’s the best approach to convert a Jupyter Notebook .py file to a Streamlit web app?
- How can I implement an interactive, multi-round Q&A system using Langchain’s memory for ongoing conversations? (The current notebook has hardcoded Q&A interactions.)
- I am considering designing a better UI to allow users to: a) Select different knowledge bases to query. b) Select different LLMs to generate answers. c) Provide references to answers, similar to Perplexity.
Based on my research, I saw people splitting stockagent.py into multiple files:
One for defined functions.
One for document embedding and storing multiple documentations in a single vector DB.
One for LLM retrieval and answer generation.
One is the main UI Streamlit app.py.
I am a beginner using Streamlit and I like what I have experienced so far. I really want to use some cool and advanced features from Streamlit to make it work.
Any advice or tips would be greatly appreciated!
Thanks,
Andrew