> ## 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.

# Denoising with votes

> Majority-vote the audit verdicts so a flaky flip does not sway the result.

The judged dimensions are readings of the item, and on a borderline one the verdict can differ between requests. `AuditorConfig(votes=N)` audits each sample N times and returns the majority verdict per dimension. It configures every audit stage: the `Auditor`, and the `audit` and `reaudit` stages of a `Refinery`. The fix stage has no votes; its own control is [`FixerConfig(max_attempts=N)`](/models/fix#options).

```python wrap theme={"theme":{"light":"material-theme-lighter","dark":"material-theme-darker"}}
import os

from sdvm import Auditor, AuditorConfig, Refinery

key = os.environ["SDVM_API_KEY"]

audited = Auditor(api_key=key, config=AuditorConfig(votes=3)).run(mc_data)   # majority of 3 audits
audited = Auditor(api_key=key).run(mc_data, config=AuditorConfig(votes=5))   # per-call override
refined = Refinery(                                                           # each stage its own
    api_key=key, audit=AuditorConfig(votes=3), reaudit=AuditorConfig(votes=1)
).run(mc_data)
```

`votes=1`, the default, is a single audit. Use an odd number: a tie has no majority, so an even count is refused.

On the HTTP API the same setting is `config: {"votes": 3}` on `/audit` and `config: {"audit": {"votes": 3}, "reaudit": {"votes": 1}}` on `/refine`.

## Cost

Each vote is an audit call, billed per token on the work actually done. Three votes on the audit before the fix and one on the reaudit is a reasonable split: the first decides what the fix changes, the second confirms the result.

## Why it matters for fixes

Inside `Refinery`, the audit before the fix decides what the fix changes and the reaudit says whether it helped. When the audit is noisy, a fix can be routed by a flip on the original item rather than a real defect. Voting the audit stage takes that noise out of the routing; voting the reaudit makes the proof stable too.
