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

# Auto Steer

Auto Steering allows you to automatically generate feature interventions based on natural language descriptions of desired behaviors. This provides an easy way to steer model outputs without manually selecting features.

## Basic Usage

The simplest way to use Auto Steering is with the `AutoSteer` method:

<CodeGroup name="Basic Usage">
  ```python Code theme={null}
  # Create automatic feature edits for desired behavior
  edits = client.features.AutoSteer(
      specification="be funny",  # Natural language description
      model=variant,  # Model variant to use
  )

  # Apply the edits to your variant
  variant.set(edits)

  # The model will now attempt to be funnier
  response = client.chat.completions.create(
      messages=[{"role": "user", "content": "Tell me a story"}],
      model=variant
  )
  print(response.choices[0].message["content"])
  ```

  ```output Output theme={null}
  Once upon a time, there was an egg that didn't crack under pressure. It was an egg-cellent joke teller, and it always cracked people up! But one day, it decided to leave the egg carton and go on an egg-venture. It rolled away from the farm and into a field of corn. There, it met a chicken who was an egg-ceptional listener. The chicken and the egg became fast friends and started an egg-static band. They were egg-straordinary musicians, and people flocked to see them! In the end, the egg finally found its place – it was an egg-istential crisis averted! Hope that cracked you up!
  ```
</CodeGroup>

## How It Works

Under the hood, Auto Steer:

1. Generates contrastive examples of content with and without the desired behavior
2. Identifies the most relevant features that distinguish the behavior
3. Determines optimal feature values to encourage the desired behavior
4. Creates a set of feature edits that can be applied to the model

## Advanced Usage

### Combining with Manual Edits

Auto Steer edits can be combined with manual feature interventions:

```python theme={null}
# Generate automatic edits
auto_edits = client.features.AutoSteer(
    specification="be professional",
    model=variant
)

# Combine with manual feature edits
variant.set({
    **auto_edits,
    manual_feature: 0.8
})
```

### Using with Conditionals

Auto Steer can be used within conditional statements:

```python theme={null}
# Generate edits for desired behavior
funny_edits = client.features.AutoSteer(
    specification="be funny",
    model=variant
)

# Apply edits conditionally
variant.set_when(context_feature > 0.5, funny_edits)
```

## Best Practices

* Use clear, specific behavior descriptions
* Test generated edits to ensure desired results
* Consider combining multiple Auto Steer edits for complex behaviors
* Adjust number of features based on steering precision needed
* Use with conditionals for context-aware behavior

## API Reference

### AutoSteer

Generate automatic feature edits based on natural language description.

**Parameters:**

<ResponseField name="specification" type="str" required>
  Natural language description of desired behavior
</ResponseField>

<ResponseField name="model" type="Union[str, Variant]" required>
  Model or variant to use for generating edits
</ResponseField>

**Returns:**

<ResponseField name="edits" type="dict[Feature, float]">
  Dictionary mapping features to their target values
</ResponseField>

**Example:**

```python Auto Steer theme={null}
edits = client.features.AutoSteer(
    specification="be more creative",
    model=variant
)
```
