Ten tricks for writing better AI prompts

Video thumbnail

How to Write the Best Prompts and Get the AI ​​to Do What You Need

In this video, I want to share some tips that I consider very important. These 10 tips are not only for ChatGPT, but also for any other AI that works similarly, such as Gemini, Claude, Perplexity, etc.

1. Be Specific and Provide Context

These two points go hand in hand. The more detailed and clear the instructions you give the AI, the better the response will be. Don't be like a certain "expert" we analyzed in another video (I'm not hating, just analyzing), who commented that he created an app in 15 minutes.

If you want a notes app, specify that it has a title, description, the ability to upload images, etc. The more context, the better.

2. Make Partial Changes

I recommend working in small iterations. For example, if you want to add validation, tell it exactly what you want:

A request class in Laravel.

Or add validation in the controller, with a certain length, rules, etc.

This way, you prevent the AI ​​from wandering too much and get results closer to what you expect.

3. Define the output format

Although I'm mainly talking about code, you can also request other formats: list, table, outline, step-by-step, etc.

4. Use examples

This is one of the best practices. In programming, if you already have a class or structure, pass it to the AI ​​and tell it to adapt it to another language or framework.
For example, I did this in a Django course: I took Laravel classes and asked it to translate them to Django. This gave me a solid foundation to build on.

The same applies if you want to generate images or other content: the more examples, the better.

5. Establish the role

Nowadays, models usually infer the role automatically (journalist, programmer, etc.), but if you don't get the answer you want, explicitly tell it to act as such.

6. Control the length

If you want a short summary or a long text, indicate it clearly. Words, characters, or paragraphs: length is part of controlling the result.

7. Rephrase when necessary

If the result isn't what you expected, simply reframe the prompt.

8. Ask open-ended questions

You don't always need a closed answer. Sometimes what you're looking for is a list of ideas, alternatives, or brainstorming.

9. State restrictions

If you want to use certain technologies, frameworks, or languages, say so clearly. Otherwise, the AI ​​will use what it "thinks is best," and it may not be what you're looking for.

That's why it's key to have a basic understanding of what we're asking for. Remember: you're the pilot; the AI ​​is just the tool.

10. Combine creativity and precision

Vary the prompt when necessary. Experiment.

I agree to receive announcements of interest about this Blog.

How to write the best prompts and have AI do exactly what you need

- Andrés Cruz

En español