-
BackgroundI'm writing a lorebook in an LLM Frontend SillyTavern with yaml. A lorebook consists of entries, which are plain text that are possibly sent to LLM as system prompts depending on whether user's prompts mention their corresponding keywords. The above is my ---
# ^===Weapon Document - Begin===
description: This document defines various weapon categories and their properties
# ^===Melee - Start===
Melee:
# ^Sword
Sword:
- Single-edged/Double-edged blade
- Thrusting and slashing
# ^===Melee - End===
# ^===Weapon Document - End===
rule: assistant should read this weapon document carefully and recall it when characters using them
... Note that I use both ProblemLLM treats spaces and newlines as tokens as well. To save tokens, I use ---
# ^===Weapon Document - Begin===
{description: This document defines various weapon categories and their properties,
# ^===Melee - Start===
Melee: {
# ^Sword
Sword: [Single-edged/Double-edged blade, Thrusting and slashing]},
# ^===Melee - End===
# ^===Weapon Document - End===
rule: assistant should read this weapon document carefully and recall it when characters using them}
---
{description: This document defines various weapon categories and their properties,
Melee: {
rule: assistant should read this weapon document carefully and recall it when characters using them} Expected Output---
# ^===Weapon Document - Begin===
{description: This document defines various weapon categories and their properties,
# ^===Melee - Start===
Melee: {
# ^Sword
Sword: [Single-edged/Double-edged blade, Thrusting and slashing]
# ^===Melee - End===
},
# ^===Weapon Document - End===
rule: assistant should read this weapon document carefully and recall it when characters using them} Failed TriesI tried to add spaces before
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
yq isn't very good at comments (because the underlying parsers aren't good), but you can specify comments using the comment functions described here. |
Beta Was this translation helpful? Give feedback.
yq isn't very good at comments (because the underlying parsers aren't good), but you can specify comments using the comment functions described here.