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

# Analyze Dataset Llm

`POST /felix/dataset/analyze_llm`

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

---

[API](https://skmtc.net/pioneer/apis/brain-api.md) · [All operations](https://skmtc.net/pioneer/apis/brain-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pioneer/brain-api/revisions/31dfe831e079/schema)
