...

/

Prompt Engineering Parameters

Prompt Engineering Parameters

Learn about using parameters in prompts to improve the model's performance.

Most AI models provide some parameters that we can apply in prompt engineering to control the model output. These parameters can improve the model's performance by controlling the output tokens instead of refining the input prompts. The following are some common parameters:

  • Temperature

  • Sampling

  • Repetition penalty

  • Max tokens

Temperature

The temperature is a key parameter in prompt engineering that controls the randomness and creativity of the generated output. It's a floating point variable ranging from 0 to 2. We can adjust its value to achieve a balance between structured and creative responses.

A temperature value closer to 0 generates a more confident and deterministic response. This setting is useful for scenarios where we need more fact-based and reliable responses, for example, writing a technical blog or performing mathematical calculations.

Temperature
Temperature

Let's try prompting the LLM with ...