# MentorSamplingOptions class

> The MentorSamplingOptions class of Novior.MentorAgent.Options: How a model samples its reply (MentorOptions.CoordinatorSampling). Each value left null is the…

- URL: https://docs.mentoragent.net/api/novior-mentoragent-options/mentorsamplingoptions
- Verified with: MentorAgent 1.4.0
- Last updated: 2026-11-18
- Packages: Novior.MentorAgent

How a model samples its reply ([`MentorOptions.CoordinatorSampling`](https://docs.mentoragent.net/api/novior-mentoragent-options/mentoroptions#coordinatorsampling)). Each value left `null` is the provider's own; each one set goes into the request's `ChatOptions` as it is.

## Definition

Namespace: `Novior.MentorAgent.Options`. Package: `Novior.MentorAgent`.

`public sealed class MentorSamplingOptions`

```shell
dotnet add package Novior.MentorAgent
```

## Remarks

Stop sequences are left out on purpose: a sequence that also occurs inside a tool call's arguments or a citation would end the reply there, and the call would reach the application cut in half.

## Constructors

`public MentorSamplingOptions()`

## Properties

### `FrequencyPenalty`

`public float? FrequencyPenalty { get; set; }`

Above 0 discourages repeating the same tokens, the more they recur; below 0 encourages it. The range is the provider's.

### `MaxOutputTokens`

`public int? MaxOutputTokens { get; set; }`

The longest reply, in tokens, of one request. At least 1: a reply cut short stops mid-sentence.

### `PresencePenalty`

`public float? PresencePenalty { get; set; }`

Above 0 discourages any token already used, once is enough; below 0 encourages it. The range is the provider's.

### `Seed`

`public long? Seed { get; set; }`

Asks the provider for repeatable sampling, where it supports it.

### `Temperature`

`public float? Temperature { get; set; }`

Randomness of the reply: 0 is the most predictable. Not negative.

### `TopK`

`public int? TopK { get; set; }`

Only this many most likely tokens are drawn from. At least 1; not every provider takes it.

### `TopP`

`public float? TopP { get; set; }`

Nucleus sampling: only the most likely tokens whose probabilities add up to this are drawn from. In (0, 1\].

---

- Previous: [MentorSafetyCheckFailure enum](https://docs.mentoragent.net/api/novior-mentoragent-options/mentorsafetycheckfailure.md)
- Next: [MentorSessionContextPlacement enum](https://docs.mentoragent.net/api/novior-mentoragent-options/mentorsessioncontextplacement.md)
