Prompt Engineering Parameters
Learn about using parameters in prompts to improve the Llama 3 performance.
We'll cover the following
Meta AI provided 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 the parameters provided by Meta AI for Llama 3:
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.
Get hands-on with 1200+ tech skills courses.