Skip to content

Commit a23bd41

Browse files
committed
adding the README for the RAG + Distilled folder
1 parent 58f9e86 commit a23bd41

1 file changed

Lines changed: 63 additions & 0 deletions

File tree

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Apollo 11 RAG & Distilled Model Evaluation
2+
3+
This notebook demonstrates a **Retrieval-Augmented Generation (RAG)** system
4+
using data from the **Apollo 11 mission**.
5+
It uses **LangChain**, **HuggingFace**, and **ChromaDB** to load, embed, and
6+
query textual data, then evaluates responses using a set of pre-defined prompts
7+
from a JSON file.
8+
9+
---
10+
11+
## Project Description
12+
13+
The notebook `Apollo11_rag&distilled.ipynb` contains a structured RAG pipeline
14+
with four main parts:
15+
16+
1. **Data Loading** – Reads Apollo 11 mission text data from a JSON file.
17+
2. **Database Creation** – Builds a local ChromaDB vector store for semantic
18+
search.
19+
> This step should be run **only once**, as it creates and saves the
20+
database locally.
21+
3. **Query & Generation** – Retrieves relevant context for a given question and
22+
uses a model to generate an answer.
23+
4. **Evaluation** – Tests the model’s responses using predefined data from the
24+
JSON file.
25+
26+
---
27+
28+
## Folder Structure
29+
30+
```text
31+
Rag + Distilled Model/
32+
β”œβ”€β”€ Apollo11_rag&distilled.ipynb ← Main Jupyter Notebook
33+
β”œβ”€β”€ README.md ← Project documentation
34+
└── data/
35+
β”œβ”€β”€ apollo11_docs.json ← Apollo 11 text dataset and evaluation prompts
36+
└── chroma_db/ ← Auto-created vector database folder
37+
(It will appear after you run it)
38+
```
39+
40+
---
41+
42+
## Models Used
43+
44+
* **LaMini-Flan-T5-248M**: It is a Local LLM and it is a distilled version of
45+
Google's Flan-T5, optimized for lightweight text generation tasks.
46+
Used here for reasoning, summarization, and RAG response generation.
47+
* **all-MiniLM-L6-v2**: It as an Embedding model and it is a compact sentence-transformer
48+
model used to convert text chunks into numerical vector embeddings for
49+
semantic search and retrieval.
50+
51+
These two models make the project lightweight, fully local, and suitable for GPU
52+
or CPU execution.
53+
54+
---
55+
56+
## Notes
57+
58+
* The ChromaDB folder (data/chroma_db/) is automatically generated when you first
59+
run the document loader.
60+
* You can safely delete it to rebuild embeddings later.
61+
* The notebook does not require an external .txt file β€” all content is inside
62+
the JSON.
63+
* The model automatically detects whether to use GPU (torch.cuda.is_available()).

0 commit comments

Comments
Β (0)