The 7 Commandments of Prompt Engineering: How to Get the Best Responses from ChatGPT

Artificial Intelligence (AI) can seem complicated, but once we break it down, it becomes much more understandable. One really interesting way to get the best out of AI is through prompt engineering. Think of prompts as the way we talk to AI models, like ChatGPT, to get the answers we want. Crafting effective prompts is like asking just the right question to get the best answer — it's all about being clear, specific, and providing context. In this guide, we'll walk through the 7 commandments of prompt engineering that help AI give its best responses (very similar to "communication" techniques)

Understanding the 7 Commandments of Prompt Engineering

Prompt engineering is all about giving clear instructions to an AI model so it understands what you need. In many ways, it's similar to how we communicate with other people effectively. When you talk to someone, being clear, specific, and providing context makes it much easier for them to understand you and respond appropriately, making the conversation more efficient. The same principles apply here. Here are the key commandments of effective prompt engineering:

  1. Clarity: Make sure your request is straightforward. Just like in a conversation with another person, the clearer your message, the more relevant and useful the response will be.
    Why this works: If the ai knows what you want because you showed clearly your intention, It can get to the point much faster
  2. Specificity: Be specific. The more details you provide, the better the AI — or even a human being — can understand what you're looking for.
    Why this works: Remember in our CHATGPT EXPLAINED article, we mentioned that the models read the equivalent of millions of books so by being specific, you help it look into the right "pool of data".
  3. Context: Give some background information to help the AI understand not just what you're asking, but why you're asking it. This is like giving someone extra details in a conversation so they can fully understand where you're coming from.
    Why this works: The context can help your AI understand where you are coming from and provide a more fluent conversation.
  4. Define Output Types Clearly: Be clear about what you need from the AI. Do you want an explanation, a list of ideas, or a solution to a problem?Example: Instead of asking "Tell me about AI," you could say, "Provide a list of ways machine learning is used in healthcare to improve patient outcomes."
    Why this works: Even if the AI knows exactly what you want, where you are coming from, it need to know HOW you want the data to be presented. If you want a table and don't mention it, the AI is not going to guess, it will give you the most probable format to present you type of data.
  5. Add Specific Details: The more specific you are, the better. Use keywords that direct the AI toward the information you need. You need to help the AI gather its knowledge by mentioning keywords. Example: "Give me five examples of how AI is used in retail for personalized customer experiences."
    Why this works: When a doctor is diagnosing you, he/she is looking for specific details that might be insignificant to you that will help them get tot the right answer. small details make the difference even with AI
  6. Include Keywords to Help Gather the Right Pool of Data: Adding domain-specific keywords makes your prompt more effective, especially for complex topics. Keywords help the AI gather the right information to work with.Example: "As a beginner in data science, explain what neural networks are and how they work, using simple analogies." Keywords: data science, beginner, neural networks.
  7. Experiment and Iterate: Don't be afraid to tweak and experiment with your prompts. Iteration is key to finding the perfect balance.
    Why this works: This is more for you, so you learn more how to get the right answer from each model. These models are trained on the same data (internet) but the training parameters might differ so you will need to adjust your prompting to each model

0-Shot, Chain-of-thought (CoT) - How to Enhance Prompting Techniques

Before diving into examples of effective prompt engineering, it's important to understand some foundational concepts that can enhance your prompting techniques: 0-shot, few-shot prompting, system prompts, user prompts, chain of thought, context windows, and temperature control.

  • 0-Shot Prompting: This means asking the AI a question or giving it a task without providing any examples. The AI relies entirely on its pre-existing training to generate a response. This is useful when you want the AI to respond based purely on its general knowledge without any specific guidance.
  • Few-Shot Prompting: Few-shot prompting involves providing a few examples within your prompt to help guide the AI in understanding the format or type of response you need. By giving the AI some examples, you set clear expectations, which usually results in more relevant and accurate responses because the AI will learn from an existing pattern.
  • System Prompts and User Prompts: System prompts are instructions that define the overall behavior of the AI, such as setting a professional or casual tone. User prompts, on the other hand, are specific requests made by the user, like asking for information or generating ideas. Combining system and user prompts effectively can significantly improve the quality of the AI’s response.
  • Chain of Thought Method: The chain of thought method involves prompting the AI through reasoning step-by-step. Instead of giving a final answer immediately, the AI is encouraged to follow a logical chain of thought, often similar to how the human being thinks, which leads to more accurate and detailed responses. This is particularly helpful for complex questions that require logical reasoning or multiple steps to solve.
  • Context Windows: The context window refers to the amount of information the AI can "remember" and process at any one time. The AI has a limited context window, so providing the right amount of context is key. You should include all the relevant information while avoiding unnecessary details to make sure the AI remains focused on what matters most.
  • Temperature (creativity) Control: In AI, temperature is a parameter that controls the randomness of the AI's responses. A lower temperature (e.g., 0.2) makes the AI more focused and deterministic, leading to straightforward and predictable answers. A higher temperature (e.g., 0.8 or above) makes the AI's output more varied and creative, which can be useful for brainstorming or generating unique ideas. Adjusting the temperature allows you to control how creative or precise the AI's response should be.

