---
title: "Analyze Dataset Llm"
method: POST
path: "/v1/dataset/analyze_llm"
tags: ["dataset-analysis"]
---

# Analyze Dataset Llm

`POST /v1/dataset/analyze_llm`

## Request

- Base URL: `https://api.pioneer.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pioneer.ai/v1/dataset/analyze_llm`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/pioneer/apis/brain-api/docs/v1/dataset/analyze_llm/post.ts> (a function with typed inputs; its response is checked against the schema)

Run LLM-based dataset quality analysis.

This endpoint performs the slow (~8s) LLM-based diversity and quality
analysis separately from the fast statistical analysis endpoint.

Use ``/felix/dataset/analyze`` for fast statistical metrics (distribution,
duplicates, outliers, vendi score, visualization). Use this endpoint when
you need the LLM's reasoning about dataset quality and reducibility.

Provide data inline via ``dataset`` or reference a stored dataset
with ``dataset_name``.

## Request body

- DatasetLLMAnalysisRequest: Request for LLM-only dataset quality analysis. Use this endpoint for the slow LLM-based diversity/quality analysis separately from the fast statistical analysis endpoint.
  - `task_type` 'ner' | 'classification' | 'generative', required: Task type of the dataset
  - `task_description` string, nullable: Description of the task/domain for context. Helps the LLM understand the intended use case.
  - `labels` string[], nullable: List of label names for the task. If not provided, will be extracted from the dataset.
  - `dataset` object[], nullable: List of data samples (optional if dataset_name provided)
  - `dataset_name` string, nullable: Name of stored dataset to analyze (optional if dataset provided)
  - `dataset_version` string, nullable: Dataset version (latest if omitted)

## Response `200`

Successful Response

- DiversityLLMAnalysis: LLM-generated reasoning analysis of dataset diversity. Mimics how a machine learning engineer would analyze diversity.
  - `reasoning_trace` string, required: Step-by-step reasoning trace showing how the model analyzed the dataset's diversity, similar to an ML engineer's thought process
  - `summary` string, required: Concise summary of the diversity assessment
  - `diversity_rating` 'low' | 'moderate' | 'high' | 'excellent', required: Overall diversity rating based on the analysis
  - `key_observations` string[]: Key observations about the dataset's diversity
  - `recommendations` string[]: Actionable recommendations to improve diversity if needed
  - `model_used` string, required: The LLM model used for the analysis

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-24** `0e5e86e2bae5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/pioneer/apis/brain-api/changes/v1/dataset/analyze_llm/post.md)

---

[API](https://skmtc.dev/pioneer/apis/brain-api.md) - [All operations](https://skmtc.dev/pioneer/apis/brain-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pioneer/apis/brain-api/revisions/0e5e86e2bae5?raw)
