-
Notifications
You must be signed in to change notification settings - Fork 20
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
Use function calling to parse responses #18
Conversation
CC @wong-codaio |
js/llm.ts
Outdated
|
||
const COT_SUFFIX = `Write out in a step by step manner your reasoning to be sure that your conclusion is correct. Avoid simply stating the correct answer at the outset. Then print only a single choice from {{__choices}} (without quotes or punctuation) on its own line corresponding to the correct answer. At the end, repeat just the answer by itself on a new line formatted as "Answer=X"`; | ||
const COT_SUFFIX = | ||
"Answer the question by calling the `select_choice` with your reasoning in a step-by-step matter to be sure that your conclusion is correct. Avoid simply stating the correct answer at the outset. Select a single choice by setting the `choice` parameter to a single choice from {{__choices}}."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the select_choice
function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
py/autoevals/llm.py
Outdated
simply stating the correct answer at the outset. Then print only a single choice from {{__choices}} (without | ||
quotes or punctuation) on its own line corresponding to the correct answer. At the end, repeat just the | ||
answer by itself on a new line formatted as "Answer=X" | ||
Answer the question by calling the `select_choice` with your reasoning in a step-by-step matter to be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
A substantial fraction (20%+) of responses have parse errors. This change uses function calling to reduce that.