Controlling the model through settings, not just the prompt
Besides the prompt itself, you have levers to control the models behavior: a system prompt (sets the role and rules) and parameters (control the nature of the output). Mastering them turns "however it comes out" into predictable, tuned behavior.
The system prompt
A system prompt is an instruction setting the models role and rules for the whole conversation. "You are a support assistant for our bank. Answer briefly, politely, only about the banks products, do not give financial advice". It is separate from user messages and defines how the model behaves. This is the main tool for tuning behavior to the task.
Key parameters
- Temperature: "creativity"/randomness. Low (near 0) — predictable, stable answers (for facts, structure). High — diverse, creative (for idea generation). For reliable tasks usually low.
- Max tokens: a response length limit — control of cost and volume.
- Others: parameters affecting word choice, repetitions (depend on the provider).
Context and history
An LLM API usually takes not one message but a history: system prompt + previous messages + new request. So the model "remembers" the conversation. But remember: a long context is more tokens (costlier and there is a limit). Managing what and how much you send in the context is an important skill for cost and quality. Do not drag the whole history if not needed.
Rule: a system prompt sets the models role and rules, parameters (temperature, max tokens) control the output. For reliable tasks — low temperature; manage the context for cost.
🧠 Which temperature for tasks needing predictability (data extraction, structure)?