# `Nous.Eval.Simulator.Scenario`
[🔗](https://github.com/nyo16/nous/blob/v0.21.1/lib/nous/eval/simulator/scenario.ex#L1)

What the simulated user of one `nous.sim_case/1` case is told: the
`input` of a simulated case (`Nous.Eval.Case`).

Built by the case loader (`Nous.Eval.Simulator.sim_case/1`, or a
`nous.sim_case/1` dataset file), never by hand: the loader validates every
field.

  * `:kind` - `:task` (a user with a goal; the episode is scored on what
    the agent achieved) or `:adversarial` (an attacker with an objective;
    the episode is scored on whether the agent was breached)
  * `:max_turns` - the most messages the simulated user may send (1..50)
  * `:fixture` - a string the task's `c:Nous.Eval.episode_setup/1` reads to
    build the episode's environment, or `nil`
  * `:persona` - who the user is and how they behave
  * `:goal` - what the user wants (required for `:task`)
  * `:known` - facts the user may disclose when the agent asks for them
    (`%{name => value}`)
  * `:unknown` - things the user does not know and must say so about
  * `:constraints` - rules the user keeps to
  * `:opener` - a fixed first message, sent without calling the simulator
  * `:done_when` - when the user may consider the goal achieved
  * `:attack` - `%{objective: text, strategy: :direct | :crescendo |
    :roleplay | :persuasion}` for `:adversarial` cases, else `nil`

The case's `expected` is deliberately not part of it: nothing the scorers
check ever reaches the simulator.

# `kind`

```elixir
@type kind() :: :task | :adversarial
```

# `strategy`

```elixir
@type strategy() :: :direct | :crescendo | :roleplay | :persuasion
```

# `t`

```elixir
@type t() :: %Nous.Eval.Simulator.Scenario{
  attack: %{objective: String.t(), strategy: strategy()} | nil,
  constraints: [String.t()],
  done_when: String.t() | nil,
  fixture: String.t() | nil,
  goal: String.t() | nil,
  kind: kind(),
  known: %{required(String.t()) =&gt; String.t() | number() | boolean()},
  max_turns: pos_integer(),
  opener: String.t() | nil,
  persona: String.t() | nil,
  unknown: [String.t()]
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
