Prompt Engineering Basics: Getting Better Results from AI

The difference between mediocre and excellent AI outputs often comes down to how you ask. Here's how to write prompts that work.

10 min read Practical Skills
Kasun Wijayamanna
Kasun WijayamannaFounder, AI Developer - HELLO PEOPLE | HDR Post Grad Student (Research Interests - AI & RAG) - Curtin University
AI prompt engineering and language model interaction

You've tried ChatGPT. Sometimes the results are impressive. Other times, they're generic, off-topic, or just wrong. What's the difference?

Often, it's the prompt. LLMs are remarkably capable, but they need clear direction. Prompt engineering is the skill of writing inputs that consistently produce useful outputs. It's not magic—it's just communication done thoughtfully.

Why Prompts Matter

LLMs generate responses based on your input. A vague prompt gives the model too much room to interpret—and it might interpret wrong. A clear prompt constrains the output to what you actually need.

Poor prompt: "Write me something about marketing."
Better prompt: "Write a 200-word LinkedIn post announcing our new Perth office, targeting small business owners. Tone should be professional but warm. Include a call to action to book a consultation."

The better prompt specifies format, length, topic, audience, tone, and desired action. The AI knows exactly what you need.

Core Principles of Effective Prompts

1. Be Specific

Vague requests get vague responses. Include relevant details: who, what, why, how much, in what format, for what audience.

  • Instead of "Summarise this" → "Summarise this in 3 bullet points for a non-technical executive"
  • Instead of "Write an email" → "Write a follow-up email to a prospect who attended our webinar but hasn't responded"

2. Provide Context

The AI doesn't know your business, your industry, or your situation. Give it the context it needs to respond appropriately.

  • What's your role or business?
  • Who is the target audience?
  • What's the goal of this output?
  • What constraints apply (word count, format, tone)?

3. Specify the Format

If you want bullet points, say so. If you want a table, ask for one. If you want a formal letter, specify that. LLMs are flexible—tell them what format serves you best.

4. Set the Tone

"Professional," "casual," "technical," "friendly," "formal"—these cues shape the output significantly. Match the tone to your use case.

5. Give Examples

If you want output in a specific style, show an example. This is called "few-shot prompting"—giving the AI samples to pattern-match against.

Practical Prompt Techniques

Role Assignment

Tell the AI to act as a specific role. This frames its responses appropriately.

"You are an experienced HR manager at a mid-sized Australian company. Review this job description and suggest improvements to attract better candidates."

Step-by-Step Instructions

For complex tasks, break down what you want into steps. This reduces errors and gives you more control.

"Analyse this customer complaint. Step 1: Identify the core issue. Step 2: Note any contributing factors. Step 3: Suggest a resolution. Step 4: Draft a response email."

Output Constraints

Set boundaries on the output to keep it focused and usable.

  • "Keep your response under 150 words"
  • "Format as a numbered list with no more than 5 items"
  • "Use only Australian English spelling"
  • "Do not include technical jargon—explain for a non-technical audience"

Iterative Refinement

Don't expect perfection on the first try. Use follow-up prompts to refine:

  • "Make this more concise"
  • "Make the tone more casual"
  • "Add specific examples"
  • "Focus more on the cost benefits"

Thinking Out Loud (Chain of Thought)

For complex reasoning, ask the AI to think step by step before giving a final answer. This improves accuracy on analytical tasks.

"Before answering, think through this step by step. Then give me your recommendation."

Business Prompt Templates

Here are starting templates for common business tasks. Customise them for your specific needs.

Email Drafting

"Write a [type] email to [recipient]. The purpose is to [goal]. Key points to include: [points]. Tone should be [tone]. Keep it under [word count] words."

Document Summarisation

"Summarise the following [document type] for [audience]. Focus on [specific aspects]. Format as [bullet points/paragraph/table]. Limit to [length]."

Content Creation

"Write a [content type] about [topic] for [platform]. Target audience: [description]. Goal: [what you want readers to do]. Length: [words]. Tone: [style]. Include: [specific elements]."

Analysis and Recommendations

"Analyse the following [data/situation] from the perspective of a [role]. Identify [what to look for]. Provide [number] recommendations. Explain your reasoning. Format as [structure]."

Research and Comparison

"Compare [option A] and [option B] for [use case]. Consider: [criteria]. Present as a comparison table. Conclude with a recommendation for [context]."

Common Mistakes to Avoid

Being Too Vague

"Help me with marketing" could mean a thousand things. The AI will guess, and probably guess wrong.

Assuming Context

The AI doesn't know what happened in your last meeting, what your company does, or who your customers are. If it's relevant, include it.

Not Specifying Format

If you want a list and get an essay, that's often because you didn't ask for a list.

Accepting First Output

The first response is a starting point. Refine it. Push back. Ask for changes. The conversation is part of the process.

Trusting Without Verification

LLMs can be confidently wrong. Always verify facts, figures, and anything that matters. Use AI as a drafting assistant, not an oracle.

Beyond Basics: Advanced Considerations

System Prompts

If you're building AI features into software, system prompts set persistent instructions that shape all responses. This is where you define behaviour, personality, and constraints for your application.

Prompt Libraries

For teams, create a shared library of effective prompts for common tasks. This ensures consistency and saves time. Document what works.

Testing and Iteration

When building AI-powered features, test prompts across different inputs. What works for one example might fail on another. Robust prompts handle variety.

Going deeper: If you're building AI into your products or processes, prompt engineering becomes a technical skill that requires systematic testing. For production systems, consider working with experienced developers who understand both the business context and the technical nuances.

Getting Started

  1. Start with one task. Pick a real task you do regularly—email drafting, document summarising, research.
  2. Write a detailed prompt. Include role, context, format, tone, and constraints.
  3. Refine based on output. If the result isn't right, adjust your prompt. Note what changes work.
  4. Save effective prompts. Build a personal library of prompts that work for your common tasks.
  5. Share with your team. Effective prompts are reusable. Spread what works.