DEV Community

Cover image for The Tiny Cat Guide to AI #1: Prompt Engineering – Directing the AI Ballet
Wassim Soltani
Wassim Soltani

Posted on • Edited on • Originally published at tinycat.hashnode.dev

3 2 2 1 2

The Tiny Cat Guide to AI #1: Prompt Engineering – Directing the AI Ballet

Ever feel like getting an AI to do exactly what you want is like trying to organize a ballet for super creative, slightly chaotic tiny cats? Yeah, me too! 😹

To break down how we can better direct these chaotic tiny cats, I've visualized the core ideas of Prompt Engineering using some feline friends. You can see this little story in action in the carousel embedded right below!


Liked this carousel? Check out how to make one here!

It turns out, just vaguely telling an AI (or a cat) to "do something cool" doesn't quite cut it. But give it clear, detailed instructions? That's when the magic happens! ✨


Prompt engineering has become absolutely essential in my day-to-day work. Building AI features has definitely thrown some curveballs my way, whether I'm working on:

  • An AI feedback system for educational content
  • A browser extension using OCR/AI for data extraction
  • My own AI note-processing tool, Quickplan
  • AI enhancements (like semantic search & content generation) for my E-commerce platform

Some of the common challenges I've wrestled with (and where good prompting is key) include:

🤯 Getting AI to output reliably structured data (like specific JSON or Markdown formats for Quickplan) instead of just... a wall of text.

🧠 Ensuring AI truly understands the context – like applying specific pedagogical guidelines for educational feedback versus generating creative product descriptions.

⚖️ Balancing helpful AI creativity with the need for factual accuracy, especially when extracting data or generating e-commerce content.

🖼️ The dreaded "text hallucinations" when requesting diagrams or images! Asking for a simple chart and getting... an artistic interpretation of letters. 😖

🎭 Maintaining a consistent tone and style for the AI's output across multiple interactions or for different branding needs.


So, how do we give our AI cats better stage directions for their ballet? Here’s what has consistently helped me craft more effective prompts:

Be Hyper-Specific: Don't just ask for "a summary." Define the desired length, target audience, tone (e.g., formal, casual, witty), and explicitly list any key points that must be included or excluded. Details transform vague requests into actionable instructions.

Provide Rich Context: Tell the AI the 'why' and the 'who'. What's the ultimate goal of the meeting notes for Quickplan? Who is the end-user of the feedback? Providing this background helps the AI make better inferences and tailor its response more appropriately.

Set Clear Boundaries & Constraints: Explicitly state what the AI should not do. For example: "Avoid technical jargon," "Focus only on the financial aspects discussed," or "Generate NO text elements inside the requested image."

Define the Output Format Explicitly: If you need structured data, ask for it directly. Specify JSON with a particular schema, Markdown with headers, a numbered list, step-by-step instructions, or even a table format. The clearer your definition, the higher the chance of getting a usable output.

Iterate, Iterate, Iterate: Your first prompt is rarely your masterpiece. Treat prompting as an iterative process. Test your prompt, analyze the output, identify where the AI stumbles or misunderstands, then tweak your instructions and repeat.

Know Your Model: Different AI models (e.g., GPT-4, Claude, Llama) have distinct strengths, weaknesses, knowledge cut-offs, and stylistic quirks. Understanding the specific model you're working with can help you tailor your prompts for optimal performance.

Prompt engineering really is about clear communication – it's how we effectively guide these incredibly powerful (and creative!) AI brains. Hopefully, the cat ballet in the carousel helps illustrate these points!


What are your go-to prompt engineering tricks, biggest headaches, or favorite cat-herding analogies for AI? Share your thoughts and experiences, I'd love to hear them! 👇

What's that? A box full of tiny cats?!

Created by Wassim Soltani

Sentry image

Make it make sense

Only get the information you need to fix your code that’s broken with Sentry.

Start debugging →

Top comments (2)

Collapse
 
jance_jacobs profile image
Jance Jacobs

Great post! The cat analogy makes prompt engineering much more relatable. I liked the practical tips, especially about being specific and iterative with prompts. Looking forward to the next part in the series!

Collapse
 
wsoltani profile image
Wassim Soltani

Thank you so much! I'm glad you liked it 😁 There are currently 4 parts, planning to make more soon about Agents and MCP, stick around!

Redis image

Short-term memory for faster
AI agents

AI agents struggle with latency and context switching. Redis fixes it with a fast, in-memory layer for short-term context—plus native support for vectors and semi-structured data to keep real-time workflows on track.

Start building

👋 Kindness is contagious

Dive into this thoughtful piece, beloved in the supportive DEV Community. Coders of every background are invited to share and elevate our collective know-how.

A sincere "thank you" can brighten someone's day—leave your appreciation below!

On DEV, sharing knowledge smooths our journey and tightens our community bonds. Enjoyed this? A quick thank you to the author is hugely appreciated.

Okay