temperature-zero-determinism

Installation
SKILL.md

Temperature 0.0 Greedy Decoding Protocol (Deterministic Synthesis)

Overview

When invoking LLM APIs for code generation, refactoring, or tool calling, default client SDKs often use default sampling temperatures of 0.7 to 1.0.

Non-zero temperatures introduce stochastic randomness into next-token selection:

  1. Hallucinated Method Signatures: High-entropy sampling occasionally selects lower-probability tokens, inventing non-existent package methods (e.g., redis.get_json() instead of redis.get()).
  2. Syntax Errors & Compiler Breakages: Non-deterministic sampling causes dropped semicolons, invalid JSON commas, and mismatched brackets.
  3. Expensive Multi-Turn Retry Loops: When a stochastic typo breaks unit tests, the agent burns 3 to 5 additional turns ($0.15 - $0.35) attempting to diagnose and fix its own self-inflicted hallucination.

The Temperature 0.0 Greedy Decoding Protocol forces greedy sampling ($T=0.0$), ensuring the model always selects the highest-probability, deterministic token at every step.


Stochastic Sampling ($T=0.7$) vs. Greedy Determinism ($T=0.0$)

Installs
1
GitHub Stars
2
First Seen
Oct 24, 2026