Sổ Tay AI
ky-thuat Beginner

What is Prompt Engineering?

The craft of writing instructions that get AI models to produce better, more reliable output.

Updated: May 2, 2026 · 1 min read

Prompt engineering is the practice of writing and refining the instructions you send to large language models (LLMs) like ChatGPT, Claude, or Gemini to get better results.

Why it matters

The same question phrased two ways can yield wildly different answers. Good prompts:

  • Give the model the right context and goal
  • Reduce hallucinations (made-up facts)
  • Produce output in the exact format you need (markdown, JSON, tables)
  • Save tokens — and therefore money — on API calls

Example

Weak prompt:

Write about AI

Stronger prompt:

You are a tech editor writing for general readers.
Write an 800-word article on "What is an AI agent?" with this structure:
1. A short definition (2-3 sentences)
2. One real-world example anyone can relate to
3. When to use one — and when not to
Tone: friendly, plain language, define jargon on first use.

When to use it

  • You use ChatGPT/Claude daily and want better output
  • You’re building a product on top of an LLM API
  • You need consistent, templated content from AI
Tags
#prompt#llm#basics