How baiiraam/ml_project_task_1 works
This repository demonstrates a local Haystack RAG application backed by Qdrant and Ollama, with Kubernetes (Kind) hosting the services and HAProxy exposing Ollama on localhost. The workflow loads the Seven Wonders dataset, embeds and indexes its documents, then embeds each question, retrieves context, builds a prompt, and generates an answer. Deployment and network relationships are documented in the README; runtime component wiring is visible in rag_demo.py. Other deployment details are represented only where the README identifies them.
Main entry points: rag_demo.py RAG demo · qdrant.yaml Qdrant store · kind-config.yaml Kind cluster · haproxy.cfg HAProxy proxy
Components 15
RAG application
- RAG demo
rag_demo.py - Seven Wonders data
rag_demo.py - Document indexing
rag_demo.py - Document embedder
rag_demo.py - Qdrant writer
rag_demo.py - Question embedder
rag_demo.py - Vector retriever
rag_demo.py - Prompt builder
rag_demo.py - Ollama generator
rag_demo.py
Cluster services
- Qdrant store
qdrant.yaml - Ollama service
ollama.yaml
Local access
- HAProxy proxy
haproxy/haproxy.cfg
Cluster deployment
- Kind cluster
kind-config.yaml
Other components
- Questioner
- Hugging Face
Connections 18
- Questioner → RAG demo: runs queries
README.md - Hugging Face → Seven Wonders data: provides dataset
rag_demo.py - RAG demo → Document indexing: runs indexing
rag_demo.py - Seven Wonders data → Document indexing: supplies documents
rag_demo.py - Document indexing → Document embedder: runs embedder
rag_demo.py - Document indexing → Qdrant writer: runs writer
rag_demo.py - Document embedder → Qdrant writer: passes documents
rag_demo.py - Qdrant writer → Qdrant store: writes vectors
rag_demo.py - RAG demo → Question embedder: runs query pipeline
rag_demo.py - Question embedder → Vector retriever: passes embedding
rag_demo.py - Vector retriever → Qdrant store: retrieves vectors
rag_demo.py - Vector retriever → Prompt builder: passes documents
rag_demo.py - Prompt builder → Ollama generator: passes prompt
rag_demo.py - Ollama generator → HAProxy proxy: sends generation request
rag_demo.py - HAProxy proxy → Ollama service: proxies requests
README.md - Kind cluster → Qdrant store: hosts service
README.md - Kind cluster → Ollama service: hosts service
README.md - RAG demo → Qdrant store: connects via port-forward
README.md