hatakekksheeshh commited on
Commit
df87905
·
verified ·
1 Parent(s): 7ec75e2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +223 -3
README.md CHANGED
@@ -1,3 +1,223 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ ---
4
+
5
+ ---
6
+ license: mit
7
+ task_categories:
8
+ - question-answering
9
+ - information-retrieval
10
+ - text-generation
11
+ language:
12
+ - en
13
+ tags:
14
+ - rag
15
+ - retrieval-augmented-generation
16
+ - education
17
+ - course-materials
18
+ - faiss
19
+ - embeddings
20
+ - cse
21
+ - computer-science
22
+ size_categories:
23
+ - 1K<n<10K
24
+ ---
25
+
26
+ # CSE Course RAG Dataset
27
+
28
+ A comprehensive dataset for Retrieval-Augmented Generation (RAG) systems containing processed Computer Science and Engineering (CSE) course materials from Ho Chi Minh City University of Technology (HCMUT). This dataset includes pre-built FAISS indices, processed course documents, raw PDFs, and converted images, ready for use in educational RAG applications.
29
+
30
+ ## Dataset Description
31
+
32
+ This dataset provides a complete pipeline-ready dataset for building RAG systems on educational course materials. It includes:
33
+
34
+ - **Pre-built FAISS indices** for fast semantic search
35
+ - **Processed course data** in structured JSON format
36
+ - **Raw PDF documents** (original course materials)
37
+ - **Converted images** (OCR-ready page images)
38
+ - **Metadata and embeddings** for retrieval and generation tasks
39
+
40
+ The dataset is designed to support research and development in educational AI systems, particularly for question-answering and information retrieval applications.
41
+
42
+ ### Dataset Structure
43
+
44
+ ```
45
+ CSE_course_RAG/
46
+ ├── indices/ # Pre-built FAISS indices for semantic search
47
+ ├── processed/ # Processed course data (JSON format)
48
+ ├── raw/ # Raw PDF documents
49
+ ├── converted/ # Converted page images (OCR-ready)
50
+ ├── data/ # Additional processed data
51
+ └── scratch/ # Temporary processing files
52
+ ```
53
+
54
+ ### Supported Tasks
55
+
56
+ - **Question Answering**: Answer questions about course content using retrieved context
57
+ - **Information Retrieval**: Semantic search over course materials
58
+ - **Text Generation**: Generate answers based on retrieved course content
59
+
60
+ ## Dataset Details
61
+
62
+ ### Dataset Size
63
+
64
+ - **Total Courses**: Multiple CSE courses
65
+ - **Documents**: Syllabus and material documents per course
66
+ - **Chunks**: Pre-processed text chunks with embeddings
67
+ - **Indices**: FAISS indices for fast retrieval
68
+
69
+ ### Data Processing
70
+
71
+ The dataset has been processed through the following pipeline:
72
+
73
+ 1. **Conversion**: PDFs/Office docs → page images
74
+ 2. **OCR**: PaddleOCR text extraction
75
+ 3. **Parsing**: Structured JSON extraction (syllabus and material parsers)
76
+ 4. **Chunking**: Text chunking with overlap
77
+ 5. **Embedding**: Sentence-transformer embeddings
78
+ 6. **Indexing**: FAISS index construction
79
+
80
+ ### Data Fields
81
+
82
+ **Processed Data (JSON)**:
83
+ - `course`: Course name
84
+ - `course_id`: Course code
85
+ - `schema_version`: Data schema version
86
+ - `slides`: Array of slide objects with:
87
+ - `page_index`: Page number
88
+ - `chapter_num`: Chapter number
89
+ - `source_file`: Source file path
90
+ - `metadata`: Processing metadata
91
+ - `raw_text`: Extracted OCR text
92
+
93
+ **FAISS Indices**:
94
+ - Vector embeddings for semantic search
95
+ - Metadata mappings for chunk retrieval
96
+ - Course-specific indices
97
+
98
+ ## Usage
99
+
100
+ ### Download the Dataset
101
+
102
+ ```python
103
+ from huggingface_hub import snapshot_download
104
+
105
+ # Download the entire dataset
106
+ dataset_path = snapshot_download(
107
+ repo_id="hatakekksheeshh/CSE_course_RAG",
108
+ repo_type="dataset",
109
+ local_dir="./data"
110
+ )
111
+ ```
112
+
113
+ Or use the provided download script:
114
+
115
+ ```bash
116
+ python dataset.py
117
+ ```
118
+
119
+ ### Using with RAG Systems
120
+
121
+ The dataset is designed to work with the CSE Course RAG system:
122
+
123
+ ```python
124
+ from rag.query_pipeline import QueryPipeline
125
+
126
+ # Initialize pipeline with pre-built indices
127
+ pipeline = QueryPipeline(
128
+ index_dir="./data/indices",
129
+ embedding_model="sentence-transformers/all-MiniLM-L6-v2"
130
+ )
131
+
132
+ # Query the system
133
+ result = pipeline.answer(
134
+ query="What is the grading policy?",
135
+ course="Introduction_to_Computing"
136
+ )
137
+ ```
138
+
139
+ ### Loading FAISS Indices
140
+
141
+ ```python
142
+ import faiss
143
+ import pickle
144
+
145
+ # Load FAISS index
146
+ index = faiss.read_index("./data/indices/course_name.index")
147
+
148
+ # Load metadata
149
+ with open("./data/indices/course_name_metadata.pkl", "rb") as f:
150
+ metadata = pickle.load(f)
151
+ ```
152
+
153
+ ### Processing Raw Data
154
+
155
+ If you need to reprocess the data:
156
+
157
+ ```python
158
+ # Load processed course data
159
+ import json
160
+
161
+ with open("./data/processed/course_name/course_name.json", "r") as f:
162
+ course_data = json.load(f)
163
+ ```
164
+
165
+ ## Dataset Statistics
166
+
167
+ The dataset includes:
168
+
169
+ - **Multiple CSE courses** covering various computer science topics
170
+ - **Structured syllabus data** with course information, grading policies, prerequisites
171
+ - **Course materials** including lecture slides and chapter content
172
+ - **Pre-computed embeddings** using sentence-transformers models
173
+ - **FAISS indices** optimized for fast similarity search
174
+
175
+ ## Evaluation
176
+
177
+ The dataset has been evaluated with the following metrics:
178
+
179
+ - **Answer Faithfulness**: +21.1% improvement with query rewriting
180
+ - **Top Chunk Score**: +80.9% improvement in reranker confidence
181
+ - **Query-Answer Similarity**: Semantic alignment between queries and answers
182
+ - **Retrieval Performance**: Query-Chunk similarity and reranker scores
183
+
184
+ ## Limitations
185
+
186
+ - The dataset contains course materials from HCMUT and may be specific to that institution's curriculum
187
+ - OCR quality depends on source document quality
188
+ - Some courses may have incomplete or missing materials
189
+ - The dataset is primarily in English
190
+
191
+ ## Citation
192
+
193
+ If you use this dataset in your research, please cite:
194
+
195
+ ```bibtex
196
+ @dataset{cse_course_rag_2025,
197
+ title={CSE Course RAG Dataset},
198
+ author={Nguyen Quoc Hieu},
199
+ year={2025},
200
+ publisher={HuggingFace},
201
+ url={https://huggingface.co/datasets/hatakekksheeshh/CSE_course_RAG}
202
+ }
203
+ ```
204
+
205
+ ## License
206
+
207
+ This dataset is released under the MIT License. See the LICENSE file for details.
208
+
209
+ **Copyright**: © 2025 Nguyen Quoc Hieu, Ho Chi Minh City University of Technology
210
+
211
+ ## Acknowledgments
212
+
213
+ - **Ho Chi Minh City University of Technology (HCMUT)** for providing course materials
214
+ - **HuggingFace** for hosting the dataset
215
+ - **PaddleOCR** for OCR capabilities
216
+ - **sentence-transformers** for embedding models
217
+ - **FAISS** for efficient similarity search
218
+
219
+ ---
220
+
221
+ **Note**: This dataset is intended for research and educational purposes. Please respect the original course materials' copyright and use appropriately.
222
+
223
+