This repository demonstrates a Retrieval-Augmented Generation (RAG) pipeline designed to extract and synthesize information from specific documents (eg. cats information)
It features both an interactive Jupyter Notebook for a step-by-step walkthrough of the RAG logic.
The system follows a standard RAG workflow as illustrated in images/rag_logic.png:
- Ingestion: Loading
.docxfiles from thedata/directory - Chunking: Splitting documents into smaller, semantically meaningful segments
- Embedding: Generating vector representations using OLLAMA embedding models
- Vector Store: Storing embeddings in a local vector database for similarity search
- Retrieval & Generation: Fetching relevant context to augment the LLM's response using top 3 relevant information
rag_case_study.ipynb: The core notebook containing the experimental RAG pipeline.src/app.py: A Streamlit-based user interface to interact with the RAG system.data/: Contains source documents (PDFs and Word docs).images/: Visual representation of the RAG logic.requirements.txt: List of necessary Python libraries.
This project is a test and is therefore very simplist. All parts of the provided RAG system can be improved and include complex knowledge such as Energy System simulation results to support informed decisions. This is the subject of future works, stay tune :)