liveBook · Manning

Chapter 4: Prompt engineering and problem formulation

What you will learn in chapter 4 of AI for Everyday IT

This introduction positions prompt engineering and problem formulation as complementary skills for productive AI interactions and previews their application in the next chapter.

After this chapter you will be able to

What it builds on

Section by section

Introduction

This introduction positions prompt engineering and problem formulation as complementary skills for productive AI interactions and previews their application in the next chapter.

Key terms: prompt engineering, prompts, problem formulation, business requirements, specifications, zero-shot prompting, single-shot prompting, few-shot prompting, many-shot prompting

4.1 Prompt engineering

This section contrasts search-style queries with conversational AI prompting and explains how skilled, progressive questions help users learn unfamiliar topics.

Key terms: prompt engineering, keywords, rigid syntax, natural conversation, context, questions that build on each other, comprehensive knowledge, prompt engineers, social media communities, prompting techniques

4.2 The spectrum of AI prompting

This section introduces four prompting categories distinguished by how many examples you provide to guide an AI response.

Key terms: zero-shot prompting, single-shot prompting, few-shot prompting, many-shot prompting, examples, prompting strategies, scenarios

4.2.1 Zero-shot prompting

This section defines zero-shot prompting as asking an AI to perform a task with no examples or context, explaining when its general-purpose results are useful and when prompts need refinement.

Key terms: zero-shot prompting, examples, context, inherent knowledge, training, straightforward tasks, factual questions, basic requests, general training, particular objectives

4.2.2 Single-shot prompting

This section explains how a single example can guide an AI model to produce a response with matching patterns, style, or characteristics, especially through multimodal image prompting.

Key terms: single-shot prompting, single-shot learning, example, vision capabilities, multimodal, visual single-shot approach, artistic style, design principles

4.2.3 Few-shot prompting

This section explains how few-shot prompting uses several examples to teach an AI the patterns, variations, and boundaries of a desired task or style.

Key terms: few-shot prompting, single-shot prompting, examples, temporary training, patterns, variations, boundaries, consistent tone and structure, customer service emails, consistent quality

4.2.4 Many-shot prompting

This section explains how many-shot prompting uses numerous organized examples to guide AI through complex, nuanced, and format-sensitive tasks.

Key terms: many-shot prompting, few-shot prompting, examples, careful organization, strategically chosen examples, clear patterns, edge cases, complex patterns, tone, style

4.2.5 The future of prompt engineering

This section explains how improving AI capabilities will reduce the instruction needed for basic tasks while making examples and problem formulation more important for customization.

Key terms: zero-shot prompting, single-shot prompting, reasoning capabilities, few-shot prompting, many-shot prompting, customization, preferences, requirements, prompt engineering, problem formulation

4.3 The mechanics of a good prompt

This section introduces clarity, conciseness, relevance, and specificity as the enduring principles for writing effective AI prompts despite differences among models and platforms.

Key terms: clarity, conciseness, relevance, specificity, prompt engineering, transactional workloads, enterprise support, high performance, language models, text classification

4.3.1 Key principles in prompt construction

This section explains how clarity, conciseness, relevance, and specificity make prompts more effective and useful.

Key terms: clarity, logical flow, new chat, memory, conciseness, efficient, redundant language, relevance, intended goal, Act as prompt

4.4 Introductory prompts for IT roles

This section demonstrates how to turn vague IT requests into clear, specific, role-relevant prompts through examples across common IT tasks.

Key terms: bad prompt, good prompt, specific, clear, relevant, SQL Server, SELECT query, home Wi-Fi network, Python script, file backups

4.4.1 Awesome Prompts Lab

This lab uses role-based prompt examples to show how specific instructions, expected inputs and outputs, and experimentation make AI interactions more useful and interactive.

Key terms: role-play scenario, ESL teacher, Systems Administrator interviewer, Linux terminal, JavaScript console, objective, specific task, input, output, motivational coach

4.5 Advanced techniques

This section introduces advanced prompting techniques as practice-based methods for refining and directing AI responses more precisely.

Key terms: advanced techniques, foundational prompt crafting, AI responses, prompt examples

4.5.1 Recursive prompts

This section introduces recursive prompts as prompts that use a prior response to extend a conversation with deeper or more nuanced follow-up analysis.

Key terms: recursive prompts, previous responses, previous summary, potential challenges, opportunities, next 5 years

4.5.2 Context injection

4.5.3 Explicit constraints

4.5.4 Prompt chaining

This section introduces prompt chaining as asking related questions together, while noting that large-context tasks may work better one request at a time.

Key terms: prompt chaining, comprehensive response, context, large amounts of information

4.5.5 Sentiment directives

4.5.6 Templating

This section shows how templates specify a predefined response structure so AI can produce organized outputs such as reports, summaries, and analyses.

Key terms: Templates, predefined format, Introduction, Main Arguments, Methodology, Conclusion, Recommendations, advanced techniques, AI-generated responses, complex instructions

4.6 Best practices and common mistakes

This section introduces a practical mindset for prompt engineering: practice, experiment, and keep prompts simple rather than pursuing perfection.

Key terms: prompt engineering, practice, experimentation, best practices, common mistakes, AI model, instructions, prompt

4.6.1 Learning from success

This section recommends learning effective prompting by studying successful community examples and refining prompts through hands-on experimentation with different AI models.

Key terms: Awesome ChatGPT Prompts, templates, structure, language, context, hands-on experience, trial and error, strengths and limitations, AI models, tailor your prompts

4.6.2 Pitfalls to avoid

This section identifies common prompt-design mistakes and shows how to avoid unclear, unworkable, or context-confused AI requests.

Key terms: over-specification, under-specification, misalignment, AI capabilities, proprietary algorithm, training data, assuming AI understanding, contextual knowledge, current chat session, stateless

4.6.3 Meta-prompts

This section introduces meta-prompts as embedded instructions that steer how an AI presents an answer, especially for different audiences and styles.

Key terms: meta-prompts, prompt, language model, For Kids, For college students, For astrophysicists, ChatGPT, Claude, Copilot, Gemini

4.7 Problem formulation

This section explains problem formulation as defining, structuring, and guiding an AI task with domain expertise rather than merely asking AI for a finished answer.

Key terms: problem formulation, prompt engineering, components, interconnections, requirements, boundaries, final product, subject matter expert, domain knowledge, technical prompting skill

4.8 Incorporating problem formulation

This section shows how incorporating problem formulation turns a basic prompt into a context-rich request that produces more targeted AI output.

Key terms: problem formulation, context, specific requirements, targeted AI responses, Python, ascending order, QuickSort, MergeSort, scalable, computational complexity

4.9 Prompts used in this chapter

This section lists example prompts used to revise writing, refine wording, and verify technical language while developing the chapter.

Key terms: style, clichés, idioms, table, iterations, data analytics engine, Search the web

4.10 Summary

This summary consolidates how prompt engineering and problem formulation produce more useful, precise AI responses for practical IT work.

Where this is used later

Concepts explained in this chapter

← Chapter 3: Basic intelligence Chapter 5: Prompts in action →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.