Documentation

Table of Content

Temperature - Top P

Temperature and Top P are two of the most important parameters controlling how your model generates responses. Understanding these settings helps you balance accuracy, creativity, and user experience.

Temperature

Temperature controls the randomness of the AI’s responses. A lower temperature produces more predictable answers, while a higher temperature encourages creativity and variation.

Range

Effect

Recommended Use

0.0 – 0.4

Very focused, factual, predictable

FAQs, instructions, formal responses

0.5 – 0.8

Balanced, natural responses

General chatbot conversations (recommended)

0.9 – 2.0

Creative, varied, imaginative

Storytelling, brainstorming, casual chat

  • Lower values = safer, factual, highly reliable answers

  • Higher values = more creative, varied, human-like outputs

Best practice: Start with 0.5–0.8 for general use and adjust based on your bot’s personality and context.

Top P

Top P controls diversity by limiting the set of possible next words the AI considers. Think of it as the “width” of the model’s exploration space.

Range

Effect

Recommended Use

0.0 – 0.5

Very focused, deterministic

Precision answers, technical instructions

0.6 – 0.8

Moderate diversity

Friendly conversation, general Q&A

0.9 – 1.0

Highly diverse, creative

Chatty, engaging, imaginative responses

  • Lower values produce focused, safe responses

  • Higher values produce more varied, engaging responses

Best practice: Use 0.9–0.95 for natural, human-like conversation in most chatbots.

How Temperature & Top P Work Together

  • Temperature controls randomness (how bold or conservative the model is)

  • Top P controls diversity (how many options the model considers when generating each word)

Examples:

  1. Low Temp + Low Top P: Very rigid, factual answers — perfect for FAQs.

  2. Medium Temp + High Top P: Natural, balanced chatbot responses — ideal for most websites.

  3. High Temp + High Top P: Creative and playful — great for storytelling or brainstorming.

Quick Recommendations

Use Case

Temperature

Top P

FAQs / Instructional Bots

0.3–0.4

0.5–0.6

General Chatbots

0.5–0.8

0.9–0.95

Creative / Storytelling Bots

0.9–1.2

0.95–1.0

Start with the defaults (Temp 0.5Top P 0.9) for most bots. Adjust slightly if your bot feels too rigid or too unpredictable.