A Text Prompt Generator

105 – A Text Prompt Generator

Develop the skill to create better text prompts. (Prompt Engineering)

Intro: Many students view the AI chat interface like a replacement for Google Search. We want to change that mentality. We developed a Chatbot Text Prompt Builder so that we can explore different ways to interact with an AI chatbot. The examples are in English.

By [Author] | [Date] | ~ [Read time]

Overview

Artificial intelligence (AI) is rapidly changing the world, and it’s becoming an essential tool for students. However, many students are only scratching the surface of what AI can do. This article introduces a program designed to help high school students master the art of prompt engineering (for text), unlocking the full potential of AI.

Getting to know Text Prompt Builder

Execute the program(s)

Both of these programs are the same but were created by AI using two different models. Compare and contrast them.

Text Prompt Builder by Claude

Text Prompt Builder by Gemini

Using Prompts and Fixing Errors

The program helps students understand that writing prompts is not just about asking questions; it’s about giving instructions. Students learn to structure their prompts, specify the desired output, and provide context. If the AI’s response isn’t what’s expected, the program offers guidance on how to refine the prompt. This includes identifying vague language, adding more details, or adjusting the tone.

Tips & Troubleshooting

  • Be Specific: Be Detailed but Concise. The AI does not have prior knowledge so set the context first and detail what it needs to know. Work as if your encountering the AI for the first time.
  • Experiment: : Try different phrasing, keywords, and structures to see how they affect the results. This tools is help you think through your problem not to chat with the AI.
  • Iterate: Prompt engineering is an iterative process. Don’t be afraid to revise your prompts based on the AI’s responses.
  • Explore: AI can be used for various tasks, from writing stories to creating code.
  • Final Check: Prompt engineering is an iterative process. Don’t be afraid to revise your prompts based on the AI’s responses.
  • Ask the AI: After you have developed your prompt/idea in this tool. ask the AI to improve it further.

Wrap-up / Call to Action

Review the Section below and bring your questions to class.

Submit your project homework to our Google Classroom, then tell us what you learned.

Here is your question: Computer programming involves changing the flow of a program. Give examples of how you can do the same with “Prompt Engineering” using the following common programming flow structures.

Here is the format to submit your homework:

Do-While:

If-Then-Else:

Case-Else:

Format (YYYY/mm/DD):

Call a Function, Method or Procedure:

Answers for further exploration

Classic Control Structures
Programming Structure Prompt Engineering Examples
Do-While 1. Keep suggesting titles until one includes the word “future”.

2. Continue generating jokes until one mentions “cats”.

3. Keep rewriting the sentence until it is under 10 words.

4. Keep listing ideas until one involves “space travel”.

If-Then-Else 1. If the text is formal, rewrite casually; else, summarize in 3 bullets.

2. If the input is a question, answer it; else, explain the topic.

3. If the topic is history, give a timeline; else, provide a fun fact.

4. If the sentence is longer than 20 words, shorten it; else, leave it unchanged.

Case-Else (Switch) 1. If topic is science, give a fact; if art, describe a painting; else, give a quote.

2. If input mentions food, suggest a recipe; if travel, suggest a destination; else, share a tip.

3. If subject is math, solve a problem; if literature, summarize a book; else, tell a proverb.

4. If category is technology, explain a gadget; if sports, give a stat; else, share trivia.

Format (YYYY/mm/DD) 1. Always return the date in format YYYY/mm/DD.

2. Show today’s date as YYYY/mm/DD only.

3. Convert all dates into YYYY/mm/DD format.

4. Output the deadline strictly as YYYY/mm/DD.

Call a Function/Procedure 1. When I say “summarize”, shorten text to 3 sentences.

2. When I say “analyze”, list pros and cons.

3. When I say “translate”, convert to Spanish.

4. When I say “expand”, add 2 more examples.

For Loop 1. Generate 5 motivational quotes, numbered 1 to 5.

2. List 3 synonyms for “happy”.

3. Write 4 variations of the sentence “AI helps humans”.

4. Create 10 trivia questions about history.

While Loop 1. Keep generating synonyms while they are unique.

2. Continue listing animals until you reach one starting with “Z”.

3. Keep suggesting names while none include “star”.

4. Keep rewriting until the sentence is under 15 words.

Advanced Structures
Programming Structure Prompt Engineering Examples
Try-Catch (Error Handling) 1. Try to explain quantum physics simply; if too complex, give a metaphor.

2. Try to translate into French; if not possible, summarize instead.

3. Try to solve the riddle; if unclear, explain possible approaches.

