Tech

Andrew Ng says giving AI 'lazy' prompts is sometimes OK. Here's why.

Andrew Ng
Andrew Ng says "lazy prompting" can be a faster way to get output from AI in some cases. Steve Jennings / Stringer/Getty Images
Read in app

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.

Read next

Riddhi
Riddhi Kanetkar
Riddhi was a senior startups and VC reporter at Business Insider's London office, where she covered VC, and AI and climate startups. She has reported on everything from funding rounds to layoffs and investigated company culture at tech startups. She also writes about the intersection of Big Tech and VC, and global industry trends in the AI and VC ecosystem.She received her Bachelor's from UCL, where she studied Comparative Literature. Have a tip? Contact her at rkanetkar@jkmperu.com, or reach out using a non-work device at riddhikanetkar@proton.me, or on Signal at riddhikanetkar.64Sample of stories:GoStudent, the $3 billion edtech darling, scaled fast and partied hard. The result was a mess.AI Forge promised to help founders build their dream startups. Some say the incubator was a chaotic disappointment.Fast-fashion behemoth Shein is preparing for an IPO. Here's an inside look at the challenges it could face.DeepMind's secret mafia: Meet the stealth startups emerging from Google's AI labThe wildest deal in tech right now is about to turn 6-month-old LLM startup Mistral into a $2 billion unicorn, sources sayPeter Thiel-backed TMRW wants to revolutionize the egg-freezing industry. We visited the startup's new London HQ to experience its tech first hand.I was laid off from events startup Pollen after it suddenly imploded. I'm furious when I think about missed paychecks and not making rent.Shock, anger, and confusion: Inside Snap's decision to shut down Zenly, a social app with 40 million users