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

# Configuration

> Environment variables, built-in presets, custom YAML/JSON rubric schemas, and Jev output types.

Configure `jev-curate` with environment variables, built-in presets, or custom rubric files.

## Environment variables

| Variable | Required | Default | Purpose |
| - | - | - | - |
| `TYPESAFE_API_KEY` | Yes (unless `--dry-run`) | None | Authenticates requests to `https://api.typesafe.ai/v1/systemone`. Non-dry-run CLI execution exits with an error if unset. |
| `JEV_MODEL` | No | `jev-latest` | Overrides the Jev model name. CLI `--model` flag takes precedence over `JEV_MODEL`. |
| `TYPESAFE_ENDPOINT` | No | None | Custom API endpoint URL for offline mock testing. CLI `--endpoint` flag takes precedence over `TYPESAFE_ENDPOINT`. |
| `HF_TOKEN` | No | None | Hugging Face token for private or gated `hf://datasets/...` inputs. `jev-curate` sends it as a bearer token only when fetching from `https://huggingface.co/`. |

## Built-in presets

Three presets ship in `src/presets.rs`:

* `reasoning-math`: Checks `has_circular_reasoning` (`noul`, reject at `>= 0.70`) and `reasoning_depth` (`score`, minimum `2.0`).
* `anti-sycophancy`: Checks `is_sycophantic` (`noul`, reject at `>= 0.65`) and `has_ai_disclaimer` (`noul`, reject at `>= 0.80`).
* `code-correctness`: Checks `has_stub_placeholders` (`noul`, reject at `>= 0.75`) and `code_quality` (`score`, minimum `2.0`).

All three built-in presets use `min_confidence: 0.5` and `policy: "all"`.

## Custom YAML and JSON rubrics

Pass a `.yaml`, `.yml`, or `.json` file path anywhere a preset name is accepted.

```yaml theme={null}
name: custom-qa
description: Filters low-detail or off-topic answers.
min_confidence: 0.5
policy: all # "all" requires every gate to pass; "any" passes if any gate passes
questions:
  is_off_topic:
    type: noul
    instructions: Does this response ignore the user's question?
    criteria:
      "true": Off-topic or evasive
      "false": Directly answers the prompt
  clarity:
    type: score
    instructions: Rate how clear and well-structured the answer is.
    criteria:
      - Unreadable
      - Confusing
      - Acceptable
      - Clear
      - Crisp and complete
  domain:
    type: choice
    instructions: Classify the primary subject.
min_scores:
  clarity: 2.0
reject_nouls:
  is_off_topic: 0.70
allowed_choices:
  domain:
    - math
    - code
```

## Output schemas (`Noul`, `Score`, `Choice`)

Each question in `questions` specifies a `type` of `noul`, `score`, or `choice`:

* **`noul`**: Returns a calibrated probability in `[0.0, 1.0]` for the true class. `reject_nouls` rejects the row when the probability is greater than or equal to the configured threshold. `Noul` answers skip `min_confidence` because their `[0.0, 1.0]` probability already encodes certainty directly (the Jev API does not emit a separate `confidence` field for `Noul` answers).
* **`score`**: Returns a numeric score against the rubric criteria. `min_scores` rejects the row when the score is below the configured minimum.
* **`choice`**: Returns a categorical label. `allowed_choices` restricts accepted values to the listed strings; an empty list allows any choice.

`Score` and `Choice` questions also return an answer `confidence`. `jev-curate` fails closed: if any required answer is missing, or if a `Score` or `Choice` answer is missing `confidence` or falls below `min_confidence`, the row is rejected (`Noul` skips `min_confidence`).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.