1
1
# Design Proposal - Embedding Ingestion Pipeline And RAG-Based Chat
2
2
3
- ** TODOs **
3
+ Not addressed in this document:
4
4
5
5
* Vector store authentication options.
6
6
* Document versioning and data update policies.
@@ -22,9 +22,10 @@ This document proposes enhancements to the `ilab` CLI to support workflows utili
22
22
(RAG) artifacts within ` InstructLab ` . The proposed changes introduce new commands and options for the embedding ingestion
23
23
and RAG-based chat pipelines:
24
24
25
- * A new ` ilab data ` sub-command to process customer documentation.
25
+ * A new ` ilab rag ` command group, feature gated behind a ` ILAB_DEV_PREVIEW ` environment variable.
26
+ * A new ` ilab rag ` sub-command group to process customer documentation.
26
27
* Either from knowledge taxonomy or from actual user documents.
27
- * A new ` ilab data ` sub-command to generate and ingest embeddings from pre-processed documents into a configured vector store.
28
+ * A new ` ilab rag ` sub-command to generate and ingest embeddings from pre-processed documents into a configured vector store.
28
29
* An option to enhance the chat pipeline by using the stored embeddings to augment the context of conversations, improving relevance and accuracy.
29
30
30
31
### 1.1 User Experience Overview
@@ -94,18 +95,18 @@ consistently to all new and updated commands.
94
95
95
96
### 2.2 Document Processing Pipeline
96
97
97
- The proposal is to add a ` process ` sub-command to the ` data ` command group.
98
+ The proposal is to add a ` process ` sub-command to the ` rag ` command group.
98
99
99
100
For the Taxonomy path (no Model Training):
100
101
101
102
``` bash
102
- ilab data process --output /path/to/processed/folder
103
+ ilab rag convert --output /path/to/processed/folder
103
104
```
104
105
105
106
For the Plug-and-Play RAG path:
106
107
107
108
``` bash
108
- ilab data process --input /path/to/docs/folder --output /path/to/processed/folder
109
+ ilab rag convert --input /path/to/docs/folder --output /path/to/processed/folder
109
110
```
110
111
111
112
#### Processing-Command Purpose
@@ -134,11 +135,13 @@ The generated artifacts can later be used to generate and ingest the embeddings
134
135
135
136
### 2.3 Document Processing Pipeline Options
136
137
138
+ ** Note** : The ` --help ` option will be aware of the ` rag ` command group only if ` ILAB_DEV_PREVIEW ` environment variable is set to ` true ` .
139
+
137
140
``` bash
138
- % ilab data process --help
139
- Usage: ilab data process [OPTIONS]
141
+ % ilab rag convert --help
142
+ Usage: ilab rag convert [OPTIONS]
140
143
141
- The document processing pipeline
144
+ The document processing pipeline for retrieval augmented generation
142
145
143
146
Options:
144
147
--input DIRECTORY The folder with user documents to process. In case
@@ -159,23 +162,23 @@ Options:
159
162
160
163
# ## 2.4 Embedding Ingestion Pipeline
161
164
162
- The proposal is to add an ` ingest` sub-command to the ` data ` command group.
165
+ The proposal is to add an ` ingest` sub-command to the ` rag ` command group.
163
166
164
167
For the Model Training path:
165
168
166
169
` ` ` bash
167
- ilab data ingest
170
+ ilab rag ingest
168
171
` ` `
169
172
170
173
For the Taxonomy or Plug-and-Play RAG paths:
171
174
172
175
` ` ` bash
173
- ilab data ingest --input path/to/processed/folder
176
+ ilab rag ingest --input path/to/processed/folder
174
177
` ` `
175
178
176
179
# ### Ingestion-Working Assumption
177
180
178
- The documents at the specified path have already been processed using the ` data process ` command or an equivalent method
181
+ The documents at the specified path have already been processed using the ` rag convert ` command or an equivalent method
179
182
(see [Getting Started with Knowledge Contributions][ilab-knowledge]).
180
183
181
184
# ### Ingestion-Command Purpose
@@ -209,9 +212,11 @@ context for RAG-based chat pipelines.
209
212
210
213
### 2.5 Embedding Ingestion Pipeline Options
211
214
215
+ ** Note** : The ` --help` option will be aware of the ` rag` command group only if ` ILAB_DEV_PREVIEW` environment variable is set to ` true` .
216
+
212
217
` ` ` bash
213
- % ilab data ingest --help
214
- Usage: ilab data ingest [OPTIONS]
218
+ % ilab rag ingest --help
219
+ Usage: ilab rag ingest [OPTIONS]
215
220
216
221
The embedding ingestion pipeline
217
222
@@ -411,7 +416,7 @@ ilab model chat --rag --retrieval-strategy query-expansion --retrieval-strategy-
411
416
Generate a containerized RAG artifact to expose a `/query` endpoint that can serve as an alternative source :
412
417
413
418
```bash
414
- ilab data ingest --build-image --image-name=docker.io/user/my_rag_artifacts:1.0
419
+ ilab rag ingest --build-image --image-name=docker.io/user/my_rag_artifacts:1.0
415
420
```
416
421
417
422
Then serve it and use it in a chat session:
0 commit comments