Back to Developer Roadmap

Max Length

src/data/roadmaps/ai-agents/content/max-length@Bn_BkthrVX_vOuwQzvPZa.md

4.01.2 KB
Original Source

Max Length

Max Length sets the maximum number of tokens a language model can generate in one reply. Tokens are pieces of text—roughly 100 tokens equals a short paragraph. A small limit saves time and cost but risks cutting answers short. A large limit allows full, detailed replies but needs more compute and can lose focus. Choose limits based on the task: short limits for tweets, longer ones for articles. Tuning Max Length carefully helps balance clarity, speed, and cost.

Visit the following resources to learn more: