Introduction
orq.ai exposes API to manipulate Evaluators. These APIs are used to manage Evaluators programmatically. In this page we’ll see the common use cases for creating, and fetching Evaluators through the API.Prerequisite
To get started, an API key is needed to use within SDKs or HTTP API.To get an API key ready, see Authentication.
SDKs
Creating an Evaluator
To create an Evaluator we’ll use the Create an Evaluator API call. We then need to decide what type of Evaluator we’ll create:HTTP Evaluator
Here is a valid payload to create an HTTP evaluator:To learn more about building HTTP Evaluators, see Creating an HTTP Evaluator.
JSON Evaluator
Here is a valid payload to create a JSON evaluator:Make sure to correctly escape the JSON Schema payload.
To learn more about building JSON Evaluators, see Creating a JSON Evaluator.
LLM Evaluator
Here is a valid payload to create an LLM evaluator:To learn more about building LLM Evaluators, see Creating an LLM Evaluator.
Python Evaluator
Here’s a valid Python Evaluator:
Use \n to indicate newlines in code.
To learn more about building Python Evaluators, see Creating a Python Evaluator.
Guardrail Configuration
For each Evaluator payload you can also define a guardrail payload looking as follows and add it into the creation payloadCalling the API
Here’s an example end-to-end API call and response:Listing Evaluators
To list evaluators we’re using the Listing Evaluators API. We’re making the following call:Creating an Evaluator Evaluator Library