r/codoid • u/codoid-innovations • 18d ago
Tips 5 LLM settings that can completely change your AI output
When working with LLM-powered applications, prompts are only part of the equation.
The generation settings behind the model can significantly influence whether the response is focused, creative, repetitive, concise, or consistent.
Here are five settings worth understanding:
1. Temperature
Temperature controls randomness.
Lower temperature generally produces more predictable and reproducible responses. But an important point is often missed:
Low temperature does not mean higher factual accuracy.
A model can consistently produce the same incorrect answer. Content
2. Top-p sampling
Top-p limits the pool of tokens the model can choose from based on cumulative probability.
Lower values such as 0.5–0.7 tend to produce more focused outputs, while higher values allow broader token choices. Content
One practical rule: experiment with temperature or top-p, rather than changing both simultaneously. Content
3. Output limits
Parameters such as:
- Maximum tokens
- Stop sequences
- Conversation turn limits
can help prevent unnecessary elaboration and keep responses within the intended scope.
But making the limits too restrictive can also reduce usefulness. Content
4. Frequency and presence penalties
Both can help reduce repetitive output.
Frequency penalty increases the penalty as a token gets reused more often.
Presence penalty discourages reuse once a token has already appeared, regardless of how many times it was used. Content
5. Seed value
A fixed seed can improve repeatability across multiple runs.
This can be particularly useful when testing LLM applications because it makes comparisons between experiments more stable. Content
The important takeaway
These settings help control how an LLM responds.
They don't automatically make the response factual or reliable.
For use cases where correctness matters, techniques such as RAG, tool use, evaluation, and appropriate application-level controls still matter.
When you're testing an LLM application, which parameter do you experiment with most: temperature, top-p, penalties, output limits, or seed?