Use this file to discover all available pages before exploring further.
The JavaScript evaluator lets you write custom validation logic to assess your prompt outputs programmatically. Use it to check data formats, enforce business rules, parse structured outputs, and implement any evaluation logic expressible in code.
Looking for Python runtime support in this evaluator? Reach out to us at support@adaline.ai for a private preview.
Add the JavaScript evaluator from the evaluator menu.
2
Write your evaluation code
Give the evaluator a name, link a dataset, and write your custom JavaScript code in the code editor. Write your logic between the // start and // end comments.
3
Run the evaluation
Click Evaluate to execute the evaluation and see the results.
When you create a new JavaScript evaluator, Adaline provides this template:
let grade = "fail";let score = 0;let reason = "Didn't resolve on any path for the given completion.";// start: write your logic here// end: write your logic herereturn { grade, score, reason};
Write your custom logic between the // start and // end comments.
// start: write your logic hereif (data.variables && Object.values(data.variables).includes("Python developer")) { grade = 'pass'; score = 1; reason = 'A variable with the value "Python developer" was found.';} else { grade = 'fail'; score = 0; reason = 'No variable with the value "Python developer" was found.';}// end: write your logic here