DEV Community

Gm Aravind
Gm Aravind

Posted on

How to Learn Prompt Engineering

Let’s start with the question of what prompt engineering is and why we should learn it.

What is Prompt Engineering and Why Should We Learn It?

Prompt engineering is the art and science of crafting instructions and constraints with appropriate context that improve the output from the Large Language Models (LLMs).

Generally, when I want to ask something, I write like a Google query. However, after learning these techniques, my outputs are much better. It doesn’t look AI-generated. They are well-crafted outputs with good accuracy.

The power of prompt engineering is underrated.

When I first started learning prompt engineering, there were many techniques like

Zero-shot — Just asking directly without examples.

Few-shot — asking directly with examples.

Chain of thought — asking AI to think step by step.

ReAct — Thinks first about the question, plans to act and observes the results until the output is good enough.

It first looked confusing with all these terms. When I started learning more about each technique in depth and tried it in practice, I began to understand when and why to use each one. Honestly, the results after learning these techniques are amazing. The outputs of my prompts don’t look generic, they are giving more realistic outputs that I haven’t seen before.

These techniques have research papers backing them, showing drastic improvements compared to normal prompt results.

Resources for learning prompt engineering

These resources are arranged from beginner to advanced levels. Feel free to skip to your appropriate level:

Beginner to Intermediate

AI Engineering Academy — Prompt Engineering

OpenAI — Prompt Engineering Guide

Nebius Academy — AI-Assisted Programming

Intermediate to Advanced

DeepLearning.AI — ChatGPT Prompt Engineering

Cohere LLM University

Google — Prompting Essentials Certificate

Comprehensive Guide

Prompt Engineering Guide

In conclusion: Start writing simple prompts like Zero-shot and move to advanced techniques when you feel it is necessary to use them.

Top comments (0)