openevals
package. OpenEvals includes a set of commonly used evaluators and is a great starting point if you’re new to evaluations. If you want greater flexibility in how you evaluate your apps, you can also define completely custom evaluators using your own code.yarn
as your package manager, you will also need to manually install @langchain/core
as a peer dependency of openevals
. This is not required for LangSmith evals in general - you may define evaluators using arbitrary custom code.OPENAI_API_KEY
environment variable as well as the required LangSmith ones:openevals
and create an evaluator. outputs
are the result of your target function. reference_outputs
/ referenceOutputs
are from the example pairs you defined in step 4 above.CORRECTNESS_PROMPT
is just an f-string with variables for "inputs"
, "outputs"
, and "reference_outputs"
. See here for more information on customizing OpenEvals prompts.