Building a Dataset
To run evaluations, you’ll need a dataset against which to test your prompts. Luckily, you can create datasets from your request history programmatically via the API.- Endpoint:
/dataset-from-filter-params - Description: Create a dataset in PromptLayer programmatically. Datasets are built from request history.
- Payload Filters: When specifying search query filters, include the required
nameparameter and theworkspace_id. Optionally, you can define astart_timeand anend_timeto filter requests within a specific timeframe, both given as datetime objects. Themetadataparameter allows for a list of objects, each with akeyand avalue. For more granular control, use theprompt_templateto filter for requests using a specific template, a query stringqfor additional filtering, andscores. Tags can be added through thetagsparameter as a list of strings, and the number of requests returned can be limited with thelimitparameter.
Example Payload
Creating a Pipeline
You can create and configure a pipeline programmatically. To create an evaluation pipeline, also known as a report, make a POST request to/reports with a name and dataset ID (test_dataset_id).
Configuring Steps
The evaluation pipeline consists of steps, each referred to as a “report column”. To configure these steps, you will need to make POST requests to add each desired step to your pipeline.Example Payload 1
For example, to add a step that runs the newest version of your prompt template, make a POST request to/report-columns with the following configuration:

