How to reverse-engineer the perfect ChatGPT prompt, according to an MIT professor

1 hour ago 1
ARTICLE AD BOX

Andrew Lo, director of MIT’s Laboratory for Financial Engineering. recently revealed some key tips to get the best results out of your AI models like ChatGPT, Gemini and Claude.

Andrew Lo, director of MIT’s Laboratory for Financial Engineering shared tips for promting AI chatbotsAndrew Lo, director of MIT’s Laboratory for Financial Engineering shared tips for promting AI chatbots(AI generated image)

Crafting the perfect prompt for artificial intelligence is both an art and a science, according to Andrew Lo, director of MIT’s Laboratory for Financial Engineering. Speaking during a recent web presentation for Harvard University’s Griffin Graduate School of Arts and Sciences, the professor outlined some key rules for getting high-quality responses from your AI chatbot.

The art of prompt engineering

We've all been there when you are left frustrated after getting a generic and unhelpful answer from your chatbot despite giving a pretty straightforward prompt. Lo, however, explained that receving this kind of advice is a result of the faulty prompt from your end, repeating the age old proverb “garbage in, garbage out”

“I think that there's a real art and science to prompt engineering. In fact, there is a job description now called prompt engineers. ” Lo said

A vague prompt like “How should I retire?” may seem reasonable for a human, but Lo argues it accounts as a ‘bad prompt’ for an AI model. He argued that a good prompt will contain enough details so that the large language model (LLM) - brains behind chatbots like ChatGPT and Gemini - can get enough details to provide you with an appropriate response.

“If you don't provide that detail, they'll just give you generic gobbledy gook that will not be particularly helpful.” he noted

What is a good prompt then? Lo gave an example one such prompt:

“Assume you are a fee-only fiduciary advisor. Here are my goals, constraints, tax bracket, state, assets, risk tolerance and timeline. Provide me with, number one: base case strategy. Number two: key assumptions. Three: risks. Four: what could invalidate this plan. Five: what information you are missing, and in particular, what are you uncertain about.”

Golden advice for prompting AI models:

Prepare before you prompt

Lo shared an important advice for when prompting the AI models, noting that users should spend time thinking what they actually want to ask the chatbot and note it down.

“It does actually make sense to spend a little bit of time away from the computer and making a list of your questions,” Lo said, comparing it to preparing for a meeting with a doctor, lawyer or accountant

Expose the AI's blind spots:

Another key insight that Lo revealed was to ask the AI what it doesn't know. This, he stressed, is important since LLMs by nature can deliver wrong responses in a highly authoritative tone.

“Always ask the LLM, what are you uncertain about? What information are you missing? because you want to understand the limitations of what they come up with.” he noted

Reverse engineering better prompts

An advanced technique that Lo noted during his session was using AI to learn how to prompt itself. He noted that after the back and forth conversation once you finally arrive at an answer that you deem useful, ask the chatbot directly how it should have been prompted in the first place.

“I will then ask the LLM, can you please tell me what prompt I should have used in order to generate the final answer that I was really looking for,” he noted

About the Author

Aman Gupta

Aman Gupta is a Digital Content Producer at LiveMint with over 3.5 years of experience covering the technology landscape. He specializes in artificial intelligence and consumer technology, reporting on everything from the ethical debates around AI models to shifts in the smartphone market. <br> His reporting is grounded in first-hand testing, independent analysis, and a focus on how technology impacts everyday users. He holds a PG Diploma in Radio and Television Journalism from the Indian Institute of Mass Communication, Delhi (Class of 2022). <br> Outside the newsroom, he spends his time reading biographies, hunting for the perfect coffee beans, or planning his next trip. <br><br> You can find Aman on <a href="https://www.linkedin.com/in/aman-gupta-894180214">LinkedIn</a> and on X at <a href="https://x.com/nobugsfound">@nobugsfound</a>, or reach him via email at <a href="aman.gupta@htdigital.in">aman.gupta@htdigital.in</a>.

Read Entire Article