The Webhook evaluation metric offers ultimate flexibility with how to evaluate the output of an LLM.
It’s intended to be used when you have some bespoke business logic that’s capable of determining whether an LLM’s output is “good” or “bad”.
It works like this:
- You stand up an unauthenticated API that Vellum can make an HTTP POST request to with the following JSON payload:
And responds with a JSON payload that conforms to the following schema:
Vellum will soon support authenticated endpoints and the specification of auth headers and signing signatures.
- You encode business logic behind your API that interprets the provided inputs and output and produces some numerical score representing the quality of the output.
- You select the “Webhook” evaluation metric within Vellum’s UI and provide the url to your webhook.
- Upon evaluation, Vellum will send the above payload to your webhook and expect the above response, rendering UI elements based on the response data accordingly.
If you want to test the Webhook evaluation metric without standing up your own endpoint, you can use this endpoint as an example. It’ll generate random numerical scores.