This project is a production-grade AI Speech processing Agent that reads long text, chunks it, embeds it, performs semantic retrieval using ChromaDB, and generates accurate query response using Mistral LLM through Ollama — all running locally and fully containerized with Docker Compose.
AmbedkarGPT-Intern-Task/
├── main.py → Main RAG pipeline
├── requirements.txt → Python dependencies
├── speech.txt → Input file for summarization
├── docker-compose.yml → Multi-container setup (App + ChromaDB)
├── Dockerfile → Python app image
├── .dockerignore
└── README.md
- Reads any
.txtdocument or speech - Splits text into overlapping semantic chunks
- Embeds chunks using Sentence-Transformers
- Stores embeddings in ChromaDB
- Retrieves relevant chunks via vector similarity
- Processes queries using Mistral LLM via Ollama
- Fully containerized with Docker Compose
- Works fully offline — full privacy
- Reproducible setup and single-command runs
- Python
- LangChain
- Sentence-Transformers
- ChromaDB
- Ollama (Mistral LLM)
- Docker & Docker Compose
- Git
Install the following before running the project:
- Docker: https://www.docker.com/products/docker-desktop/
- Git: https://git-scm.com/downloads
- Ollama (must be installed on the host machine): https://ollama.com/download
Pull the Mistral model (host): ollama pull mistral
git clone https://github.com/Busted-pinch/AmbedkarGPT-Intern-Task.git
cd AmbedkarGPT-Intern-Task
Edit or replace the file named speech.txt in the repo root.
- Must be plain
.txt - Can be long or short
- This is the file the agent will generate a response for the query
ollama serve
You should see: Listening on 127.0.0.1:11434
Keep this terminal open.
sudo docker compose up --build
What this does:
- Builds the Python app image
- Installs Python dependencies inside the container
- Starts ChromaDB (persisted in a Docker volume)
- Connects the app to ChromaDB and Ollama
- Runs the pipeline
- Loads
speech.txt - Splits into chunks (default chunk size: 1000, overlap: 100)
- Generates embeddings with Sentence-Transformers
- Persists embeddings to ChromaDB
- Performs semantic search for the query
- Retrieves the top relevant chunks
- Sends retrieved text to Mistral via Ollama
- Prints the final response to stdout/logs
Sample output format: --- SUMMARY ---
Ensure Ollama is serving on host: ollama serve
Pull the model on host: ollama pull mistral
Reset the Chroma volume and rebuild: sudo docker volume rm ambedkargpt-intern-task_chroma_data sudo docker compose up --build
The app is designed to run the pipeline and exit. For interactive debugging, you can start a shell in the app container: sudo docker compose run --rm app bash
- A concise, context-aware response printed in the logs
- RAG-driven results produced using local LLM inference and vector search
- Reproducible results on any machine with the prerequisites installed