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

# Reflection Output • Rust AI Agent SDK

> ReflectionOutput: Output from a reflection step

# ReflectionOutput

> Defined in the [**extras**](../modules/extras) module.

<Badge color="orange">Rust AI Agent SDK</Badge>

Output from a reflection step

## Fields

| Name           | Type                   | Description                     |
| -------------- | ---------------------- | ------------------------------- |
| `original`     | `String`               | The original output             |
| `reflection`   | `String`               | The reflection analysis         |
| `improved`     | `Option&lt;String&gt;` | The improved output (if any)    |
| `confidence`   | `f64`                  | Confidence score (0.0 - 1.0)    |
| `was_modified` | `bool`                 | Whether the output was modified |

## Methods

### `new`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn new(original: impl Into<String>, reflection: impl Into<String>) -> Self
```

Create a new reflection output

**Parameters:**

| Name         | Type                      |
| ------------ | ------------------------- |
| `original`   | `impl Into&lt;String&gt;` |
| `reflection` | `impl Into&lt;String&gt;` |

### `with_improvement`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn with_improvement(
        original: impl Into<String>,
        reflection: impl Into<String>,
        improved: impl Into<String>,
    ) -> Self
```

Create with improved output

**Parameters:**

| Name         | Type                      |
| ------------ | ------------------------- |
| `original`   | `impl Into&lt;String&gt;` |
| `reflection` | `impl Into&lt;String&gt;` |
| `improved`   | `impl Into&lt;String&gt;` |

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/parity/extras.rs#L448">
  `praisonai/src/parity/extras.rs` at line 448
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Reflection" icon="mirror" href="/docs/rust/reflection" />

  <Card title="Rust Self-Reflection" icon="brain" href="/docs/rust/self-reflection" />

  <Card title="Rust Output" icon="file-export" href="/docs/rust/output" />

  <Card title="Rust Structured Output" icon="code" href="/docs/rust/structured-output" />

  <Card title="Rust Display" icon="display" href="/docs/rust/display" />
</CardGroup>
