How moseskakuno/ai-knowledge-assistant works
This is a Streamlit PDF knowledge assistant. Users upload PDFs, which the app deduplicates, extracts page text, chunks it, embeds it, and stores it; questions are embedded, searched against the stored passages, and answered with source references. The app also exposes document counts, duplicate detection, and deletion. The graph follows the relationships shown in the README and sampled source; no unsampled implementation details are assumed.
Main entry points: app.py Streamlit app · rag_pipeline.py RAG answerer · embedding_service.py Embeddings · vector_store.py Vector store
Components 8
User Interface
- Streamlit app
app.py
Document Ingestion
- PDF extraction
document_processor.py - Page chunking
text_chunker.py
Question Answering
- Embeddings
embedding_service.py - RAG answerer
rag_pipeline.py
Knowledge Base
- Vector store
vector_store.py
Other components
- User
- OpenAI API
Connections 12
- User → Streamlit app: uploads, asks
README.md - Streamlit app → PDF extraction: extracts PDF
app.py - Streamlit app → Page chunking: chunks pages
app.py - Streamlit app → Embeddings: embeds chunks
app.py - Streamlit app → Vector store: checks, stores
app.py - Streamlit app → RAG answerer: asks question
app.py - RAG answerer → Embeddings: embeds question
rag_pipeline.py - RAG answerer → Vector store: searches chunks
rag_pipeline.py - Embeddings → OpenAI API: requests vectors
embedding_service.py - RAG answerer → OpenAI API: generates answer
rag_pipeline.py - Vector store → Streamlit app: returns documents
app.py - Streamlit app → User: shows sources
app.py