# Selection Modes

Redefine offers four selection modes to optimize testing:

1. [Discover](/configuration/selection-modes/discover.md) mode collects data for improved predictions.
2. [Optimize](/configuration/selection-modes/optimize.md) mode runs relevant tests within a time budget.
3. [Fail-Fast](/configuration/selection-modes/fail-fast.md) mode stops CI runs if tests fail within the budget, or runs all tests if they pass.
4. [Prioritize](/configuration/selection-modes/prioritize.md) mode reorders tests for faster feedback, especially when integrated with Redefine Slack or a first-fail testing framework.

{% hint style="info" %}
To enhance your developer experience, we strongly recommend the use of [AI Slack Notifications](/integrations/ai-slack-notifications.md).
{% endhint %}


---

# 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.redefine.dev/configuration/selection-modes.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.
