# Random Search

Random Search samples parameter values randomly instead of testing every combination.

This is more efficient when you have many parameters or large ranges, you'll explore the space faster without exhaustive enumeration.

#### When to use Random Search

* **Large parameter spaces:** Testing all combinations would create too many executions
* **Budget constraints:** You have limited time or compute resources
* **Exploratory tuning:** You want a quick sense of promising regions before refining

#### Create a Random Search

Follow the same steps as Grid Search, but:

1. Select **Random Search** as the Task type
2. Open your project in Valohai
3. Go to the **Tasks** tab
4. Click **Create Task**
5. Select the step that contains your parameters
6. Scroll to **Parameters**
7. For each parameter, choose **Random** as the type
8. Specify:
   * **Min and max values** for the random range
   * **Count:** How many random samples to draw for this parameter

Valohai will generate random parameter combinations and queue the specified number of executions.

> 💡 **Tip:** Random Search often finds good hyperparameters faster than Grid Search when you have more than 3-4 parameters.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.valohai.com/tasks/random-search.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
