Prompt Engineering
Prompt Engineering
George Easaw
What is Prompt Engineering?
● Defining the Task: A prompt is a piece of natural language text that describes
the task an AI system should perform. It serves as the instruction or query
given to the model.
● Quality Matters: Good prompts lead to good results. By carefully constructing
prompts, engineers can influence the quality of AI-generated content, whether
it’s text, images, code, or data summaries.
● Understanding Nuance: Effective prompts go beyond mere language—they
capture the nuance, context, and intent behind the query.
Prompt engineers play a pivotal role in ensuring that AI models comprehend not
only the words but also the underlying meaning.
How Prompt Engineering Works
● Transformer Architectures: Generative AI models are built on transformer
architectures. These architectures enable models to grasp language
intricacies and process vast amounts of data through neural networks.
● Techniques for Effective Prompts:
○ Tokenization:
○ Model Parameter Tuning:
○ Top-k Sampling:.
● Foundation Models: These are large language models (LLMs) based on
transformer architecture. They contain essential information for generative AI
systems.
● Text-to-Image AI: For tasks like generating images from text descriptions
(e.g., DALL-E), prompt engineering combines LLMs with specialized models.
1. Exploring the Past: "Analyze the impact of the printing press on the spread
of knowledge and the development of modern society. Discuss the positive
and negative effects, drawing evidence from historical sources."
2. Understanding the Present: "Explain the science behind climate change,
focusing on the causes, potential consequences, and current mitigation
efforts. Include different perspectives and provide credible sources to support
your claims."
3. Investigating the Future: "Predict the potential impact of artificial intelligence
on various aspects of human life, such as work, education, and healthcare.
Consider both optimistic and dystopian scenarios, acknowledging ethical
concerns and potential solutions."
How to write effective PROMPTS ?
● Assign ROLE
● Describe TASK
● Provide CONTEXT
● Provide EXAMPLES
● Create RULES
● Create CONSTRAINTS
● Evaluate and ITERATE
Example Prompt - Provide a list of the top 10 Fortune 100 organisations of the
world in terms of market cap as on 15 November 2024