burger
Features

Every tool you need for AI sales outreach

Independent AI sales assistant

An extra pair of hands for your sales growth

Our best AI emails

Clients' favorite emails generated by AiSDR

AiSDR Website Illustrations | Growth icon 111
Case studies

See the real results from our clients

AiSDR Website Illustrations | Starts and lightning icon 1
Speak with our AI

Let AiSDR try and convince you to book a meeting with us

Explore Q2 2024 outreach benchmarks Grab my copy
Explore Q2 2024 outreach benchmarks Grab my copy
<Back to blog

Tactics to Debug Generative AI Prompts

Tactics to Debug Generative AI Prompts
Aug 8, 2024
By:
Oleg Zaremba

When was the last time you got what you wanted on your first prompt? Check out 4 tactics for debugging a complex AI prompt.

3m 3s reading time

When was the last time you got the result you wanted on your first prompt?

Assuming it wasn’t a basic question like “What’s the name of the river in London?”, it was probably some time ago. 

After all, GPTs have a special talent for delivering results that are almost but not quite right, especially if the prompt is complicated. Pushing it from 90% to 95% and 100% correct gets extremely challenging and requires techniques like prompt chains or prompt chunking.

At AiSDR, whenever we run into a situation where a prompt’s not generating what we want, these are some tactics we turn to.

TLDR: 

  • The goal: Get a generative AI prompt to return the desired result
  • The tactic: Proceed through different methods for debugging AI prompts 
  • The result: AI prompts generate the desired result

Tactic 1: Give more examples of the expected output

Providing examples of what you want to see is the easiest way to get better prompt results.

That’s because examples act like a guide that helps the GPT produce results by replicating the example. It also reduces the chances of misinterpretation and misunderstandings.

For example, imagine you ask a GPT to “list the features of a new smartphone” and you get this result:

New smartphones have a high-resolution camera, long battery life, and fast processor.

Let’s say you want a bulleted list instead. You can let the GPT know what you want by adjusting the prompt accordingly:

List the features of a new smartphone. Here’s an example of the style I want:

New smartphones have:

  • [Feature 1]
  • [Feature 2]
  • [Feature 3]

After re-entering this prompt into a GPT, you should get a result like this:

New smartphones have:

  • High-resolution camera
  • Long battery life
  • Fast processor

Tactic 2: Ask the GPT to return the result in JSON

Asking a GPT to provide results in JSON can improve the quality of generative AI results in certain situations.

Here are a few reasons why:

  • Improved structure – When you request outputs in JSON, you’re asking for a structured format. This can help organize information consistently, reduce ambiguity, and make it easier to parse results programmatically.
  • Specificity – JSON helps the GPT focus on providing informative clearly and concisely, reducing the likelihood of irrelevant details.
  • Validation – JSON’s structure means it’s easier to validate when responses match your expectations. If the GPT returns invalid JSON, you can quickly isolate what went wrong.
  • Reusability – JSON-formatted responses can be easily recycled for other data processing purposes.

Requesting outputs in JSON won’t necessarily improve output quality, but it does make it easier to simplify a request’s framing, which can come in handy when working with structured data.

The downside of this tactic is that if you’re not familiar with JSON, it could take some getting used to.

No time to learn like the present? 🤓

Tactic 3: Replace errors with placeholders for future filtering

Imagine you’ve got a certain pesky error that’s ruining your prompts, such as a tendency to add double quotes (“ “).

Your first reaction would probably be to include this instruction:

DON’T use double quotes.

This might or might not work.

If it does, great! Then you can move on 🙂

But if it doesn’t, you can try this approach:

Replace double quotes with “N/A” when you encounter them.

This tactic allows you to filter out and delete the placeholder programmatically or with a simple “Find and replace” function.

Tactic 4: Structure the prompt to carry out multiple steps

Multi-step instructions are a helpful way to structure prompts so they complete and report several tasks in one output.

Imagine your original prompt was something like this:

Provide new smartphone feature, prices, and reasons why they’re important.

Restructuring the prompt so that it outlines multiple steps can improve output quality. An example of this sort of prompt would be:

List the features of a new smartphone, explain why each feature is important, and estimate the price of each feature.

When creating complex prompts, multi-step instructions allow the AI to approach the task methodically and essentially “check the boxes”.

The Result

If all goes well, your prompt should start reliably delivering the result you want.

Book more, stress less with AiSDR
Check out how AiSDR will run your sales
GET MY DEMO
helpful
Did you enjoy this blog?
TABLE OF CONTENTS
1. Tactic 1: Give more examples of the expected output 2. Tactic 2: Ask the GPT to return the result in JSON 3. Tactic 3: Replace errors with placeholders for future filtering 4. Tactic 4: Structure the prompt to carry out multiple steps 5. The Result
AiSDR | Website Illustrations | LinkedIn icon | 1AiSDR Website Illustrations | LI iconAiSDR | Website Illustrations | X icon | 1AiSDR Website Illustrations | X iconAiSDR | Website Illustrations | Insta icon | 1AiSDR Website Illustrations | IG icon 2AiSDR | Website Illustrations | Facebook icon | 1AiSDR Website Illustrations | FB icon
link
AiSDR Website Illustrations | Best AI Tools for Primary and Secondary Market Research | Preview
Get an AI SDR than you can finally trust. Book more, stress less.
GO LIVE IN 2 HOURS
You might also like:
Check out all blogs>
Teaching Generative AI to Classify Email Responses
Teaching Generative AI to Classify Email Responses
Oleg Zaremba
Oleg Zaremba •
Jul 11, 2024 •
3m 6s
Training generative AI on how to classify sales emails is straightforward. Get a sneak peek into how AiSDR does it.
Read blog>
Using Generative AI to Clean a CSV File
Using Generative AI to Clean a CSV File
Oleg Zaremba
Oleg Zaremba •
Jun 13, 2024 •
2m 52s
Ever cleaned a csv? It's a headache, which is exactly why AiSDR turns it over to AI. Find out how we did it from our CTO
Read blog>
Using an AI to Validate Another AI’s Output
Using an AI to Validate Another AI’s Output
Oleg Zaremba
Oleg Zaremba •
May 16, 2024 •
3m 38s
Generative AI can be unreliable at times. Use this shortcut to quickly validate the quality of AI outputs
Read blog>
How to Set Up a Hybrid Customer Success Process
How to Set Up a Hybrid Customer Success Process
Viktoria Sinchuhova
Viktoria Sinchuhova •
Aug 1, 2024 •
3m 7s
At AiSDR, we try to get new clients onboarded in 2 hours. Here's how we do it.
Read blog>
See how AiSDR will sell to you.
Share your info and get the first-hand experience
See how AiSDR will sell to you