Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for Chain-of-Thought #29

Open
Saibo-creator opened this issue Apr 13, 2024 · 1 comment
Open

add support for Chain-of-Thought #29

Saibo-creator opened this issue Apr 13, 2024 · 1 comment

Comments

@Saibo-creator
Copy link
Collaborator

Saibo-creator commented Apr 13, 2024

It would be great if we could support COT like below

grammar_str = """
root ::= cot | phone_number

cot ::= [ a-zA-Z0-9]* phone_number

phone_number ::= "+" [0-9]+
"""

or for arithemetic

root ::= cot | result

cot ::= [^[">>>"] ]* result # We exclude ">>>" from chain of thought to make it a special marker

result ::= ">>>" [0-9]+ 

This way, we could have a prompt like

Follow this example 3+3*4=3+12=15 >>>15; 97*(12-4)+9=

and expect a generation like 97*8+9=776+9=785 >>> 785

@Saibo-creator
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant