17th Dec 2024
3 mins

How to ask better questions - to ChatGPT

Who doesn't know ChatGPT these days? It’s helping us out in our daily activities—everything from asking basic questions like, "Will AI rule the world?" to more advanced queries like, "How to get fit without exercise?" (a very valid question, indeed). Despite its good-hearted nature, like a little kid offering you his share of candy, sometimes it can’t give the most useful answers. The reason? It doesn’t always understand us perfectly.

But here's the real question: How can we make ChatGPT understand the true intent of our query, or at least clarify it enough to get a proper response?

In my search for an answer, I came across a fantastic course by Isa Fulford and Andrew Ng called ChatGPT Prompt Engineering for Developers. It’s a great course that teaches you how to efficiently use ChatGPT or other similar GenAI tools—and the best part? It’s free! (not a paid promotion, by the way. Trust me, if someone wanted to pay me, I wouldn’t shut up about it).

So, back to the blog: If you’re still reading and haven’t clicked the link above, let me tell you—by the end of this blog, you’ll be so good at using ChatGPT that you’ll search for information like a pro, research topics like those genius characters in movies, and even start writing mind-numbing blogs (with the help of ChatGPT, like I’m doing right now). The insights below are based on my personal experience with ChatGPT, social media, blogs, YouTube videos, and of course, the course mentioned above. Now, let’s quickly jump into the main topic (we’re already at 283 words... or no— 287 now... and counting!).

Basic Principles of Prompting

  1. Clarity is Key
    Always try to write clear and specific queries. For example, instead of asking, “Write a mail to my colleague,” ask, “Write a mail to my colleague congratulating him on his promotion.”
  2. Set the Tone for the Response
    Let ChatGPT know the tone you expect: funny, formal, casual, etc. For example, “Write a mail to my colleague who is getting promoted, but make the tone funny.”
  3. Break it Up
    If you need more details in the response, break it down into steps. For example:
    "Write a mail to my colleague who is getting promoted. Start by praising his hard work and research-oriented mindset. Then, mention his leadership skills and how he helps his peers. End with a funny tone, saying you’re looking forward to the party, and now his share in the outing expenses has increased."
  4. Provide a Limit or Constraint
    ChatGPT doesn’t always know when to stop. It might give a lengthy response when you just want a short one. If necessary, set a limit on how long you want the answer. For example:
    "Write a mail to my colleague who is getting promoted, make the tone funny, and keep it under 80 words." Or you could say, "...around 10 sentences," or "...three paragraphs."
  5. Give Examples
    If possible, provide examples to guide the response. For instance, if you want to generate a conversation between a kid and a wise grandfather, you could write:
    "Generate a conversation between a grandfather and child. The grandfather always answers the child in a wise, poetic way. For example:
    Child: Grandpa, why do the stars sparkle at night?
    Grandfather: Ah, my little one, the stars do gleam, not from their glow, but a cosmic dream...
    Child: Why is water blue?
    Grandfather: ...
  6. Iterate and Refine
    It’s totally okay if you don’t get the exact response you wanted on the first try. Refine your prompt: provide more context, add tone, set limits, or include examples. Check what’s missing, and think about how you can make it clearer.
  7. Open-ended Prompts
    If you want ChatGPT to answer creatively, don’t be too specific in your prompt. Give ChatGPT some freedom to think outside the box. For example:
    "You’re hired as a consultant to the world’s first villain support group. What are some of the most absurd problems their members are dealing with?"
  8. Be Polite
    Sooner or later, AI will rule the world, and you don't want to end up on the wrong side because you didn’t add "please" in your query. (Okay, I’m kidding!) Since GenAI is trained on a wide range of real-world text, it often mirrors the tone used. If you ask politely, you’ll often get a friendly and polite response.

Okay, that’s it for now. You’re ready to ask better questions and get better answers from ChatGPT! Refer back to these points to create more effective queries. Now you have the POWER to generate awesome responses. And don’t forget—"With great power, comes big fat eyeglasses."

Over and out!


Cover photo by Ales Nesetril on Unsplash