> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sdvm.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# SDVM SDK

> Audit your training data, fix what is broken, and never make a sample worse.

SDVM, the Synthetic Data Vending Machine, audits datasets for LLM training and fixes what it finds: grammar, coherence, mislabeled answers, weak distractors, length shortcuts. Feed it noisy text or messy multiple-choice items and get back the defects it found, the fixes it made, and an honest flag on anything it could not fully resolve.

Two models do the work. `sdvm-audit-1` rates a sample and returns one verdict per check; `sdvm-fix-1` fixes it. The Python SDK reaches them through three clients: `Auditor`, `Fixer`, and `Refinery`, which runs both in one call.

```bash theme={"theme":{"light":"material-theme-lighter","dark":"material-theme-darker"}}
pip install sdvm
```

## Key features

* **`sdvm-audit-1`** rates per-sample quality: shape, content, grammar, coherence, label correctness, distractor quality and more, one verdict per check.
* **`sdvm-fix-1`** fixes what the audit found, behind a never-worse guarantee: a sample is never made worse than its input.
* **Refine** runs `sdvm-audit-1`, `sdvm-fix-1` and `sdvm-audit-1` again in one call, so you can see whether the fix helped.
* **Fix-or-flag contract**: anything the fix cannot fully resolve comes back with `flagged=True` for review instead of a silent partial edit.
* **Dataset conventions**: declare uniform lowercasing, markup tokens or intentional truncation so the audit does not mistake them for defects.
* **Voted verdicts**: `AuditorConfig(votes=N)` audits each item N times and keeps the majority per dimension.
* **Local aggregate checks** such as answer-position bias, computed on your machine without a request.
* **Async twins** of every client, and a helper to publish results to the Hugging Face Hub.

## Where to go next

<Columns cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Install the SDK and fix your first samples in under five minutes.
  </Card>

  <Card title="Core concepts" icon="lightbulb" href="/core-concepts">
    Samples, the audit, fix and reaudit blocks and the never-worse contract.
  </Card>

  <Card title="Audit" icon="magnifying-glass" href="/models/audit">
    Measure quality per sample and across a whole dataset.
  </Card>

  <Card title="Refine" icon="arrows-rotate" href="/models/refine">
    Audit, fix and re-audit in one server-side call.
  </Card>

  <Card title="SDK reference" icon="code" href="/sdk/api-reference">
    Every public class and function, generated from the package.
  </Card>

  <Card title="HTTP API" icon="square-terminal" href="/api-reference/introduction">
    Call the audit, fix and refine endpoints from any language.
  </Card>
</Columns>
