Prompt weighting

프롬프트 가중치

Syntax — usually parentheses and a number — that scales how strongly a single word in the prompt should be reflected.

Also known as: Prompt emphasisAttention weighting
···
html
<div class="wrap">
  <div class="promptbar">호수 위의 (산:<b id="w">1.1</b>), 노을</div>
  <canvas id="cv"></canvas>
</div>
css
.wrap{position:relative;width:100%;height:100%}
#cv{position:absolute;inset:0;width:100%;height:100%}
.promptbar{position:absolute;top:10px;left:10px;right:10px;z-index:2;padding:7px 10px;border-radius:10px;
  background:rgba(13,13,18,0.55);backdrop-filter:blur(6px);border:1px solid rgba(255,255,255,0.15);
  font-size:11px;color:#f1f0ec;font-family:ui-monospace,monospace}
.promptbar b{color:var(--accent)}
js
const cv = document.getElementById('cv'), ctx = cv.getContext('2d');
const wEl = document.getElementById('w');
function fit() { const dpr = Math.min(devicePixelRatio || 1, 2); cv.width = innerWidth * dpr; cv.height = innerHeight * dpr; ctx.setTransform(dpr, 0, 0, dpr, 0, 0); }
addEventListener('resize', fit); fit();

function render(weight) {
  const w = innerWidth, h = innerHeight;
  const g = ctx.createLinearGradient(0, 0, 0, h);
  g.addColorStop(0, 'hsl(28 70% 60%)'); g.addColorStop(1, 'hsl(255 40% 22%)');
  ctx.fillStyle = g; ctx.fillRect(0, 0, w, h);
  ctx.beginPath(); ctx.arc(w * 0.72, h * 0.28, Math.min(w, h) * 0.08, 0, Math.PI * 2); ctx.fillStyle = 'hsl(45 90% 78%)'; ctx.fill();
  ctx.fillStyle = 'hsl(210 35% 20%)'; ctx.fillRect(0, h * 0.82, w, h * 0.18);
  const scale = 0.45 + weight * 0.4;
  const sat = 20 + weight * 35;
  const baseY = h * 0.82, peakY = baseY - h * 0.42 * scale, halfW = w * 0.22 * scale;
  const cx = w * 0.42;
  ctx.beginPath(); ctx.moveTo(cx - halfW, baseY); ctx.lineTo(cx, peakY); ctx.lineTo(cx + halfW, baseY); ctx.closePath();
  ctx.fillStyle = 'hsl(255 ' + sat + '% ' + (22 + weight * 6) + '%)'; ctx.fill();
}
let t = 0;
setInterval(() => {
  t += 0.045;
  const weight = 1.1 + Math.sin(t) * 0.7;
  wEl.textContent = weight.toFixed(1);
  render(weight);
}, 50);
render(1.1);

Every prompt token becomes an embedding vector that contributes to the conditioning steering generation. Weighting syntax — typically a multiplier attached after a word — scales how much that one token contributes before it is combined with the rest. Raise the weight and that concept reads more prominently in composition, size, and saturation; lower it and it fades toward the background.

The exact notation differs by tool — parentheses with a number, repeated symbols, brackets for de-emphasis — but the underlying mechanism, scaling one token's contribution numerically, is the same idea everywhere it shows up.

Pushing a weight to an extreme does not scale the concept proportionally bigger. Past a certain point, it tends to break down rather than simply show up "more" — color clipping, a shape falling apart.

The demo below is a simulation, not real token-weight math — it ties one element in the picture (a mountain) to the number rising and falling in the prompt text, growing and saturating along with it, to show weight controlling that element's share of the composition.

When to use

Use it when one concept among several in the prompt needs to stand out or recede. Handy for a local nudge rather than rewriting the whole sentence.