Understanding these concepts can help you decide how much information or guidance to include in your prompt to get the desired outcome.

Examples of Effective Prompt Engineering

Here are a few examples for each of the techniques we discussed earlier, to show how small changes can make a big difference in the quality of responses:

  • 0-Shot Prompting Example: "What is the capital of France?"
    • AI Response: "The capital of France is Paris."
    • This is a straightforward question with no examples, relying on the AI's general knowledge.
  • Few-Shot Prompting Example: "I want to create a detailed project timeline. Here are some examples: For a website development project, break down tasks into planning, design, development, testing, and launch phases. For a marketing campaign, include research, content creation, ad placement, and performance review phases. Now, help me create a project timeline for launching a new product in the tech industry."
    • AI Response: "For launching a new product in the tech industry, break down the timeline into key phases: 1) Market Research (2 months) - gather consumer insights and analyze competitors, 2) Product Design (3 months) - work on prototyping and user feedback, 3) Manufacturing (4 months) - finalize production logistics, 4) Marketing and Pre-launch (2 months) - create buzz with teasers and partnerships, and 5) Launch and Post-launch (1 month) - execute the launch event and gather customer feedback for improvements."
    • Providing examples helps the AI understand the context and produce a more structured and tailored response.
  • System and User Prompts Example:
    • System Prompt: "You are a finance expert with extensive experience in creating business plans, analyzing financial viability, and providing strategic recommendations for startups. Use your expertise to guide users in developing structured business strategies."
    • User Prompt: "Help me ideate my business into a business plan."
    • AI Response: "Sure! Let's start by defining your business concept clearly. What problem are you solving, and who is your target customer? Once we have that, we can identify key components like your value proposition, revenue streams, cost structure, and market strategy. I'll guide you step-by-step to make sure each part of your business plan is well thought-out and aligned with your goals."
    • Setting a system prompt ensures the AI maintains a friendly tone while answering.
  • Chain of Thought Method Example: "As an expert in marketing, I will guide you through creating a comprehensive marketing plan for your new product. First, identify the strengths and weaknesses of your product. Then, determine your potential customers (business personas) and analyze their strengths and weaknesses. After that, categorize these customers into 5 stages of awareness regarding the problem and solution. For each stage, generate potential hooks and anticipate objections. Finally, create scripts for short promotional videos tailored to each stage."
  • Temperature Control Example:
    • Low Temperature Prompt: "Write a summary of the book '1984' by George Orwell."
      • AI Response: "'1984' is a dystopian novel by George Orwell about a totalitarian regime that uses surveillance and propaganda to maintain control over its citizens. The protagonist, Winston Smith, struggles against the oppressive government."
    • High Temperature Prompt: "Write a very creative interpretation of '1984' by George Orwell."
      • AI Response: "Imagine a world where every thought is monitored, and every emotion is controlled. In '1984,' Orwell paints a chilling picture of a society stripped of freedom, where even love is manipulated by an omnipresent government. Winston Smith dares to dream of rebellion, but the forces against him are as relentless as the shadows that loom over Airstrip One."
    • Changing the temperature parameter influences how creative or predictable the AI's response will be.
  • AI Response (very long one, be ready!) : Let's break down the process step by step, using ChatGPT as the product for which we are creating a marketing plan.

