Training data from a collection: llmgw ctl kb dataset

A chat model of the cluster reads each chunk and writes questions a person
might ask of it with the answers it holds, streamed as NDJSON a chunk at a
time, for people to correct before an adapter is trained on it. A chunk that
gave no pairs says so on its own line.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5.5 committed 2026-10-08 20:04:37 +02:00
1 parent 0a6a586dfe
commit ae95ac8261
8 files changed
+455

No files matched your search

+91
View File
@@ -1185,6 +1185,58 @@
}
}
},
"/api/v1/kb/collections/{id}/dataset": {
"post": {
"operationId": "postKbCollectionsIdDataset",
"summary": "Training data from a collection: questions and answers a chat model writes from each chunk",
"description": "NDJSON, a line per pair as each chunk is read, or a line with error for a chunk that gave none. For people to correct before an adapter is trained on it.",
"tags": [
"kb"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"description": "The collection's ID, its name when that is unique, or ORG/NAME.",
"schema": {
"type": "string"
}
},
{
"$ref": "#/components/parameters/Actor"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/KBDatasetRequest"
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/KBDatasetLine"
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"default": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/api/v1/kb/collections/{id}/documents": {
"get": {
"operationId": "getKbCollectionsIdDocuments",
@@ -5059,6 +5111,45 @@
}
}
},
"KBDatasetLine": {
"type": "object",
"description": "KBDatasetLine is one line of the answer: a pair, or why a chunk gave none.",
"properties": {
"q": {
"type": "string"
},
"a": {
"type": "string"
},
"doc": {
"type": "string"
},
"ord": {
"type": "integer"
},
"error": {
"type": "string"
}
}
},
"KBDatasetRequest": {
"type": "object",
"description": "KBDatasetRequest asks for training data from a collection.",
"properties": {
"model": {
"type": "string",
"description": "Model writes the questions and answers: a chat model of the catalog."
},
"per_chunk": {
"type": "integer",
"description": "PerChunk is how many pairs each chunk gives; 8 when 0."
},
"max_chunks": {
"type": "integer",
"description": "MaxChunks bounds how many chunks are read; 500 when 0."
}
}
},
"KBDefaultRequest": {
"type": "object",
"description": "KBDefaultRequest sets the collections a part of the tree answers from when a request names none; none clears it.",