4. Try to generate a poem; if blocked, provide a quote instead.

Recursion 1. Explain the concept, then explain the explanation itself.

2. Define the word, then define the definition.

3. Summarize the text, then summarize the summary.

4. Translate the sentence, then translate the translation back.

Break 1. List animals but stop once you reach “lion”.

2. Generate jokes but stop after the first funny one.

3. Suggest names but stop once one includes “moon”.

4. Keep listing until you hit a duplicate, then stop.

Continue 1. List numbers 1–10 but skip 5.

2. Generate synonyms but skip repeats.

3. Suggest destinations but skip any in Europe.

4. Write sentences but skip ones longer than 20 words.

Only LLM Can Do This
Capability Prompt Engineering Examples (Copy-Paste)
Semantic intent inference 1. Infer my intent from this messy brief and rewrite it as a clear project goal.

2. Read the following meeting notes and state what the team is really trying to achieve.

3. I’ll describe symptoms informally; infer the underlying problem category without diagnosing.

4. From this vague feature request, extract the core user need and one measurable success metric.

Style transfer without explicit rules 1. Rewrite the paragraph in the voice of a thoughtful mentor, warm but precise.

2. Transform this technical spec into a persuasive executive summary with a confident tone.

3. Keep all facts but convert the style to minimalist, high-impact copy.

4. Make this email sound empathetic and proactive without changing the commitments.

Analogical reasoning and metaphor creation 1. Explain blockchains to a 10-year-old using a playground metaphor.

2. Describe APIs using a restaurant analogy that preserves technical accuracy.

3. Teach gradient descent with a mountain-hiking metaphor; keep math intuition intact.

4. Compare data governance to city planning in a way that clarifies roles and rules.

Cross-domain synthesis 1. Combine behavioral economics and UX design to propose onboarding improvements.

2. Merge lean manufacturing ideas with software CI/CD to reduce deployment waste.

3. Apply game design mechanics to increase engagement in a learning app.

4. Use storytelling principles to improve the clarity of this scientific abstract.

Ambiguity resolution 1. The instruction is ambiguous; list the plausible interpretations and choose the best with justification.

2. Disambiguate this request by asking 3 targeted questions, then proceed with the most likely intent.

3. Identify missing constraints in this prompt and propose defaults that fit the context.

4. Resolve conflicting requirements and produce a balanced plan with trade-offs noted.

Socratic dialog generation 1. Guide me to a better marketing angle by asking stepwise, reflective questions.

2. Help me refine this thesis with a short Socratic dialogue that challenges assumptions.

3. Use iterative questioning to uncover my real target audience and desired outcome.

4. Lead me from a vague idea to a testable hypothesis in 6 questions or fewer.

Contextualization to audience 1. Explain this concept for a non-technical CEO in 120 words, outcome-first.

2. Reframe the proposal for a skeptical engineer with evidence and clear trade-offs.

3. Convert the summary for a time-poor investor: risks, traction, and next milestone.

4. Adapt this message for frontline staff with concrete steps and plain language.

Implicit constraint satisfaction 1. Write a tagline that is under 7 words, rhymes, and implies trust without saying “trust”.

2. Draft a bio that feels humble yet credible and avoids superlatives.

3. Create a policy note that is firm but non-confrontational and keeps all dates exact.

4. Compose a response that signals urgency without sounding alarmist or apologetic.

Few/zero-shot generalization 1. Learn the pattern from these two examples, then generate four more that fit the pattern.

2. Without training, produce a checklist modeled on the style shown in the single sample.

3. Extrapolate a naming convention from one template and create five consistent variants.

4. Mimic the tone from this short paragraph and apply it to a new topic.

Multilingual nuance and idioms 1. Translate this paragraph into Spanish while preserving idiomatic tone and cultural nuance.

2. Paraphrase into French, keeping the subtext polite-but-firm as in the original.

3. Convert informal English slang into professional Japanese without losing intent.

4. Localize the copy for Mexican Spanish, adjusting idioms and examples appropriately.

Creative synthesis under constraints 1. Write a 100-word story that includes a twist, uses no adverbs, and ends with a question.

2. Generate brand values that align with sustainability and innovation, each in 5 words.

3. Create a product pitch with one metaphor, one statistic, and one emotional hook.

4. Produce a haiku about resilience that avoids nature imagery but feels authentic.

Pragmatic common-sense rewriting 1. Rewrite the instructions so a rushed reader can’t misinterpret the steps.

2. Reorder this email to put the most practical info at the top for quick action.

