subscribers. Become an Insider
and start reading now.
Have an account? .
- Andrew Ng said that “lazy prompting” can be an efficient way to use AI — in some scenarios.
- Lazy prompting entails giving minimal context to large language models.
- It’s the latest in a line of AI techniques, like vibe coding, that’s transforming software development.
Sometimes, it’s OK to be lazy with your AI prompts thanks to models becoming smarter, the Stanford professor and former Google Brain scientist Andrew Ng has said.
Standard prompting advice is to give large language models, or LLMs, a lot of context and specific instructions for a query.
But Ng said in an X post that “lazy prompting” — when users put information into a model with little context or without explicit instructions — could, in some cases, be a better strategy.
“We add details to the prompt only when they are needed,” he said Thursday.
He pointed to developers using LLMs to debug code as an example.
“When debugging code, many developers copy-paste error messages — sometimes pages of them — into an LLM without further instructions,” Ng wrote. “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.”
The idea is that the LLM can then detect a buggy implementation and quickly provide a good solution without much context.
Developers of foundational models are scrambling to make LLMs more inferential, which means the models go beyond producing output and begin to “reason” and gauge the intent of the prompt.
Ng said that lazy prompting is an “advanced” technique that works best when the LLM has enough preexisting context — and an ability to infer intent. It would only work when users can “iterate quickly using an LLM’s web or app interface,” he added.
It’s not useful if the LLM needs a lot of context to provide a detailed response or if the model is unable to detect hidden bugs or errors, he said.
AI is fast transforming how people code and interact with software. Vibe coding — when people give natural language instructions to AI to write code — has recently swept Silicon Valley and beyond.
Last week, Ng launched a “Vibe Coding 101” short course for newbies who want to learn how to use generative AI tools to write and manage code.