# Max Tokens

***Max Tokens*** is a fine-tuning parameter that controls the maximum length of the output text generated by the language model. It specifies the maximum number of tokens (words or subwords) that the model can generate in response to a given prompt or input.

For example, if you set max tokens to 50, the model will generate a response of up to 50 tokens in length. If the model reaches the maximum length before generating a complete sentence or idea, it will stop generating text.

The ***Max Tokens*** parameter can be useful for controlling the length of the generated text, especially if you want to avoid getting very long and possibly irrelevant responses from the model.


---

# 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://adri567.gitbook.io/autogpt/how-to-use/gpt/max-tokens.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.
