{"course":{"slug":"making-things-with-ai","title":"Making Things with AI","url":"https://addaly.com/learn/making-things-with-ai","level":"beginner","track":"create"},"lesson":{"slug":"words-into-steering","title":"How your words become a steering signal","url":"https://addaly.com/learn/making-things-with-ai/words-into-steering","position":4,"of":84,"minutes":9,"answer":"A text encoder turns your prompt into a sequence of vectors that the network attends to at every step and every position, which is why prompts steer continuously rather than being read once.","keyIdea":"A text encoder turns your prompt into a sequence of vectors that the network attends to at every step and every position, which is why prompts steer continuously rather than being read once."},"body":{"format":"markdown","text":"## The prompt is not read, it is attached\n\nThere is a mental model most people arrive with: the model reads the sentence, understands it, then draws. That is not the shape of the machinery, and the difference explains most prompt behaviour.\n\nYour text goes first to a separate, already-trained **text encoder**: a language model that never generates anything. It converts the prompt into a sequence of vectors, one per token, each a few hundred to a few thousand numbers long. That sequence is then handed to the denoising network as a fixed side input. At every one of the thirty steps, and at every position in the latent grid, the network looks at that sequence and asks which parts of it are relevant *here*.\n\nThe mechanism for looking is **cross-attention**. For each cell of the latent, the network computes a similarity between what it is currently building there and each token vector, then blends the token vectors in proportion. A cell that is turning into fur attends strongly to \"cat\"; a cell in the background attends to \"kitchen\". Nothing assigns regions to words in advance. The assignment emerges, step by step, and it can go wrong.\n\n## Which encoder, and why it matters\n\nThe choice of text encoder is one of the largest differences between generations of image models, and it is not cosmetic.\n\n- Early Stable Diffusion used **CLIP**, a model trained to match images with their captions. CLIP is excellent at the gist of a caption and poor at grammar. It was trained on alt text, where word order carries little meaning, and it inherits that.\n- SDXL used two CLIP encoders together, concatenating their outputs, which improved reliability without changing the character.\n- Current models add or replace these with **T5**, a general text model trained on prose. T5 tracks clauses, negation and relations far better, which is exactly why newer models can handle \"the red mug is to the left of the blue one\" when older ones could not.\n\nThis is the mechanism behind advice that seems contradictory across tools. On a CLIP-only model, comma-separated tags outperform sentences, because CLIP is a bag-of-concepts machine and the sentence structure is wasted. On a T5-based model, a plain sentence outperforms tags, because the encoder can use the syntax and the tag soup looks nothing like its training text. Neither piece of advice is wrong; each is about a different encoder.\n\n## The binding problem, at its source\n\nCross-attention explains the most common failure in prompting. Ask for **a red cube and a blue sphere** and you will sometimes get a blue cube and a red sphere, or two purple objects.\n\nThe token vectors for \"red\" and \"cube\" are separate. Nothing in the architecture ties an adjective to the noun that follows it. Both are available at every cell, and the cell picks by similarity. Regions building a cube attend to \"cube\" strongly and to both colour words weakly, so the colour that wins is close to arbitrary. Encoders that read syntax reduce the leak because \"red\" and \"cube\" end up with more similar representations; they do not eliminate it.\n\nThe practical consequence is that attribute binding gets more reliable when you separate the objects in the request: into different clauses, different regions specified explicitly, or different generation passes composited afterwards. It does not get more reliable when you shout.\n\n## The number nobody mentions\n\nCLIP text encoders have a context of **77 tokens**, including two markers, so roughly 75 tokens of prompt. A token is about three-quarters of an English word. Past that limit, the rest is silently dropped or, in some tools, split into a second chunk and averaged with the first, which is not the same as being read.\n\nInterfaces rarely warn you. A 200-word prompt on a CLIP-based model means about 55 words steer and the rest do nothing at all, and because the output still looks like the beginning of the prompt, people conclude their late clauses were ignored for stylistic reasons. They were not read. T5-based pipelines allow 256 or 512 tokens, which is why long prompts suddenly started working on newer models.\n\nIf your tool shows a token counter, watch it. If it does not, the test is simple: append something outrageous (\"and a giraffe\") to the end of a long prompt. If no giraffe appears and no other change occurs, you are past the limit."},"check":{"question":"A prompt asks for \"a green bottle beside a brown loaf\" and the model returns a brown bottle beside a green loaf. What does this reveal about the mechanism?","options":[{"text":"The model has learned an incorrect and persistent association between bottles and the colour brown from biased training captions, and is applying that learned association in place of the requested colour.","correct":false,"tempting":"Would predict a consistent bias toward brown bottles across seeds, whereas attribute swapping varies run to run and affects both objects symmetrically."},{"text":"Attributes and nouns arrive as separate token vectors available at every latent cell, so nothing structurally binds \"green\" to \"bottle\".","correct":true},{"text":"The prompt exceeded the encoder's token limit, so the colour words were truncated.","correct":false,"tempting":"Truncation drops content entirely; here both colours appeared, merely on the wrong objects."},{"text":"The sampler introduced randomness late in the run, which shuffled colours between regions.","correct":false,"tempting":"Misplaces the cause in time; the colour assignment is settled in the early high-noise steps by attention, not shuffled by the sampler at the end."}]},"prev":{"slug":"the-latent-space","title":"The small space the picture is built in","url":"https://addaly.com/learn/making-things-with-ai/the-latent-space"},"next":{"slug":"guidance-and-its-cost","title":"Guidance: the dial that makes it obey","url":"https://addaly.com/learn/making-things-with-ai/guidance-and-its-cost"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Source and assessment review continues. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'How your words become a steering signal', in Making Things with AI. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/making-things-with-ai/words-into-steering (Accessed: 29 November 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"How your words become a steering signal","courseTitle":"Making Things with AI","module":{"index":1,"slug":"how-the-picture-gets-made","title":"How the picture gets made"},"answer":null,"keyIdea":"A text encoder turns your prompt into a sequence of vectors that the network attends to at every step and every position, which is why prompts steer continuously rather than being read once.","hero":{"kind":"plate","image":null,"alt":null,"caption":null},"blocks":[{"t":"h2","id":"the-prompt-is-not-read-it-is-attached","runs":[{"text":"The prompt is not read, it is attached"}]},{"t":"p","runs":[{"text":"There is a mental model most people arrive with: the model reads the sentence, understands it, then draws. That is not the shape of the machinery, and the difference explains most prompt behaviour."}]},{"t":"p","runs":[{"text":"Your text goes first to a separate, already-trained "},{"text":"text encoder","b":true},{"text":": a language model that never generates anything. It converts the prompt into a sequence of vectors, one per token, each a few hundred to a few thousand numbers long. That sequence is then handed to the denoising network as a fixed side input. At every one of the thirty steps, and at every position in the latent grid, the network looks at that sequence and asks which parts of it are relevant "},{"text":"here","i":true},{"text":"."}]},{"t":"p","runs":[{"text":"The mechanism for looking is "},{"text":"cross-attention","b":true},{"text":". For each cell of the latent, the network computes a similarity between what it is currently building there and each token vector, then blends the token vectors in proportion. A cell that is turning into fur attends strongly to “cat”; a cell in the background attends to “kitchen”. Nothing assigns regions to words in advance. The assignment emerges, step by step, and it can go wrong."}]},{"t":"h2","id":"which-encoder-and-why-it-matters","runs":[{"text":"Which encoder, and why it matters"}]},{"t":"p","runs":[{"text":"The choice of text encoder is one of the largest differences between generations of image models, and it is not cosmetic."}]},{"t":"ul","items":[[{"text":"Early Stable Diffusion used "},{"text":"CLIP","b":true},{"text":", a model trained to match images with their captions. CLIP is excellent at the gist of a caption and poor at grammar. It was trained on alt text, where word order carries little meaning, and it inherits that."}],[{"text":"SDXL used two CLIP encoders together, concatenating their outputs, which improved reliability without changing the character."}],[{"text":"Current models add or replace these with "},{"text":"T5","b":true},{"text":", a general text model trained on prose. T5 tracks clauses, negation and relations far better, which is exactly why newer models can handle “the red mug is to the left of the blue one” when older ones could not."}]]},{"t":"p","runs":[{"text":"This is the mechanism behind advice that seems contradictory across tools. On a CLIP-only model, comma-separated tags outperform sentences, because CLIP is a bag-of-concepts machine and the sentence structure is wasted. On a T5-based model, a plain sentence outperforms tags, because the encoder can use the syntax and the tag soup looks nothing like its training text. Neither piece of advice is wrong; each is about a different encoder."}]},{"t":"h2","id":"the-binding-problem-at-its-source","runs":[{"text":"The binding problem, at its source"}]},{"t":"p","runs":[{"text":"Cross-attention explains the most common failure in prompting. Ask for "},{"text":"a red cube and a blue sphere","b":true},{"text":" and you will sometimes get a blue cube and a red sphere, or two purple objects."}]},{"t":"p","runs":[{"text":"The token vectors for “red” and “cube” are separate. Nothing in the architecture ties an adjective to the noun that follows it. Both are available at every cell, and the cell picks by similarity. Regions building a cube attend to “cube” strongly and to both colour words weakly, so the colour that wins is close to arbitrary. Encoders that read syntax reduce the leak because “red” and “cube” end up with more similar representations; they do not eliminate it."}]},{"t":"p","runs":[{"text":"The practical consequence is that attribute binding gets more reliable when you separate the objects in the request: into different clauses, different regions specified explicitly, or different generation passes composited afterwards. It does not get more reliable when you shout."}]},{"t":"h2","id":"the-number-nobody-mentions","runs":[{"text":"The number nobody mentions"}]},{"t":"p","runs":[{"text":"CLIP text encoders have a context of "},{"text":"77 tokens","b":true},{"text":", including two markers, so roughly 75 tokens of prompt. A token is about three-quarters of an English word. Past that limit, the rest is silently dropped or, in some tools, split into a second chunk and averaged with the first, which is not the same as being read."}]},{"t":"p","runs":[{"text":"Interfaces rarely warn you. A 200-word prompt on a CLIP-based model means about 55 words steer and the rest do nothing at all, and because the output still looks like the beginning of the prompt, people conclude their late clauses were ignored for stylistic reasons. They were not read. T5-based pipelines allow 256 or 512 tokens, which is why long prompts suddenly started working on newer models."}]},{"t":"p","runs":[{"text":"If your tool shows a token counter, watch it. If it does not, the test is simple: append something outrageous (“and a giraffe”) to the end of a long prompt. If no giraffe appears and no other change occurs, you are past the limit."}]}],"check":{"question":[{"text":"A prompt asks for “a green bottle beside a brown loaf” and the model returns a brown bottle beside a green loaf. What does this reveal about the mechanism?"}],"options":[{"text":[{"text":"The model has learned an incorrect and persistent association between bottles and the colour brown from biased training captions, and is applying that learned association in place of the requested colour."}],"correct":false,"tempting":[{"text":"Would predict a consistent bias toward brown bottles across seeds, whereas attribute swapping varies run to run and affects both objects symmetrically."}]},{"text":[{"text":"Attributes and nouns arrive as separate token vectors available at every latent cell, so nothing structurally binds “green” to “bottle”."}],"correct":true,"tempting":null},{"text":[{"text":"The prompt exceeded the encoder’s token limit, so the colour words were truncated."}],"correct":false,"tempting":[{"text":"Truncation drops content entirely; here both colours appeared, merely on the wrong objects."}]},{"text":[{"text":"The sampler introduced randomness late in the run, which shuffled colours between regions."}],"correct":false,"tempting":[{"text":"Misplaces the cause in time; the colour assignment is settled in the early high-noise steps by attention, not shuffled by the sampler at the end."}]}],"order":[0,1,2,3],"why":null},"prev":{"slug":"the-latent-space","title":"The small space the picture is built in","minutes":9},"next":{"slug":"guidance-and-its-cost","title":"Guidance: the dial that makes it obey","minutes":8}}}