Shannon's Channel Capacity for LLM Prompts: A DSP Approach to Token Cost
An LLM context window has a token limit. That limit is a fixed bandwidth. Output quality depends on how many of those tokens carry real information. Filler words, restated context, polite hedging, and pleasantries are noise. Specific instructions, concrete examples, and constraints are signal. The ratio of signal to noise decides whether you get a useful answer or a generic one.
This is not a metaphor. It is Shannon's channel-capacity theorem applied directly:
C = B × log₂(1 + SNR)
C is channel capacity: the real information reaching the model. B is bandwidth: your token budget, fixed by the model's context window. SNR is the signal-to-noise ratio. The only lever you have is SNR. Adding more noise tokens does not increase capacity. It shrinks the information per token while eating your budget.
What the Spectrum Analyzer Shows
The free Prompt SNR Spectrum Analyzer takes any prompt and splits it into sentences. For each sentence it gives you:
- Type: signal (carries new information), noise (filler / pleasantry / hedging), or redundant (restates earlier content)
- Information density: 0.0 to 1.0 score for that segment
- Estimated tokens: how much budget the segment consumes
It also gives you totals:
- Overall SNR: weighted across all segments
- Wasted tokens %: how much of your budget went to noise + redundancy
- Top 3 cuts: specific sentences to delete for the highest information gain per byte
- Recommended compression: how to restructure for higher SNR
The tool draws each segment as a colored bar. Green means signal. Red means noise. Yellow means redundant content. Bar width shows information density. It looks like an oscilloscope trace, because that is exactly what it is: a frequency spectrum of prompt density from start to finish.
Why Most Prompts Have Terrible SNR
Humans write prompts the way they write emails. That means greetings, soft framing, and polite hedging. Almost none of that matters to the model. The model does not care that you said “please” or “I would appreciate it if you could.” The model does not care about context set three messages ago. The model does not benefit from smooth English prose between two specific instructions.
What the model actually needs:
- The role you want it to play (one sentence)
- The constraints it must obey (numbered list)
- The format it must produce (one example)
- The data it must operate on (delimited block)
- The task to perform (one sentence)
That is the SINC-2 6-band format I use in production. It is built to maximize SNR for the LLM channel. A typical “natural” prompt that runs 600 tokens compresses to 180 tokens of SINC-2 with no loss in quality. Often the quality goes up, because the structured format also removes ambiguity.
Nyquist Sampling Applied to Prompts
The Nyquist sampling theorem says you must sample a signal at twice its highest frequency to rebuild it faithfully. Sample below Nyquist and you get aliasing. The high-frequency content folds back into the low-frequency band as noise you cannot remove.
The same idea applies to prompts. Critical instructions need enough repetition so the model picks them up reliably. Mentioning a constraint once in a long prompt is sub-Nyquist sampling. The model intermittently misses it. The failures look random. The fix is not to add more noise. It is to increase the sample rate of the critical signal: repeat the constraint at the right intervals, in the right format.
From a wiki synthesis I built mapping DSP to context-window engineering: "Token sampling rate in context windows. Sample too rarely → miss signal. Too often → waste budget. Token-Nyquist agent IS this theorem applied to text."
How to Use the Analyzer
Three ways to use it:
- Audit a production prompt — paste a prompt you use repeatedly. The Analyzer will tell you what fraction of every call is wasted. Multiply by your monthly volume to see your actual waste in dollars.
- Compare prompt variants — paste an old prompt, note the SNR. Restructure based on the recommendations, paste again, see the new SNR. Iterate.
- Diagnose flaky prompts — if a prompt produces inconsistent outputs, the Analyzer often reveals that critical constraints are buried in low-density sections where the model under-samples them.
The Production Version
The free Analyzer scores one prompt at a time. The paid service applies the same DSP discipline to your whole prompt corpus. It finds systemic SNR problems across templates, designs the SINC-2 format for your model and task distribution, and delivers a measurable token-cost reduction with documented quality preservation. Typical client outcome: 3-10x cost reduction on top-volume prompt patterns. The math is the same. The deployment is custom.
Analyze Your Prompt's Information Density
Paste any prompt. Returns sentence-by-sentence SNR scoring (signal vs noise vs redundant), Shannon channel-capacity estimate, wasted-tokens percentage, top 3 cuts, recommended compression.
Context Window DSP Engineering — Service #38
Production token-cost optimization using Shannon capacity, Nyquist sampling, windowing functions on your real prompt corpus. Typical result: 3-10x cost reduction with quality preservation.
// Production AI Engineering
Build AI systems that hold up in production.
sinc-LLM designs, audits, and stabilises production AI infrastructure: from vendor evaluation and cost accountability to incident controls and MCP architecture.
See what we do →