Skip to main content

Back to blog

Practical AI

How to Write Effective AI Prompts

A practical framework for writing clearer prompts that produce more useful AI responses.

Aug 20, 2026 1 min read Uriel Maldonado

Good prompts are less about finding magic words and more about giving clear direction. The better the context, the more useful the response.

Start by stating the outcome you want. Instead of asking:

Write about Phoenix LiveView.

Try:

Write a beginner-friendly introduction to Phoenix LiveView for Elixir developers. Explain when to use it and include one small example.

A strong prompt usually includes four things:

  1. Goal: What should the response accomplish?
  2. Context: Who is it for, and what do they already know?
  3. Constraints: What length, tone, or format should it use?
  4. Example: What should the result resemble?

For example:

Create a five-step tutorial showing junior developers how to build a search form with Phoenix LiveView. Use a friendly tone, include short code examples, and mention one common mistake.

If the first response misses the mark, refine it. Ask the model to shorten a section, explain an assumption, compare alternatives, or rewrite the answer for a different audience.

Effective prompting is an iterative conversation: begin with a clear destination, review the result, and add direction where needed.