46 of 81
ContentsPart IV · Chapter 11

Chapter 11Asking well

Longer is not always better

It is easy to take the wrong lesson from the six parts: that the longer the request, the better the answer. Researchers have tested one kind of length, the amount of material placed in front of the model, and the idea doesn’t hold. In one study, models answered questions with the help of documents a search system had found. Handing a model fifty documents instead of twenty improved its answers only a little, while making the input much longer. More material may help, the authors wrote, but it also gives the model more to work through, “potentially decreasing accuracy.”1

Where the material sits matters too. In the same study, models were often best at using information at the very beginning or the very end of a long input, and much worse when it sat in the middle, even models built to handle long inputs.1 Putting the question both before and after the documents gave near-perfect results on one of the study’s tests, a simple lookup task, but hardly changed results on the other.1 The study tested the models of 2023, and newer ones may do better; the advice that follows costs nothing either way.

So the fix isn’t “keep it short.” It is to include what the model would otherwise guess, leave out what it doesn’t need, and put the key instruction at the start or the end, not in the middle of pasted material. If you paste a long report, say what you want before it, and say it again after. Chapter 2 pictured the model’s working space, its context window, as a desk measured in tokens. A bigger pile on the desk is no help if the one page that matters is buried in the middle of it.

Why examples work

Of the six parts, the example can do the most work in the fewest words. A model writes by continuing the text in front of it, predicting each next piece from what came before. Put a sample of what you want in front of it, and the likely continuation follows the sample’s pattern: its tone, its length, its layout. Researchers call this few-shot learning, a “shot” being one example. In 2020, the paper that introduced GPT-3 showed that the model could do many tasks it hadn’t been specially trained for from just a few examples written into the prompt, with no retraining, though it still struggled on some.2

An example shows what is hard to describe. “Friendly but professional” means different things in a law firm and a youth soccer league; last year’s email shows which one you mean. Pick an example you would be glad to see imitated, since imitation is the point, and say what to take from it: “match the tone, not the length.”

A related method helps with problems that take several steps. In a 2022 study, researchers showed models a few worked examples that wrote out their reasoning step by step, so the model wrote out its own steps before it answered. That improved results on some math, commonsense and symbolic problems, with the gains largest in the biggest models; for math, the researchers found it helped only in models of about 100 billion parameters.3 One way to see why, in Chapter 2’s terms: each step the model writes goes back onto its desk and becomes part of what it predicts the next words from. When you want to follow its reasoning, ask it to show the steps.

Notes (3)
  1. 1Nelson F. Liu, Kevin Lin, John Hewitt, Ashwin Paranjape, Michele Bevilacqua, Fabio Petroni, and Percy Liang, “Lost in the Middle: How Language Models Use Long Contexts,” Transactions of the Association for Computational Linguistics 12 (February 23, 2024): 157–173, https://doi.org/10.1162/tacl_a_00638. Cited at §5; abstract; §4.2.
  2. 2Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, et al., “Language Models are Few-Shot Learners” (preprint, arXiv, May 28, 2020), https://doi.org/10.48550/arXiv.2005.14165. Cited at abstract; p. 1.
  3. 3Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoc Le, and Denny Zhou, “Chain-of-Thought Prompting Elicits Reasoning in Large Language Models,” in Advances in Neural Information Processing Systems 35 (2022), 24824–24837, https://doi.org/10.52202/068431-1800. Cited at §3.2; p. 4.

Chapter 11 · page 3 of 4

Turn pages with the ← and → keys.

Cite this page

Using this book

© 2026 Steve Sparks. All rights reserved. Teachers and students may assign, read, quote and excerpt chapters of this book for classes and study, with credit to Steve Sparks and a link to aifromthepartsup.com. Anyone may quote short passages and cite any page, with a link back. To repost, reproduce or sell the book or larger parts of it, ask through GitHub.

Quoted material and figures from other sources remain their owners'.