---
title: "Generate evaluation dataset from interactions"
method: POST
path: "/v1/retrievers/{retriever_id}/evaluations/generate-from-interactions"
tags: ["Retriever Evaluations"]
---

# Generate evaluation dataset from interactions

`POST /v1/retrievers/{retriever_id}/evaluations/generate-from-interactions`

## Request

- Base URL: `https://api.mixpeek.com`
- URL: `https://api.mixpeek.com/v1/retrievers/{retriever_id}/evaluations/generate-from-interactions`
- Auth: HTTP bearer and API key in header `X-Namespace`

Auto-generate a ground truth evaluation dataset by mining user interactions for this retriever. Queries with sufficient positive interactions (click, purchase, bookmark, etc.) are used to infer relevance labels, creating a dataset suitable for offline evaluation.

## Path parameters

- `retriever_id` string, required

## Request body

- GenerateFromInteractionsRequest: Request to auto-generate an evaluation dataset from user interactions.
  - `dataset_name` string, nullable: Name for the generated dataset. If omitted, defaults to 'auto_{retriever_id}_{date}'.
  - `min_interactions` integer: Minimum number of positive interactions a query must have to be included in the dataset. Queries with fewer interactions are excluded as low-confidence ground truth.
  - `lookback_days` integer: How many days of interaction history to consider.
  - `positive_interaction_types` string[], nullable: Interaction types considered positive signals. Defaults to: click, purchase, positive_feedback, bookmark, share.

## Response `200`

Successful Response

- EvaluationDataset: Complete evaluation dataset with metadata. An evaluation dataset is a collection of queries with ground truth relevance labels, used to measure retriever quality.
  - `dataset_id` string, required: Unique dataset identifier
  - `dataset_name` string, required: Human-readable dataset name
  - `description` string, nullable: Dataset description
  - `queries` GroundTruthQuery[], required: List of queries with ground truth
    - `query_id` string, required: Unique identifier for this query within the dataset
    - `query_input` object, required: Query input in the same format as retriever execution (e.g., {'text': '...'})
    - `relevant_documents` string[], required: List of feature_ids that are relevant for this query
    - `relevance_scores` object, nullable: Optional graded relevance scores (doc_id -> score, 0-5 where 5 is most relevant). Used for NDCG calculation.
  - `created_at` string, date-time, required: When dataset was created
  - `updated_at` string, date-time, required: Last update timestamp
  - `namespace_id` string, required: Namespace this dataset belongs to
  - `internal_id` string, required: Internal organization ID
  - `query_count` integer, required: Number of queries in dataset
  - `metadata` object, nullable: Additional metadata (e.g., labeling instructions, version info)

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `422`: Unprocessable Entity
- `429`: Too Many Requests
- `500`: Internal Server Error
- `503`: Service Unavailable

## Changes

- **2026-10-09** `61a175e8eb9a`: 1 warning, 5 info
  - removed the optional property `detail` from the response with the `422` status
  - added the non-success response with the status `429`
  - added the non-success response with the status `503`
  - added the optional property `success` to the response with the `422` status
  - …2 more
- **2026-10-04** `38e0822db900`: 1 breaking, 1 info
  - removed the success response with the status `201`
  - added the success response with the status `200`
- **2026-08-09** `5d4c905106b4`: 1 info
  - the endpoint scheme security `BearerAuth AND NamespaceHeader` was added to the API

[Operation history](https://skmtc.dev/mixpeek/apis/mixpeek-api/changes/v1/retrievers/:retriever_id/evaluations/generate-from-interactions/post.md)

---

[API](https://skmtc.dev/mixpeek/apis/mixpeek-api.md) - [All operations](https://skmtc.dev/mixpeek/apis/mixpeek-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mixpeek/apis/mixpeek-api/revisions/790bc16455f6?raw)
