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

# How it works

> Build, evaluate, deploy, observe, and improve an EigenPal workflow.

An EigenPal project usually moves through five steps: build a workflow, evaluate
it, deploy it, inspect real runs, and add failures back to the dataset. The
example below extracts a bank statement, but the same process applies to other
document and data workflows.

## Build

Create a [workflow](/concepts/workflows): a directed graph of typed steps that
parse, extract, transform, and act on data. For open-ended tasks that do not fit
a fixed graph, use a Git-backed [agent](/concepts/agents). In both cases, the
definition is stored in files you can read, diff, and version.

```bash theme={null}
eigenpal init workflow extract-statement
eigenpal workflow push
```

## Evaluate

Attach a [dataset](/guides/build-a-dataset) of example documents with their
expected output, and [evaluators](/concepts/evals) that define what correct
means for this document type. Run an experiment across the whole dataset and
tune the workflow until it clears a pass threshold.

```bash theme={null}
eigenpal workflow evaluators push <workflow-id>
eigenpal workflow experiment run <workflow-id> --wait
```

## Deploy

Run the workflow from the dashboard, CLI, SDKs, or API. A request returns a run
id; workers execute the run asynchronously and store inputs, outputs, traces,
and model versions. Experiments store evaluator scores.

```bash theme={null}
eigenpal run workflows.extract-statement --input-file document=statement.pdf
```

## Observe

Use the run trace to inspect each step, its inputs, and its output. This is where
you debug unexpected results and find gaps in the dataset.

```bash theme={null}
eigenpal runs trace <run-id>
```

## Improve

When a real document exposes a wrong answer, add that input and the corrected
output to the evaluation dataset. Re-run the experiment and compare the new
version before shipping.

That turns production issues into regression tests. The full flow is covered in
[Eval-first development](/guides/eval-first-development).