3. Turn this policy into a checklist that reduces likely mistakes.

4. Make the plan resilient by anticipating and addressing the top three failure points.

Practical Use Cases
Domain Prompt Engineering Examples (Copy-Paste)
Marketing 1. Write 3 ad headlines under 8 words that highlight eco-friendliness.

2. Generate a product description that emphasizes affordability and durability.

3. Create a social media caption with humor and a call-to-action.

4. Draft a persuasive email pitch for a new service launch.

Education 1. Explain photosynthesis in simple terms for a 12-year-old.

2. Generate 5 quiz questions on World War II.

3. Summarize this textbook chapter into 3 key points.

4. Create a mnemonic to remember the planets in order.

Coding 1. Explain recursion with a simple Python example.

2. Generate pseudocode for a sorting algorithm.

3. Rewrite this function to be more efficient.

4. Provide step-by-step debugging advice for this error message.

Storytelling 1. Write a 200-word short story with a twist ending.

2. Generate 3 character names with unique backstories.

3. Create a dialogue between a hero and a villain.

4. Rewrite the story in the style of a fairy tale.

Business 1. Summarize this meeting transcript into 5 action items.

2. Draft a professional email requesting a deadline extension.

3. Create a SWOT analysis for a startup idea.

4. Generate a 2-paragraph executive summary of this report.

Personal Productivity 1. Create a daily to-do list with 5 prioritized tasks.

2. Summarize this long email into 3 actionable steps.

3. Suggest a morning routine that boosts focus and energy.

4. Rewrite my goals into SMART format (Specific, Measurable, Achievable, Relevant, Time-bound).

Health & Wellness 1. Generate a 7-day meal plan that is vegetarian and high in protein.

2. Suggest 5 simple desk exercises for office workers.

3. Create a mindfulness script for a 2-minute breathing exercise.

4. Summarize the benefits of walking 30 minutes daily.

Creative Writing 1. Write a poem about resilience in 4 lines.

2. Generate 3 alternative endings for this short story.

3. Create a metaphor that explains hope in a fresh way.

4. Rewrite this passage in the style of Shakespeare.

Research & Learning 1. Summarize the key points of this article in 5 bullets.

2. Compare the pros and cons of renewable vs fossil fuels.

3. Generate 3 follow-up questions to deepen understanding of this topic.

4. Explain this concept as if teaching a beginner.

Travel & Lifestyle 1. Suggest 5 budget-friendly destinations in Europe.

2. Create a packing checklist for a 7-day hiking trip.

3. Generate a 3-day itinerary for Tokyo with food and culture highlights.

4. Recommend lifestyle habits that improve sleep quality.

Extended Prompt Engineering Patterns
Pattern Prompt Engineering Examples (Copy-Paste)
Data Transformation & Parsing 1. Extract all numbers from this text and list them in ascending order.

2. Parse the following paragraph and return only the names mentioned.

3. Convert this messy list into a clean CSV-style output.

4. Identify all dates in the text and reformat them as YYYY/mm/DD.

Stateful Memory & Context Management 1. Remember that “Project Phoenix” refers to the marketing campaign; use that shorthand later.

2. Keep track of the characters I introduce and reuse them consistently in the story.

3. Store the fact that my budget is $500 and apply it to all future suggestions.

4. Recall that “Alpha” means the prototype version whenever I mention it again.

Constraint Satisfaction / Optimization 1. Write a 150-word pitch that is persuasive, avoids jargon, and includes one statistic.

2. Generate a poem that rhymes, is exactly 12 lines, and avoids the word “love”.

3. Create a product description under 50 words that mentions durability and affordability.

4. Draft a headline under 8 words that implies innovation without using the word “new”.

Meta-Prompting (Self-Reflection) 1. Generate three answers, then explain which one is strongest and why.

2. Write a summary, then critique it for clarity and conciseness.

3. Produce a solution, then list two ways it could be improved.

4. Draft an argument, then highlight its weakest point.

Chain-of-Thought / Stepwise Reasoning 1. Solve this math problem step by step, showing reasoning before the final answer.

2. Explain the logic behind your conclusion in numbered steps.

3. Break down the decision-making process into clear stages.

4. Show the intermediate steps before giving the final summary.

Role-Playing / Simulation 1. Act as a startup advisor and critique my pitch like an investor.

2. Pretend you are a teacher explaining this concept to a 12-year-old.

3. Role-play as a recruiter giving feedback on my resume.

4. Simulate a debate between two experts with opposing views.

Similar Posts