docs: fix custom toon syntax (#33)

This commit is contained in:
Ivan Starkov
2025-10-29 22:43:36 +03:00
committed by GitHub
parent 3505f75bca
commit 40c053e7ca

View File

@@ -840,18 +840,18 @@ For output, be more explicit. When you want the model to **generate** TOON:
Here's a prompt that works for both reading and generating: Here's a prompt that works for both reading and generating:
``` ````
Data is in TOON format (2-space indent, arrays show length and fields). Data is in TOON format (2-space indent, arrays show length and fields).
\`\`\`toon ```toon
users[3]{id,name,role,lastLogin}: users[3]{id,name,role,lastLogin}:
1,Alice,admin,2025-01-15T10:30:00Z 1,Alice,admin,2025-01-15T10:30:00Z
2,Bob,user,2025-01-14T15:22:00Z 2,Bob,user,2025-01-14T15:22:00Z
3,Charlie,user,2025-01-13T09:45:00Z 3,Charlie,user,2025-01-13T09:45:00Z
\`\`\` ```
Task: Return only users with role "user" as TOON. Use the same header. Set [N] to match the row count. Output only the code block. Task: Return only users with role "user" as TOON. Use the same header. Set [N] to match the row count. Output only the code block.
``` ````
> [!TIP] > [!TIP]
> For large uniform tables, use `encode(data, { delimiter: '\t' })` and tell the model "fields are tab-separated." Tabs often tokenize better than commas and reduce the need for quote-escaping. > For large uniform tables, use `encode(data, { delimiter: '\t' })` and tell the model "fields are tab-separated." Tabs often tokenize better than commas and reduce the need for quote-escaping.