How ys-pundir/teslafi-groq-rag works
TeslaFi-Groq-RAG provides multi-turn question answering over Tesla annual reports. Users submit a question through the Streamlit interface or the console chat; the application retrieves relevant chunks from Chroma, adds retrieved context to the conversation, and sends the conversation to Groq for a grounded answer. Conversation history is persisted separately. The README documents semantic retrieval and context-aware generation; the sampled code confirms these responsibilities, though the Streamlit excerpt omits part of its request-handling path.
Main entry points: streamlit_app.py Chunk retrieval · app.py Console chat · chroma.sqlite3 Chroma store · tsla-20231231-gen.pdf Annual report
Components 11
User interfaces
- Streamlit chat
src/streamlit_app.py - Console chat
src/app.py
RAG pipeline
- Chunk retrieval
src/streamlit_app.py - Context assembly
src/streamlit_app.py - Grounded answer
src/streamlit_app.py
Conversation state
- Conversation history
src/streamlit_app.py - History file
src/streamlit_app.py
Data and inference
- Chroma store
data/tesla_db/chroma.sqlite3 - Annual report
data/tesla-annual-reports/tsla-20231231-gen.pdf - Groq inference
Other components
- User
Connections 14
- User → Streamlit chat: asks
- User → Console chat: asks
- Streamlit chat → Chunk retrieval: requests chunks
- Console chat → Chunk retrieval: requests chunks
- Chunk retrieval → Chroma store: searches
- Chroma store → Chunk retrieval: returns matches
- Chunk retrieval → Context assembly: supplies chunks
- Context assembly → Conversation history: adds context
- Conversation history → Groq inference: sends messages
- Groq inference → Grounded answer: returns response
- Grounded answer → Streamlit chat: displays
- Grounded answer → Console chat: displays
- Conversation history → History file: loads and saves
- Annual report → Chroma store