> ## 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.

# Criteria Score • Rust AI Agent SDK

> CriteriaScore: Score for a specific criterion.

# CriteriaScore

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

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

Score for a specific criterion.

## Fields

| Name       | Type                   | Description               |
| ---------- | ---------------------- | ------------------------- |
| `name`     | `String`               | Criterion name            |
| `score`    | `f64`                  | Score value               |
| `weight`   | `f64`                  | Weight for this criterion |
| `feedback` | `Option&lt;String&gt;` | Feedback                  |

## Methods

### `new`

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

Create a new criteria score.

**Parameters:**

| Name    | Type                      |
| ------- | ------------------------- |
| `name`  | `impl Into&lt;String&gt;` |
| `score` | `f64`                     |

### `with_weight`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn with_weight(mut self, weight: f64) -> Self
```

Set weight.

**Parameters:**

| Name     | Type  |
| -------- | ----- |
| `weight` | `f64` |

### `with_feedback`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn with_feedback(mut self, feedback: impl Into<String>) -> Self
```

Set feedback.

**Parameters:**

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

### `weighted_score`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn weighted_score(&self) -> f64
```

Get weighted score.

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/eval/mod.rs#L183">
  `praisonai/src/eval/mod.rs` at line 183
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Criteria" icon="check-double" href="/docs/rust/criteria" />

  <Card title="Rust Evaluation" icon="gavel" href="/docs/rust/evaluation" />
</CardGroup>
