How bwanab/rag_ollama works
This small example builds a local RAG question-answering loop. On startup, it either loads an existing Chroma collection or reads the sample text, embeds it, and creates an index; it then accepts questions and prints answers. The README also identifies Ollama as the local model runtime and Chroma as the vector database. The graph shows calls and data flow visible in starter.py; retrieval internals of LlamaIndex are not shown, so those relationships are omitted.
Main entry points: starter.py RAG CLI · cd_post.txt Review Text
Components 10
Application
- RAG CLI
starter.py
RAG Components
- Directory Reader
starter.py - Vector Index
starter.py - Query Engine
starter.py - Ollama Embeddings
starter.py - Ollama LLM
starter.py
Local Data
- Review Text
cd_data/cd_post.txt - Chroma Collection
starter.py
Other components
- Questioner
- Ollama Runtime
Connections 12
- Questioner → RAG CLI: enters question
README.md - RAG CLI → Directory Reader: loads documents
starter.py - Review Text → Directory Reader: provides text
starter.py - RAG CLI → Vector Index: builds or loads
starter.py - RAG CLI → Ollama Embeddings: configures
starter.py - RAG CLI → Chroma Collection: opens or creates
starter.py - RAG CLI → Query Engine: creates
starter.py - Vector Index → Query Engine: creates engine
starter.py - RAG CLI → Query Engine: submits question
starter.py - RAG CLI → Questioner: prints answer
starter.py - Ollama Runtime → Ollama Embeddings: serves locally
README.md - Ollama Runtime → Ollama LLM: serves locally
README.md