The Research Report
The Semantic Density Effect: Why Saying Less Makes LLMs Smarter
Or: How to get +11.7pp accuracy by removing words, not adding them
Every prompt engineering technique you've been taught makes your prompts longer. Chain-of-thought? Add reasoning steps. Few-shot examples? Append demonstrations. Prompt repetition? Duplicate the entire instruction. The implicit assumption has always been: more context, more guidance, more tokens = better results.
A paper published this April on arXiv (2604.17659) turns that assumption on its head. The authors introduce the Semantic Density Effect (SDE) — the empirical finding that prompts carrying higher semantic information per token consistently produce more accurate, focused, and less hallucinated outputs across all major LLM families. The key insight isn't adding information. It's compressing what you already have.
The numbers are striking: ultra-dense prompts (SDE > 0.80) outperform their diluted counterparts by +8.4 percentage points across five frontier models and seven benchmarks — with zero additional tokens and zero latency overhead. Combined with the Instruction Placement Effect (IPE), gains reach +11.7pp. That's a double-digit accuracy improvement that costs you literally nothing.
Let me say that again for the people in the back: you can improve LLM accuracy by nearly 12 percentage points by changing how you write your prompts, without spending a single extra token.
What Is Semantic Density?
The paper defines Semantic Density as the ratio of semantically loaded tokens to total prompt tokens, adjusted for two factors: redundancy and concreteness.
Think of it like this: every token in your prompt either carries meaning or it doesn't. "Please" doesn't carry meaning in an instruction context. "Carefully" is often redundant when the task already implies precision. "It is important to note that" is five tokens of throat-clearing before the actual information arrives.
SDE formalizes this intuition:
SDE = (Semantically Loaded Tokens) / (Total Prompt Tokens)
Where:
- Semantically loaded = tokens that carry task-relevant meaning
- Adjusted downward for redundancy (repeated information)
- Adjusted downward for vagueness (abstract vs. concrete terms)
A prompt with SDE of 0.80 means that 80% of its tokens are pulling their weight. The remaining 20% are filler — pleasantries, repetition, hedging, or vague qualifiers that dilute the signal the model actually needs.
Consider these two prompts:
Low SDE (~0.45):
Please carefully read the following passage and think step by step about
what the correct answer might be. It's really important that you pay close
attention to the details and provide an accurate response. The passage is
about a topic in science, and you should use your knowledge to answer.
High SDE (~0.85):
Identify the correct answer from the passage. Output the letter only.
Same task. Same model. The second prompt will consistently outperform the first — not because the model is being "disrespected" by brevity, but because every token in the dense prompt carries signal, and the model has less noise to filter through.
Why Density Beats Verbosity
The mechanism is intuitive once you stop thinking of LLMs as readers and start thinking of them as information processors. An LLM doesn't "appreciate" politeness. It doesn't need motivational framing. Every token you add to a prompt competes for attention in the model's context window — and in its internal representations.
When you say "please carefully consider," you're not being helpful. You're injecting three tokens ("please," "carefully," "consider") that the model must encode, process, and weigh alongside the actual task specification. Those tokens create what the authors call semantic dilution — they lower the signal-to-noise ratio of the entire prompt.
The effect compounds. A prompt that's 40% filler doesn't just waste 40% of its tokens. It actively degrades the model's ability to attend to the 60% that matters, because attention mechanisms distribute compute across all tokens proportionally. More filler means less attention per meaningful token.
This explains a puzzling observation that prompt engineers have noticed anecdotally for years: shorter prompts often work better. It's not that models prefer brevity for aesthetic reasons. It's that brevity, when done right, is density — and density is signal.
The Experimental Evidence
The paper evaluates SDE across five frontier models and seven benchmarks, which gives the findings unusual robustness compared to single-model studies:
- Models tested: GPT-4o, Claude 3.5 Sonnet, Gemini 1.5 Pro, Llama 3.1 405B, and Mistral Large
- Benchmarks: MMLU, GSM8K, HumanEval, ARC-Challenge, HellaSwag, TruthfulQA, and GPQA
- SDE range tested: From ~0.30 (highly diluted) to >0.80 (ultra-dense)
The core result:
| Metric | Gain |
|---|---|
| SDE > 0.80 vs. diluted baseline | +8.4pp |
| SDE + IPE combined | +11.7pp |
| Additional tokens required | 0 |
| Additional latency | 0 |
These aren't marginal improvements. +8.4pp on MMLU is the difference between a model that gets 72% and one that gets 80%. On TruthfulQA, it's the difference between a model that hallucinates on 35% of questions and one that hallucinates on 27%.
The gains are consistent across all five models, which suggests this isn't a quirk of a particular training data distribution or alignment procedure. Dense prompts work because they align with how transformer architectures fundamentally process information.
SDE vs. Other Prompt Optimization Techniques
This is where SDE gets genuinely interesting — and where it diverges from every other prompt optimization method in the literature:
| Technique | Mechanism | Token Cost | Latency Cost |
|---|---|---|---|
| Chain of Thought | Adds reasoning steps | High | High |
| Few-Shot Examples | Appends demonstrations | High | Moderate |
| Prompt Repetition | Duplicates instructions | High | High |
| Instruction Placement | Reorders components | Zero | Zero |
| SDE | Removes/replaces low-info tokens | Negative | Zero |
SDE is the only technique that reduces token count while improving performance. Every other method works by adding more context. SDE works by making existing context more potent.
This has practical implications that go beyond accuracy:
- Cost: Fewer input tokens means lower API bills, especially on models that charge by the token
- Speed: Shorter prompts mean faster time-to-first-token
- Context window: Dense prompts leave more room for actual data, documents, and conversation history
- Composability: Dense prompts are easier to compose with other techniques (like IPE) without hitting context limits
The authors demonstrate this composability explicitly. When SDE is combined with the Instruction Placement Effect (placing key instructions at the beginning and end of the prompt, which leverages the primacy and recency biases in transformer attention), the total gain reaches +11.7pp. The two techniques are orthogonal — they attack different sources of suboptimal prompt performance — and their effects stack.
A Practical Guide to Increasing Semantic Density
The paper's framework translates into concrete editing rules. Here's how to apply SDE to your own prompts:
1. Strip pleasantries and meta-commentary
# Before (low density)
prompt = """
I'd like you to help me with something. Please read the following
text carefully and provide a thoughtful, detailed summary that
captures the main points. It would be great if you could focus on
the key arguments and evidence presented.
"""
# After (high density)
prompt = "Summarize the key arguments and evidence."
Tokens removed: 24 → 7. Meaning preserved.
2. Replace vague qualifiers with specific constraints
# Before (low density)
prompt = """
Write a somewhat detailed explanation that covers the main aspects
of the topic in a clear and comprehensive way. Make sure it's not
too long but also not too short.
"""
# After (high density)
prompt = "Explain in 3-5 sentences covering: definition, mechanism, evidence."
Vague → concrete. Every token now encodes a specific constraint.
3. Eliminate redundancy
# Before (low density - note the repeated instruction)
prompt = """
Classify this review as positive or negative. Determine whether
the sentiment of the review is positive or negative, and output
your classification accordingly.
"""
# After (high density)
prompt = "Classify sentiment: positive or negative. Output label only."
Said once = said well. Repetition lowers density without adding information.
4. Use domain-precise vocabulary
# Before (low density - everyday language)
prompt = """
Look at the numbers and figure out if there's a pattern. Tell me
if the numbers seem to be going up over time in a way that seems
like it keeps speeding up.
"""
# After (high density - technical vocabulary)
prompt = "Determine if the sequence exhibits exponential growth."
Technical terms are information-dense by design. One word ("exponential") replaces an entire vague description.
5. Compress examples into schemas
# Before (low density - verbose few-shot)
prompt = """
Here are some examples:
Example 1: The capital of France is Paris.
Example 2: The capital of Germany is Berlin.
Example 3: The capital of Italy is Rome.
Now answer: What is the capital of Spain?
"""
# After (high density - schema-based)
prompt = "capital(Country) → City. capital(France)=Paris, capital(Germany)=Berlin. capital(Spain)=?"
Same information. Fewer tokens. Higher density.
Computing SDE: A Pseudo-Code Approach
While the paper uses a trained classifier to identify semantically loaded tokens, you can approximate SDE with a simpler heuristic. Here's a pseudo-code implementation:
import re
def compute_semantic_density(prompt: str) -> float:
"""
Approximate SDE score for a prompt.
Range: 0.0 (all filler) to 1.0 (every token carries meaning).
"""
tokens = prompt.split()
total_tokens = len(tokens)
if total_tokens == 0:
return 0.0
# Define low-information token patterns
filler_words = {
'please', 'kindly', 'just', 'really', 'very', 'quite',
'basically', 'essentially', 'actually', 'simply',
'note', 'remember', 'important', 'carefully', 'properly',
'make', 'sure', 'need', 'want', 'like', 'would', 'could',
'should', 'might', 'perhaps', 'maybe', 'somewhat',
'rather', 'fairly', 'reasonably', 'appropriately',
}
filler_phrases = [
r'it is important to note',
r'keep in mind',
r'pay attention to',
r'bear in mind',
r'it should be noted',
r'as you know',
r'as mentioned',
r'in other words',
r'that is to say',
r'i would like you to',
r'i want you to',
r'please note that',
r'it goes without saying',
]
# Count semantically loaded tokens
loaded = 0
for token in tokens:
word = token.lower().strip('.,!?;:')
# Skip filler words
if word in filler_words:
continue
# Skip articles and prepositions (approximation)
if word in {'a', 'an', 'the', 'of', 'to', 'in', 'on', 'at', 'by', 'for'}:
# These can be loaded in context, so don't always skip
# Simple heuristic: skip if surrounded by other low-info words
continue
loaded += 1
# Penalize redundancy (approximate: repeated phrases)
redundancy_penalty = 0.0
for phrase in filler_phrases:
matches = len(re.findall(phrase, prompt.lower()))
if matches > 1:
redundancy_penalty += 0.05 * (matches - 1)
# Penalize vagueness markers
vague_terms = {'somewhat', 'kind of', 'sort of', 'more or less', 'a bit'}
vagueness_penalty = 0.0
for term in vague_terms:
if term in prompt.lower():
vagueness_penalty += 0.02
raw_density = loaded / total_tokens
adjusted_density = max(0.0, raw_density - redundancy_penalty - vagueness_penalty)
return round(adjusted_density, 3)
# Quick test
diluted = "Please carefully read the following passage and think step by step about what the correct answer might be."
dense = "Identify the correct answer. Output the letter only."
print(f"Diluted SDE: {compute_semantic_density(diluted)}") # ~0.35-0.45
print(f"Dense SDE: {compute_semantic_density(dense)}") # ~0.75-0.85
This is an approximation — the paper uses a more sophisticated semantic classifier — but it captures the core idea: count the tokens that carry meaning, penalize repetition and vagueness, and divide by the total.
The Deeper Implication: Prompt Design as Information Theory
SDE reframes prompt engineering as an information-theoretic problem rather than a linguistic or rhetorical one. The goal isn't to write "good" prompts in the human sense — clear, well-structured, polite. The goal is to maximize the mutual information between your prompt and the desired output.
This has a corollary that many practitioners resist: the prompt that feels right to a human is often the wrong prompt for a model. Humans appreciate context-setting, hedging, and politeness because we process language through social and pragmatic filters. LLMs process tokens through attention mechanisms that weight every token equally (in principle) and attend to whatever carries the strongest signal.
When you write "It is very important that you get this right," you're adding five tokens that carry zero task-relevant information but that the model must still attend to. Those five tokens steal compute from the tokens that actually specify what "right" means.
The SDE result suggests an uncomfortable truth: the most effective prompts for LLMs are the ones that would read as rude, terse, or overly direct if sent to a human colleague. Not because models are antisocial, but because models don't need social scaffolding. They need signal.
Combining SDE with IPE: The +11.7pp Stack
The Instruction Placement Effect (IPE) is the finding that the position of instructions within a prompt matters — specifically, instructions at the beginning and end of a prompt receive disproportionately high attention, while instructions in the middle get relatively less.
SDE and IPE are naturally complementary:
- SDE maximizes the quality of each token (information per token)
- IPE maximizes the positional salience of key instructions (where the most important tokens go)
When you combine them, you get prompts that are both dense and strategically structured:
def apply_sde_ipe(prompt_sections: dict) -> str:
"""
Apply SDE + IPE to construct an optimized prompt.
IPE placement:
- Opening: Primary instruction (highest attention)
- Middle: Context, data, examples (lower attention, but needed)
- Closing: Reinforcement / output format (recency boost)
SDE optimization:
- Strip all sections to minimal information-bearing tokens
- Remove redundancy across sections
"""
# Step 1: Dense each section (SDE)
instruction = densify(prompt_sections['instruction']) # e.g., "Classify: positive/negative"
context = densify(prompt_sections['context']) # e.g., input data, documents
output_format = densify(prompt_sections['output_format']) # e.g., "Output JSON: {label, confidence}"
# Step 2: Arrange by IPE (instruction-placement effect)
optimized = f"{instruction}\n\n{context}\n\n{output_format}"
return optimized
# Example output:
# """Classify sentiment: positive or negative.
#
# [passage text here]
#
# Output JSON: {"label": "positive"|"negative", "confidence": 0.0-1.0}"""
The key insight: SDE makes IPE more effective because IPE amplifies whatever tokens are present at the edges. If those edge tokens are filler, you're amplifying noise. If they're dense, you're amplifying signal.
Limitations and Open Questions
SDE isn't a silver bullet. The paper acknowledges several boundaries:
- Task specificity: SDE gains are largest on classification, QA, and reasoning tasks. On open-ended creative generation, ultra-dense prompts can produce brittle or narrow outputs. Sometimes a model does benefit from contextual padding that primes certain styles or registers.
- Density ceiling: There's a point where compression starts removing genuinely useful information. SDE > 0.80 works well, but pushing toward 1.0 can strip nuance that matters. The sweet spot depends on the task.
- Model-dependent baseline: Models with strong instruction-following training (like Claude) may show smaller absolute gains from SDE because they're already good at extracting signal from noisy prompts. The effect is largest on models where attention is most diffuse.
- Interaction with other techniques: SDE and Chain-of-Thought seem contradictory (one removes tokens, the other adds them), but they can be combined — the key is to make the chain-of-thought itself dense rather than adding it as padding around a diluted instruction.
What This Means for Prompt Engineering
The SDE paper crystallizes something that experienced prompt engineers have sensed but struggled to articulate: the best prompts aren't the most detailed ones. They're the most information-dense ones.
This reframing has immediate practical implications:
- Audit your prompts for filler. Every "please," "carefully," and "it's important to note" is a tax on model performance.
- Prefer technical vocabulary. One precise term beats a paragraph of vague explanation.
- Don't repeat yourself. If you've said it, the model has read it. Saying it again doesn't help — it hurts.
- Put your densest instructions at the start and end. Let IPE amplify your highest-density content.
- Measure your SDE. Even a rough heuristic (like the pseudo-code above) will tell you whether your prompts are in the 0.30-0.50 range (bad) or the 0.70-0.85 range (good).
The era of prompt engineering as "write longer, add more examples, include more context" is giving way to something more precise: maximize information per token, minimize noise, and let the model's attention mechanisms do what they're designed to do.
The Semantic Density Effect isn't just a research finding. It's a design principle: say less, mean more.
Based on "Semantic Density Effect (SDE): Maximizing Information Per Token Improves LLM Accuracy" by Amr Ahmed, arXiv:2604.17659, April 2026.