Introduction to Prompt Engineering
Introduction to Prompt Engineering
Engineering
How to talk to LLMs?
Who am I?
Name: Atul Kulkarni
Definition: A prompt for an LLM is a piece of text input that serves as instructions
or a query to guide the AI model in generating a relevant response.
Structure of a Prompt
"You are a business analyst AI specializing in market trends. Analyze the impact of
remote work on the commercial real estate market in major U.S. cities. Use the
following data points: [Insert 3-5 key statistics about remote work adoption and
office occupancy rates]. Provide your analysis in a 5-point summary, each point no
longer than 3 sentences. Include one potential long-term consequence and one
potential opportunity for investors. Avoid technical jargon and explain concepts in
layman's terms."
Example: Creative Writing Prompt
Creative Writing Prompt
"As a storytelling AI, write a 500-word short story that combines elements of
science fiction and romance. The story should be set on a space station orbiting
Jupiter in the year 2150. Include at least two characters: a human scientist and an
AI assistant. The central conflict should involve an unexpected discovery about
Jupiter's atmosphere. Structure the story with a clear beginning, middle, and end.
Use vivid descriptive language and incorporate at least one dialogue exchange.
The tone should be hopeful yet mysterious."
Example: Educational Content Creation Prompt
"Assume the role of a history teacher creating content for 8th-grade students. Develop a
lesson plan on the Industrial Revolution. The plan should include:
A brief overview (100 words)
Three main learning objectives
A timeline of 5 key events
Two discussion questions
One hands-on activity idea Ensure the content is engaging and appropriate for 13-14
year olds. Use simple language and avoid complex historical terms without explanation.
The total length should not exceed 500 words. Format your response with clear headings
for each section."
Example: Technical Problem Solver
"You are an AI assistant specializing in software development. A junior developer is facing the
following issue: Their Python web scraping script works fine for small websites but crashes when
trying to scrape larger sites with thousands of pages. They're using the requests library and
BeautifulSoup.
Provide a step-by-step troubleshooting guide (maximum 7 steps) to help identify and resolve the
issue. For each step, explain:
● What to check
● Why it's important
● How to implement the solution
Include code snippets where relevant. Assume the developer has basic Python knowledge but is
new to web scraping. Avoid advanced concepts without explanation. End your response with two
best practices for efficient web scraping of large sites."