Skip to content

variations on grammar files #4

@johndpope

Description

@johndpope

came across your tweet - and grok suggested these 2 -

min-thinking.gbnf

root ::= "<think>\n" [A-Za-z0-9 ,.;:]{10,80} "\n</think>\n\n" answer
answer ::= [^\x00-\x08\x0B\x0C\x0E-\x1F]+

structured-think.gbnf


root ::= thought answer

thought ::= "<think>\n" plan approach edge "</think>\n\n"

plan ::= "Plan: " shortline "\n"
approach ::= "Approach: " shortline "\n"
edge ::= "Edge cases: " shortline "\n"

shortline ::= [A-Za-z0-9 ,.;:/_()'"+=-]{1,120} "\n"

answer ::= [^\x00-\x08\x0B\x0C\x0E-\x1F]+

https://gist.github.com/johndpope/a77b179c4f0013adb2a50e13e56b7929

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions