This repository contains a Retrieval-Augmented Generation (RAG) implementation built with LangChain, ChromaDB, and Ollama.
The project demonstrates how a local LLM can answer user questions by retrieving relevant context from a small set of documents stored in a vector database.
This implementation focuses on core RAG concepts rather than full-scale optimization or sector-specific experimentation.
- LangChain β RAG pipeline and LLM interface
- ChromaDB β Vector store for similarity search
- Ollama β Local LLM runtime
- Ollama Embeddings β Vector embeddings for documents
- A set of local documents is defined in the script
- Documents are converted into embeddings using OllamaEmbeddings
- Embeddings are stored in ChromaDB
- User questions are matched against the vector store
- The most relevant document is retrieved
- The retrieved context is injected into the LLM prompt
- The LLM generates an answer based on the retrieved context
- Zeynep Col has lived in NYC for 10 years.
- Zeynep Col is an imaginary LLM engineer in the movie 'The Matrix'.
- New York City's subway system is the oldest in the world.
When the script is executed, the following steps occur in order:
- Available Ollama models are listed from the local Ollama runtime
- The user selects a model interactively
- The user enters questions in a continuous loop
- The system retrieves the most relevant document from ChromaDB
- The retrieved context is injected into the LLM prompt
- The LLM generates and prints the final response
During execution, the program prints:
- The user question
- The retrieved RAG context
- The final prompt sent to the LLM
- The LLM-generated response
This output flow makes it easy to observe how retrieval affects the final answer.
This runtime-focused README documents the interactive behavior and output structure of the RAG system.
It complements the main README by explaining how the system behaves during execution and how retrieved context influences LLM responses.
Contributions are welcome!
For any queries or collaborations, feel free to reach out!
π GitHub: zeynepcol
π€ LinkedIn: zeynep-col
