-
Notifications
You must be signed in to change notification settings - Fork 42
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
WIP: New eval quickstart #575
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
||
const client = new Client(); | ||
|
||
const openai = new OpenAI();`, |
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.
to match python
const openai = new OpenAI();`, | |
const openaiClient = new OpenAI();`, |
{ "role": "system", "content": "Answer the following question accurately" }, | ||
{ "role": "user", "content": inputs["question"] }, | ||
], | ||
) | ||
return { "response": response.choices[0].message.content.strip() } |
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.
python formatting nit
{ "role": "system", "content": "Answer the following question accurately" }, | |
{ "role": "user", "content": inputs["question"] }, | |
], | |
) | |
return { "response": response.choices[0].message.content.strip() } | |
{"role": "system", "content": "Answer the following question accurately"}, | |
{"role": "user", "content": inputs["question"]}, | |
], | |
) | |
return {"response": response.choices[0].message.content.strip()} |
label: "TypeScript", | ||
content: `// Define the application logic you want to evaluate inside a target function | ||
// The SDK will automatically send the inputs from the dataset to your target function | ||
async function target(inputs: string): Promise<{ response: string }> { |
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.
is inputs not a Record in js as well? didnt' realize you could have a target that just takes a string
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.
I just deconstructed it into a string before I sent it over to target
messages=[ | ||
{ "role": "system", "content": instructions }, | ||
{ | ||
"role": "user", | ||
"content": f"""Ground Truth answer: {reference_outputs["answer"]}; | ||
Student's Answer: {outputs["response"]}""" | ||
}, | ||
], |
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.
formatting nit
messages=[ | |
{ "role": "system", "content": instructions }, | |
{ | |
"role": "user", | |
"content": f"""Ground Truth answer: {reference_outputs["answer"]}; | |
Student's Answer: {outputs["response"]}""" | |
}, | |
], | |
to_evaluate = ( | |
f"Ground Truth Answer: {reference_outputs['answer']}\n" | |
f"Student Answer: {outputs['response']}" | |
) | |
messages=[ | |
{"role": "system", "content": instructions}, | |
{"role": "user", "content": to_evaluate}, | |
], |
new Quickstart for evaluations