Skip to content

Learning path · Models & Tokens · 10

Semantic Density

How much meaning you pack per token—dense prompts convey constraints and evidence compactly without wasting context window.

Why it matters

  • Higher density leaves room for retrieval and tool results.
  • Verbose prompts push out facts the model needs to answer well.
  • Pairs with chunking and context-engineering tradeoffs.

Key ideas

  • Information per token
  • Compression vs clarity
  • Context budget

Semantic density is editorial discipline: bullet constraints instead of repeating them in prose, use delimiters for sections, prefer tables or JSON for structured facts the model must respect. Low-density prompts feel friendly but evict retrieved evidence from the window. When evaluating prompts, ask not only "is it clear?" but "what else could fit if this were 30% shorter?" DSPy and programmatic prompting often win by searching for denser instruction variants automatically. Review dense prompts with product and legal stakeholders to ensure compression did not delete mandatory disclosures or safety language.

Updated 2026-08-09 · Full learning path