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

# Example

> Explore data currency that makes up DSRs.

`Example<S>` is the typed training/evaluation row for a signature `S`.

```rust theme={null}
use dspy_rs::{Example, Signature};

#[derive(Signature, Clone, Debug)]
struct QA {
    #[input]
    question: String,
    #[output]
    answer: String,
}

let row = Example::new(
    QAInput {
        question: "What is 2+2?".to_string(),
    },
    QAOutput {
        answer: "4".to_string(),
    },
);
```

Use `Vec<Example<S>>` for:

* `evaluate_trainset(...)`
* `optimizer.compile::<S, _, _>(...)`

For file/dataset ingestion, use [`DataLoader`](/docs/data/dataloader).
