Why "act as an 8-year-old" changes everything about a response
The answer is attention. A closer look at why self-attention and parallel processing make Transformers respond so differently to a persona instruction, even after a long prompt.
During a recent chat with a colleague, an interesting question about LLMs popped up: how does a tiny addition like “act as an 8-year-old” or “act as a research scholar” completely change the style, tone, and detail level of a response, especially after a really long prompt?
The answer is simple: attention.
Yes, when you’re working with Transformers, attention is all you need. The core idea is that the Transformer will put high significance on “act as X” in the input prompt, and then critically, its attention on the output tokens will also align with that chosen style.
The Transformer architecture, a revolutionary invention by Vaswani et al. in 2017, largely outclassed the previous state-of-the-art, RNN/LSTM mechanisms. Transformers simply outperform sequential processing approaches for two core reasons:
- Self-Attention: Unlike RNNs/LSTMs that process sequences word by word, Transformers use self-attention to weigh the importance of different words regardless of distance, so they capture long-range dependencies. Transformers can effectively model relationships between distant words, leading to a much deeper understanding of context. Example: imagine a 1000-word prompt detailing a complex scientific process. If you add “act as a kindergarten teacher,” the Transformer’s self-attention heavily weighs those keywords, then its output generation focuses on simple vocabulary, short sentences, and analogies, carefully ignoring the jargon from the original prompt to meet the specified persona.
- Parallel Processing: Because Transformers don’t rely on recurrence (processing one token at a time), they can process all words in a sequence simultaneously. This enables highly efficient parallelization on modern hardware like GPUs and TPUs, drastically cutting down training time for large datasets and complex models. RNNs/LSTMs are inherently sequential, limiting their ability to leverage parallel computing. Example: when tasked with summarizing a multi-page report, a Transformer can analyze the whole document at once to identify key themes and arguments, leading to a coherent summary. An LSTM would process it line by line, often losing critical connections across pages.
So, that small phrase carries a lot more weight than it looks like. It’s attention doing the work.