How ranveerd/coursemate-ai works
Book RAG Assistant accepts a PDF and a question through its Streamlit interface. The app loads and splits the PDF, stores embedded chunks in Chroma, retrieves relevant chunks for each question, builds a context-grounded prompt, and displays Gemini’s answer. The graph also includes the separate batch indexer documented by its source. The README describes the same principal stages; runtime wiring beyond the sampled files is not assumed.
Main entry points: app.py Streamlit App · create_database.py Batch Indexer · chroma-db Chroma Store · deeplearning.pdf Sample PDF
Components 12
User Interface
- Streamlit App
app.py - Displayed Answer
app.py
Document Ingestion
- PDF Loader
app.py - Text Splitter
app.py - Local Embeddings
app.py - Batch Indexer
create_database.py - Sample PDF
Document Loaders/deeplearning.pdf
Retrieval and Storage
- Chroma Store
chroma-db - MMR Retriever
app.py
Answer Generation
- Context Prompt
app.py
Other components
- User
- Google Gemini
Connections 20
- User → Streamlit App: uploads PDF
- User → Streamlit App: asks question
- Streamlit App → PDF Loader: loads PDF
- Streamlit App → Text Splitter: splits pages
- Streamlit App → Local Embeddings: creates vectors
- Streamlit App → Chroma Store: stores chunks
- Sample PDF → Batch Indexer: provides input
- Batch Indexer → PDF Loader: loads PDF
- Batch Indexer → Text Splitter: splits pages
- Batch Indexer → Local Embeddings: creates vectors
- Batch Indexer → Chroma Store: stores chunks
- Streamlit App → MMR Retriever: creates retriever
- Streamlit App → MMR Retriever: submits query
- MMR Retriever → Chroma Store: searches chunks
- MMR Retriever → Streamlit App: returns chunks
- Streamlit App → Context Prompt: builds context
- Streamlit App → Google Gemini: sends prompt
- Google Gemini → Streamlit App: returns response
- Streamlit App → Displayed Answer: renders answer
- Displayed Answer → User: shows response