How mehmoodosman/codebase-rag works
Codebase RAG is a Streamlit chat application for asking questions about indexed code repositories. The user selects a Pinecone namespace and submits a question; the app embeds the query, retrieves code matches, adds their metadata and text to the prompt, and requests an answer from Groq’s Llama model. Chat history is retained in Streamlit session state. The README also describes semantic search, multiple repositories, and context-aware chat. The tree contains only one runtime source file; subsystem boundaries below reflect its documented and visible responsibilities.
Main entry points: streamlit_app.py RAG query handler
Components 10
Chat interaction
- Streamlit chat
streamlit_app.py - Session history
streamlit_app.py - Namespace selection
streamlit_app.py
Code retrieval
- RAG query handler
streamlit_app.py - Query embedding
streamlit_app.py
Answer generation
- Context augmentation
streamlit_app.py
Other components
- User
- Sentence Transformers
- Pinecone index
- Groq Llama API
Connections 13
- User → Streamlit chat: asks question
- Streamlit chat → Session history: reads and writes
- Streamlit chat → Namespace selection: selects namespace
- Streamlit chat → RAG query handler: calls
- RAG query handler → Query embedding: embeds query
- Query embedding → Sentence Transformers: encodes text
- RAG query handler → Pinecone index: queries namespace
- Pinecone index → RAG query handler: returns matches
- RAG query handler → Context augmentation: formats matches
- Context augmentation → Groq Llama API: sends augmented prompt
- Groq Llama API → Context augmentation: returns answer
- Context augmentation → RAG query handler: returns answer
- RAG query handler → Streamlit chat: returns answer