PromptForge
AI Glossary

Models & architecture

Attention

Also known as: self-attention, attention mechanism

Definition

Attention is the mechanism that lets a model weigh how much each token should influence the interpretation of every other token. It is how a model resolves what a pronoun refers to, or which clause modifies which noun.

For each token, attention computes query, key and value vectors. The query is compared against every key to produce weights, and those weights determine how much each token's value contributes to the output. Repeated across many "heads" and layers, this builds increasingly abstract representations.

Different attention heads specialise. Some track syntax, some resolve coreference, some attend to positional patterns. This specialisation is emergent rather than designed.

Attention is also why prompt position matters. Models attend unevenly across long contexts, which produces the well-documented tendency to under-weight material in the middle of a long document.

Related terms

Put this into practice

Understanding the term is step one. Our free courses and tools let you actually use it.

Prompt

Competitor Positioning Snapshot

Competitive research with citations. Use this before a positioning workshop, a pricing review, or writing comparison copy — the table format makes it easy to spot where a rival is genuinely stronger versus where they are just louder. Always run it on a search-grounded model like Perplexity so every claim carries a source and a date you can verify.

Article

GPT vs Claude vs Gemini: An Honest Comparison

A practical comparison of the three leading AI models across writing, coding, reasoning, long documents and cost — including which one to reach for on which task, and where each genuinely falls short.

Article

Which AI API Is Cheapest? How to Actually Compare

Headline price per million tokens is a misleading way to compare AI APIs. Here is how to calculate real cost for your workload, and the four changes that cut bills the most.

Glossary

Chain-of-thought prompting

Chain-of-thought prompting asks a model to work through its reasoning step by step before answering. It measurably improves accuracy on maths, logic, and multi-step problems by forcing intermediate steps instead of an immediate guess.

Glossary

Distillation

Distillation trains a smaller model to imitate a larger one, transferring much of the capability at a fraction of the inference cost. Most small production models are distilled from bigger teachers.

Glossary

Fine-tuning

Fine-tuning continues training a pre-trained model on your own examples to specialise its behaviour. It is the right tool for teaching consistent style, format or classification behaviour — not for adding knowledge.