1. Identify the Strengths and Weaknesses of ChatGPT

Strengths:

  • Advanced Conversational Abilities: Capable of holding complex conversations and answering a wide range of questions.
  • Versatile Use Cases: Useful in various industries (e.g., customer service, education, content creation).
  • Customizable and Scalable: Can be fine-tuned for specific tasks or integrated into various workflows.
  • 24/7 Availability: Operates continuously without downtime, offering immediate assistance.
  • Cost-Effective: Reduces human workload in areas like customer support or knowledge management.
  • Multilingual Capabilities: Can interact in different languages, widening the potential customer base.

Weaknesses:

  • Context Limitations: May struggle with maintaining long-term conversational context or complex dialogues.
  • Dependence on Training Data: Limited by the data it has been trained on, potentially offering outdated or biased information.
  • Lack of Emotional Intelligence: Although capable of empathetic responses, it can’t replicate true human emotions.
  • Privacy Concerns: Some users may be reluctant to share sensitive data, fearing potential misuse or data breaches.
  • Overestimation of Capabilities: Customers might expect too much, such as full automation, which may not always be feasible without human intervention.

2. Determine Potential Customers (Business Personas) and Analyze Their Strengths and Weaknesses

Business Personas:

  1. Customer Service Manager
    • Strengths: Understands the importance of quick, efficient customer service; open to tools that streamline operations.
    • Weaknesses: May fear that ChatGPT will alienate customers by replacing human agents, leading to lower satisfaction.
  2. Content Creator/Marketing Manager
    • Strengths: Needs tools that produce content quickly for blogs, social media, and campaigns.
    • Weaknesses: Concerned that ChatGPT-generated content lacks creativity or fails to capture the brand voice.
  3. Educators/Training Managers
    • Strengths: Seeks innovative ways to engage students or trainees with personalized assistance.
    • Weaknesses: May worry about the tool providing incorrect or overly simplified information.
  4. Developers/Tech Leads
    • Strengths: Interested in integrating AI into applications to enhance user experience.
    • Weaknesses: Hesitant about technical challenges and the complexity of integrating ChatGPT with their current systems.
  5. Small Business Owners
    • Strengths: Open to cost-saving tools that help run the business more efficiently.
    • Weaknesses: Worry about whether ChatGPT will provide real ROI and fear that it’s too complex to implement or manage.

3. Categorize Customers into 5 Stages of Awareness Regarding the Problem and Solution

  1. Completely Unaware:
    • These customers don't know they have a problem that ChatGPT could solve.
    • Hook: "Is your customer service team overwhelmed? There’s a smarter way to handle it."
    • Objection: "I don’t think I need a new tool. My current setup works fine."
  2. Problem-Aware:
    • They understand they have a problem but don’t know that ChatGPT could solve it.
    • Hook: "Tired of spending hours answering repetitive customer queries? Here's how to free up time."
    • Objection: "I’m not sure if AI can handle my unique business needs."
  3. Solution-Aware:
    • They know there are solutions to their problem but haven’t considered ChatGPT specifically.
    • Hook: "Many companies are already using AI like ChatGPT to increase efficiency—why not you?"
    • Objection: "AI seems complicated and expensive. Is it really worth it?"
  4. Product-Aware:
    • They know ChatGPT exists but don’t fully understand its value.
    • Hook: "Did you know ChatGPT can cut customer service costs by 50% while maintaining quality?"
    • Objection: "I’m not sure ChatGPT will integrate well with our systems."
  5. Most Aware:
    • They know about ChatGPT and are considering it, but need a final push.
    • Hook: "Try ChatGPT risk-free for 30 days—see how it revolutionizes your business."
    • Objection: "We’re happy with our current solution, and switching would be a hassle."

4. Generate Potential Hooks and Anticipate Objections

