Skip to main content
Practice

Prompt Engineering Wrap-up

Let's summarize the key points of prompt engineering we've learned so far.


Components of a Prompt

Instruction

The part that specifies the task you want the AI to perform

Context

The background information and situation to refer to when performing a task based on the instruction

Input Data

The data the AI analyzes or references while performing tasks

Output Directives

The format of the results required in the prompt


Prompt Engineering

The technique of writing questions or instructions clearly and specifically to obtain the desired response from the AI


Hallucination

The phenomenon where AI generates incorrect information that doesn’t exist in reality


Delimiters

Characters or strings (multiple characters) like ###, --- that clearly separate and structure information within a prompt


Prompting Techniques

Zero-shot Prompting

Handling new tasks that the AI has not specifically trained on, based on pre-trained knowledge


Few-shot Prompting

Providing AI with a few examples and requesting it to perform a specific task based on them


Chain of Thought Prompting

Assisting AI to solve complex problems in a step-by-step manner and encouraging it to explain the reasoning process


Prompt Chaining

Using the output from one prompt as the input to the next prompt


Least-to-Most Prompting

Gradually expanding prompts from simple questions to complex ones


Analogical Prompting

Referencing similar situations or cases


Knowledge Generation

Generating useful information concerning the question before creating the final response


Role Prompting

Guiding AI to generate answers based on a specific role


Self-consistency Prompting

Introducing or generating multiple lines of reasoning in advance and encouraging AI to consistently draw references


Retrieval Augmented Generation

To provide more accurate responses, searching for information from outside the AI model (e.g., relevant websites, databases) and generating responses based on that


Data Formats

JSON

Stands for JavaScript Object Notation, a lightweight data format for storing and exchanging data


XML

Stands for eXtensible Markup Language, used mainly to express hierarchical structure of data


CSV

Stands for Comma-Separated Values, a format where data is stored separated by commas


Image Generation AI

DALL-E

An image generative AI developed by OpenAI. It generates images based on descriptions, connected with ChatGPT


Stable Diffusion

An image generative AI developed by Stability AI Laboratory. Capable of generating high-quality images in various styles


Midjourney

An image generative AI developed by the Midjourney Laboratory. Specialized in creating artistic images


Prompt Functions

Implementing functions that perform specific tasks within prompts to maximize reusability

Want to learn more?

Join CodeFriends Plus membership or enroll in a course to start your journey.