Skip to content

Commit 528b2e6

Browse files
docs: add createTrainingItem code example to quick start
1 parent a1ff2f0 commit 528b2e6

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

docs/getting-started/quick-start.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,23 @@ A typical instruction-tuning item in JSONL format looks like this:
8181
{"instruction":"Answer the question based on the text","input":"What is semantic chunking?","output":"Semantic chunking splits text at sentence boundaries while preserving code blocks, tables, and lists, adding a small context prefix from the previous chunk."}
8282
```
8383

84+
## How items are built
85+
86+
The pipeline creates `TrainingItem` objects in `src/renderer/stores/outputStore.ts`. For an instruction-type run with JSONL output, the store parses Q&A pairs from the model response and returns Alpaca-shaped items:
87+
88+
```ts
89+
import { createOutputStore } from "../src/renderer/stores/outputStore.js"
90+
91+
const output = createOutputStore()
92+
const items = output.createTrainingItem(
93+
"What is semantic chunking?",
94+
"Semantic chunking splits text at sentence boundaries…",
95+
"instruction",
96+
"jsonl"
97+
)
98+
// [{ format: "instruction", instruction: "…", input: "…", output: "…" }]
99+
```
100+
84101
## Next steps
85102

86103
- [Model Settings](/configuration/model-settings.md) — tune temperature, concurrency, and chunk size.

0 commit comments

Comments
 (0)