Bird
0
0

You want the model to generate a creative but concise answer. Which combination of temperature and max_tokens is best?

hard📝 Application Q8 of 15
LangChain - LLM and Chat Model Integration
You want the model to generate a creative but concise answer. Which combination of temperature and max_tokens is best?
Atemperature = 0.8, max_tokens = 20
Btemperature = 0, max_tokens = 100
Ctemperature = 1.5, max_tokens = 5
Dtemperature = 0.2, max_tokens = 50
Step-by-Step Solution
Solution:
  1. Step 1: Define creative and concise output

    Creative means higher temperature; concise means limited tokens.
  2. Step 2: Evaluate options

    temperature = 0.8, max_tokens = 20 has moderate-high temperature (0.8) for creativity and low max_tokens (20) for conciseness.
  3. Final Answer:

    temperature = 0.8, max_tokens = 20 -> Option A
  4. Quick Check:

    Creative + concise = moderate-high temp + low max_tokens [OK]
Quick Trick: Balance temperature and max_tokens for creativity and length [OK]
Common Mistakes:
  • Choosing high max_tokens for conciseness
  • Using temperature 0 for creativity
  • Picking very high temperature with very low tokens

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LangChain Quizzes