Stage of AwarenessHookObjectionResponse to Objection
Completely Unaware"Overwhelmed by repetitive tasks? Here’s a solution you never knew you needed.""We’re fine with what we have.""What if you could increase productivity effortlessly?"
Problem-Aware"Don’t let manual tasks slow your business down.""We’re unique, AI might not work for us.""ChatGPT adapts to your specific industry needs."
Solution-Aware"Discover why AI is the future of efficient business operations.""AI is expensive and too complex.""ChatGPT is scalable and budget-friendly."
Product-Aware"Your competitors are already boosting efficiency with ChatGPT.""It won’t integrate with our tools.""Seamless integrations with your favorite platforms."
Most Aware"Give ChatGPT a trial run and see the impact for yourself.""Switching will take too much effort.""We provide onboarding support for a smooth transition."

5. Create Scripts for Short Promotional Videos Tailored to Each Stage

Completely Unaware Video Script:

  • Opening: “Is your team bogged down by repetitive questions or tasks? Are you looking for a smarter way to manage customer inquiries, generate content, or even automate workflows?”
  • Middle: “Meet ChatGPT, the AI tool transforming businesses worldwide. From answering customer questions to creating engaging content in minutes, ChatGPT helps you work smarter, not harder.”
  • Closing: “It’s time to step into the future of business. Discover the power of AI with ChatGPT.”

Problem-Aware Video Script:

  • Opening: “Running a business is tough enough. Answering the same customer questions day in, day out? That’s where your time slips away.”
  • Middle: “With ChatGPT, you can automate responses to repetitive tasks, saving you hours of work every day. Focus on what matters—let AI handle the rest.”
  • Closing: “Ready to save time and increase productivity? See what ChatGPT can do for your business.”

Solution-Aware Video Script:

  • Opening: “You know there are tools that can help streamline your business. But have you thought about how AI could do it better?”
  • Middle: “ChatGPT is helping businesses automate everything from customer support to internal documentation. And the best part? It’s affordable and easy to integrate.”
  • Closing: “Stay ahead of the curve with ChatGPT—an AI solution designed to grow with you.”

Product-Aware Video Script:

  • Opening: “Businesses like yours are already benefiting from ChatGPT. Imagine reducing customer service costs by 50% while delivering better experiences.”
  • Middle: “Whether it’s answering inquiries, generating reports, or creating marketing content, ChatGPT makes it happen in less time and with fewer resources.”
  • Closing: “Don’t get left behind. Start your journey with ChatGPT today.”

Most Aware Video Script:

  • Opening: “You’ve heard about ChatGPT. Now’s the time to see it in action.”
  • Middle: “With seamless integration and expert support, getting started with ChatGPT has never been easier. You’ll see a difference in no time.”
  • Closing: “Give ChatGPT a try—30 days risk-free. Take your business to the next level with AI.”
  • Breaking down each step helps ensure the entire marketing process is well-structured, leading to a thorough and effective strategy."

By using these different techniques, you can shape the AI's response to meet your specific needs.

Visualizing Prompt Engineering

Think of prompt engineering like a flowchart that starts with a broad question. As you refine your question by adding intent, details, and context, the branches of the flowchart narrow down, leading you to an ideal prompt.

Visual aids like this help illustrate how small changes can guide the AI to give a more specific response. It’s like refining your question until it becomes a well-crafted tool for getting the best possible answer.

Tips for Getting Started

  • Practice with Different Styles: Try asking for lists, explanations, analogies, or even poems — see how changing the style affects the outcome.
  • Iterate on Prompts: If the response isn’t quite what you need, tweak the prompt. Experimenting is part of the process.
  • Use Feedback: If the response isn’t quite right, use it as feedback to improve your prompt. Learning by doing is key.

Conclusion

Prompt engineering is part art and part science. By following the 7 commandments—focusing on clarity, specificity, context, intent, detail, iteration, and experimentation—you can improve how AI like ChatGPT responds to your requests. The next time you use an AI, think of the prompt as your key to unlocking its full potential. Start experimenting, and you’ll see just how much control you have over the answers you get.

Read more

Case Study: Transforming a Tutoring Company with Neuraya's 🤖 Solutions

📚 Introduction In the competitive landscape of 📘 education, tutoring companies must evolve to meet the dynamic needs of 👩‍🎓👨‍🎓 students and leverage technological advancements. Neuraya, a leader in AI-driven 🤖 solutions, partnered with a 🇨🇦 Canadian tutoring company facing operational inefficiencies and growth challenges. This case study explores how Neuraya's tailored AI

By Ala Eddine Mebarkia