temperature
A sampling parameter (0.0 to 2.0 typically) that controls the randomness of token selection. Lower = more deterministic; higher = more creative.
Syntax
prompt-engineering
{ temperature: 0.0 } // deterministic
{ temperature: 1.0 } // balanced
{ temperature: 1.5 } // creativeExample
prompt-engineering
Temperature 0.0: "The capital of France is Paris."
Temperature 0.7: "Paris, the City of Light, is France's capital."
Temperature 1.5: "Ah, Paris! That magnificent jewel of Europe..."
// Use low temp for factual/code tasks
// Use high temp for creative writing/brainstorming