How sathisvi25-oss/ai_assistant- works
This is a Streamlit book-question-answering app. A user uploads a PDF, which the app saves and sends through PDF loading, chunking, embedding, and FAISS indexing. For a question, the app calls the RAG module, which loads the index, retrieves relevant passages, formats a grounded prompt, and invokes Gemini; the app displays the returned answer. The sampled source shows these runtime calls and data transfers. The README is only a title, so additional capabilities are not documented.
Main entry points: rag.py RAG functions · app.py Streamlit app · faiss_db FAISS index · uploaded_files Uploaded PDF
Components 12
User interface
- Streamlit app
app.py - Generated answer
app.py
Document indexing
- Uploaded PDF
data/uploaded_files - PDF loader
rag.py - Text splitter
rag.py - Embedding model
rag.py - FAISS index
faiss_db
Question answering
- RAG functions
rag.py - Passage retriever
rag.py - Grounded prompt
rag.py - Gemini model
Other components
- User
Connections 20
- User → Streamlit app: uploads or asks
app.py - Streamlit app → Uploaded PDF: saves PDF
app.py - Streamlit app → RAG functions: calls process_pdf
app.py - RAG functions → PDF loader: loads PDF
rag.py - PDF loader → Text splitter: provides documents
rag.py - RAG functions → Text splitter: splits documents
rag.py - RAG functions → Embedding model: creates embeddings
rag.py - RAG functions → FAISS index: builds and saves
rag.py - Streamlit app → RAG functions: calls ask_question
app.py - RAG functions → FAISS index: loads index
rag.py - RAG functions → Embedding model: configures for load
rag.py - RAG functions → Passage retriever: creates and invokes
rag.py - FAISS index → Passage retriever: provides search
rag.py - Passage retriever → Grounded prompt: supplies passages
rag.py - RAG functions → Grounded prompt: formats question
rag.py - RAG functions → Gemini model: invokes model
rag.py - Grounded prompt → Gemini model: provides prompt
rag.py - Gemini model → Generated answer: returns response
- RAG functions → Streamlit app: returns answer
app.py - Streamlit app → Generated answer: displays answer
app.py