> For the complete documentation index, see [llms.txt](https://docs.zerve.ai/zerve-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zerve.ai/zerve-docs/superagents/batches/hill-climb.md).

# Hill-climb

Improve one piece of work round after round, keeping what works.

A **Hill-climb** batch improves a single piece of work over several rounds. Each round tries several variations, keeps the best, and uses them as the starting point for the next round.

## When it's used

Use a Hill-climb to keep improving something that already works. For example:

* Improving a signal's Sharpe ratio while keeping turnover in check
* Making a slow warehouse query faster
* Refining the prompt behind an automated research summary

## How it works

1. Each round makes several attempts at improving the current best version.
2. The best attempts survive and become the starting point for the next round.
3. What each round learns is carried into the next, so later rounds build on earlier discoveries.
4. The hill-climb stops when a round fails to improve on the last, or when its budget is spent.

Attempts can be scored on a number, or by [judges](/zerve-docs/superagents/batches/how-judging-works.md) when quality is a judgement call. A hill-climb can also start from an [Ideation](/zerve-docs/superagents/batches/ideation.md) stage, and return to it periodically for fresh ideas.

### Guarding against overfitting

When a hill-climb is scored on a number, it can hold back part of the data as a **test set**. Each round is scored on the rest of the data, and the final result is scored once on the held-back test set. The results show both, for example **Validation 0.95 · Test 0.88**. A large gap between the two is a sign the result won't hold up on new data.

## Steering

You can give a running hill-climb guidance for its next round, for example:

> In the next round, focus on reducing drawdown rather than raising returns.

## What you see

While it runs, the batch shows phases such as **Splitting the dataset…**, **Refining attempts…**, **Scoring candidates…** and **Scoring on the test set…**. A hill-climb scored on a number shows a **score chart**; one scored by judges shows the **run explorer**, with the leading attempt in each round and how ratings changed over time.

## Example request

> Improve our momentum signal's Sharpe ratio, keeping annual turnover below 300%. Hold back the last two years as a test set.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zerve.ai/zerve-docs/superagents/batches/hill-climb.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
