Agents built on large language models (LLMs) rely on reliability techniques such as retry, majority voting, and self-consistency developed in parallel rather than within a common analytical framework. We observe that an LLM sampled at temperature $T$ is a discrete stochastic channel $p(y \mid x)$ in the sense of Shannon's coding theory, and use this identity as the entry point for such a framework. Each of these techniques is a special case of one of six classical reliability operators: diversity combining, hybrid retransmission, iterative generator-critic decoding, rateless sampling, structured redundant verification, and difficulty-adaptive routing. Within the framework we give two closed-form results, a noise-variance threshold above which uniform averaging beats quality-weighted averaging and a contractivity criterion for generator-critic refinement, and turn each into a design rule checkable before committing compute. We further introduce a cost-aware semantic-nearest-neighbor router whose single Lagrangian knob traverses the quality-cost frontier without retraining. Across six local and cloud channel configurations, no fixed model-technique-budget choice dominates. On a 300-item hard split of MMLU, GSM8K, and HumanEval, the router occupies the empirical Pareto frontier: at matched quality its normalized cost is $\approx$56% lower than the best fixed technique, and at matched cost it improves quality by $\approx$7% (26% over single-shot decoding). Judge-free grading of 6,900 outputs confirms that the judge tracks correctness at the item level and that the router's advantage over a fixed policy persists at most cost settings; with internal reasoning enabled, the gain of external refinement shrinks but remains significant for our incremental-redundancy operator. These results argue for consolidating reliability techniques into a single tunable layer informed by channel coding.
翻译:暂无翻译