Skip to content

Commit cc65c21

Browse files
committed
✨ feat: add Chain Of Draft reasoning support
Introduced system.chain_of_draft with step-by-step draft logic.
1 parent 385688a commit cc65c21

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

docs/src/content/docs/reference/scripts/system.mdx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,29 @@ Act as a maximally omnicompetent, optimally-tuned metagenius savant contributive
662662
`````
663663
664664
665+
### `system.chain_of_draft`
666+
667+
Chain Of Draft reasoning
668+
669+
Chain of Draft reasoning technique. More at https://learnprompting.org/docs/intermediate/zero_shot_cot.
670+
671+
672+
673+
`````js wrap title="system.chain_of_draft"
674+
system({
675+
title: "Chain Of Draft reasoning",
676+
description:
677+
"Chain of Draft reasoning technique. More at https://learnprompting.org/docs/intermediate/zero_shot_cot.",
678+
})
679+
export default function (ctx: ChatGenerationContext) {
680+
const { $ } = ctx
681+
$` Think step by step, but only keep a minimum draft for
682+
each thinking step, with 5 words at most.`
683+
}
684+
685+
`````
686+
687+
665688
### `system.changelog`
666689
667690
Generate changelog formatter edits
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
system({
2+
title: "Chain Of Draft reasoning",
3+
description:
4+
"Chain of Draft reasoning technique. More at https://learnprompting.org/docs/intermediate/zero_shot_cot.",
5+
})
6+
export default function (ctx: ChatGenerationContext) {
7+
const { $ } = ctx
8+
$` Think step by step, but only keep a minimum draft for
9+
each thinking step, with 5 words at most.`
10+
}

0 commit comments

Comments
 (0)