Vibeleaderboard
← All Intel
Intel / post

Lazy Prompting: When a Sloppy Prompt Is Faster

Source
x.com
Publisher
Andrew Ng
Date
Andrew Ng@AndrewYNg

Contrary to standard prompting advice that you should give LLMs the context they need to succeed, I find it’s sometimes faster to be lazy and dash off a quick, imprecise prompt and see what happens. The key to whether this is a good idea is whether you can quickly assess the output quality, so you can decide whether to provide more context. In this post, I’d like to share when and how I use “lazy prompting.” When debugging code, many developers copy-paste error messages — sometimes pages of them — into an LLM without further instructions. Most LLMs are smart enough to figure out that you want them to help understand and propose fixes, so you don’t need to explicitly tell them. With brief instructions like “Edit this: …” or “sample dotenv code” (to remind you how to write code to use Python's dotenv package), an LLM will often generate a good response. Further, if the response is flawed, hopefully you can spot any problems and refine the prompt, for example to steer how the LLM edits your text. At the other end of the spectrum, sometimes I spend 30 minutes carefully writing a 2-page prompt to get an AI system to help me solve a problem (for example to write many pages of code)…

Read the full post on X

Context

Lazy prompting means sending a quick, imprecise first and adding only if the answer falls short. In an April 2025 letter, Andrew Ng presents it as a deliberate exception to the standard advice to give a model the context it needs to succeed. His examples include pasting error messages into an with no instructions, which most models understand as a request to explain and fix them, and terse requests like “sample dotenv code.”

Whether it saves time depends on how quickly you can judge the output. Ng skips the lazy version in two cases: when he is confident the model has no chance of a good solution without more context, for instance when he wants a specific piece of software used that the model could not guess, and when a buggy result would take a long time to detect, such as code whose correctness can only be checked by laboriously running it. At the other end of the range, he says he sometimes spends 30 minutes writing a 2-page prompt.

He also limits who should try it. He calls lazy prompting an advanced technique, says that on average he sees people give models too little context rather than too much, and says it works only once you have learned to provide enough context and then deliberately test how little you can get away with. It applies to interactive use in a web or app interface, not to prompts written into code that calls an repeatedly, where nobody examines each output. The name, suggested by a collaborator on the open-source aisuite package, borrows from lazy evaluation in computer science, where work is done only when a specific result is needed.

Terms in this piece · Glossary
  • Prompt — Information or instructions supplied to a model; in a chat, the request you type is often called your prompt.
  • Context and context window — Context is the information available for a generation; the context window is the capacity available to hold it.
  • Large language model — A model trained on large amounts of data to process and generate language.
  • API — Application programming interface: the agreed set of operations, inputs and outputs through which one piece of software uses another.

Get the Brief

A cited digest of what matters for people building with AI, every morning. Unsubscribe anytime. See today’s edition

More from Andrew Ng
Recommended reads