How urveebettadapur/contextiq works
ContextIQ is a small, single-script RAG question-answering application. Its workflow loads and chunks a local knowledge file, embeds and indexes the chunks in Chroma, retrieves relevant chunks for a user question, builds a grounded prompt, and generates an answer with Ollama-hosted Llama 2. The README also documents local embedding and vector storage. The source confirms the basic pipeline; it does not show separate ingestion modes, APIs, or interfaces.
Main entry points: rag.py Chroma Store · knowledge.txt Knowledge Base
Components 12
Knowledge Ingestion
- Knowledge Base
knowledge.txt - Text Chunking
rag.py - Chunk Documents
rag.py - Text Embeddings
rag.py - nomic-embed-text
Semantic Retrieval
- Chroma Store
rag.py - Similarity Search
rag.py
Grounded Generation
- Retrieved Context
rag.py - Grounded Prompt
rag.py - Llama 2
- Grounded Answer
rag.py
Other components
- Questioner
Connections 13
- Knowledge Base → Text Chunking: read by
- Text Chunking → Chunk Documents: split into
- Chunk Documents → Chroma Store: indexed by
- Text Embeddings → nomic-embed-text: calls
- Chroma Store → Text Embeddings: uses for indexing
- Questioner → Similarity Search: submits question
- Similarity Search → Chroma Store: searches
- Chroma Store → Similarity Search: returns matches
- Similarity Search → Retrieved Context: provides matches
- Retrieved Context → Grounded Prompt: added to
- Questioner → Grounded Prompt: question added to
- Grounded Prompt → Llama 2: sent to
- Llama 2 → Grounded Answer: generates