/
githubmirror
/
Prompt-Engineering-Guide
Обзор
Документация
Войти
/
githubmirror
/
Prompt-Engineering-Guide
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
pages/introduction/elements.en.mdx
67 строк
3 KB
Elvis Saravia
Migrate course links from Thinkific to new academy platform
02 фев 2026, 00:09
02 фев 2026, 00:09
3d96678
Код
Авторство
О чём код?
# Elements of a Prompt import {Bleed} from 'nextra-theme-docs' import { CoursePromo, CoursesSection, CourseCard } from '../../components/CourseCard' As we cover more and more examples and applications with prompt engineering, you will notice that certain elements make up a prompt. A prompt contains any of the following elements: **Instruction** - a specific task or instruction you want the model to perform **Context** - external information or additional context that can steer the model to better responses **Input Data** - the input or question that we are interested to find a response for **Output Indicator** - the type or format of the output. <iframe width="100%" height="415px" src="https://www.youtube.com/embed/kgBZhJnh-vk?si=-a-KvhmXFJMtAuCB" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen /> To demonstrate the prompt elements better, here is a simple prompt that aims to perform a text classification task: *Prompt* ``` Classify the text into neutral, negative, or positive Text: I think the food was okay. Sentiment: ``` In the prompt example above, the instruction correspond to the classification task, "Classify the text into neutral, negative, or positive". The input data corresponds to the "I think the food was okay.' part, and the output indicator used is "Sentiment:". Note that this basic example doesn't use context but this can also be provided as part of the prompt. For instance, the context for this text classification prompt can be additional examples provided as part of the prompt to help the model better understand the task and steer the type of outputs that you expect. You do not need all the four elements for a prompt and the format depends on the task at hand. We will touch on more concrete examples in upcoming guides. <CoursesSection title="Related Learning"> <CourseCard tag="Course" tagColor="blue" title="Prompt Engineering for LLMs" description="Master zero-shot, few-shot, and advanced prompting methods to get better results from large language models." href="https://academy.dair.ai/courses/introduction-prompt-engineering" level="Beginner" duration="2 hours" /> <CourseCard tag="Course" tagColor="purple" title="Building Effective AI Agents" description="Learn to build effective AI agents. Covers function calling, tool integration, and debugging agentic systems." href="https://academy.dair.ai/courses/building-effective-ai-agents" level="Intermediate" duration="5 hours" /> </CoursesSection> <CoursePromo title="Explore All Courses" description="Discover our full catalog of AI and prompt engineering courses. From beginners to advanced practitioners." href="https://academy.dair.ai/" buttonText="Browse Academy" promoCode="PROMPTING20" />