liveBook · Manning

Prompt engineering

As explained in Build AI-Enhanced Web Apps

Prompt engineering is the design and refinement of instructions and contextual information supplied to an AI model to guide its outputs.

Prompt engineering designs and refines instructions and contextual information so AI models produce more accurate, relevant, and useful outputs in web applications. It replaces generic prompts with deliberate guidance matched to user and application needs. section 5.0

Use prompt engineering through complementary strategies:

  • Few-shot learning supplies a limited number of examples so models can adapt quickly to new tasks. section 5.0
  • Chain-of-thought prompting encourages step-by-step reasoning by breaking complex problems into manageable components. section 5.6
  • Control tokens, message prompts, and system prompts define behavioral rules and interaction-specific instructions. section 5.6
  • Template-based generation, function calling, schema validation, parsing, reprompting, and postprocessing improve the reliability of structured outputs. section 4.3.2
  • Prompt management stores prompts for dynamic updates, version control, scalability, access control, and evaluation of output changes. section 5.6

Structured interview feedback

An interview assistant can use tailored prompt engineering to produce feedback or reviews focused on specific needs and areas for improvement, rather than generic responses. section 10.5

How Build AI-Enhanced Web Apps covers it

How deep it goes
Explains strategies, prompt types, structured-output techniques, token limits, and versioning, but does not descend into model internals.
Examples
Uses structured JSON generation, few-shot task adaptation, semantic search, content recommendations, and interview feedback.
What it assumes
Assumes familiarity with AI-powered web applications while introducing prompt types, strategies, tokens, and management practices.
What you can do after
Apply it to improve accuracy, contextual relevance, structured output reliability, and user experience in AI-powered web applications.
How it connects
Connects few-shot learning, chain-of-thought prompting, embeddings, tokenization, control tokens, structured data generation, and prompt versioning.

Also explained in

Compare how 38 books explain prompt engineering →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build AI-Enhanced Web Apps. The section links point to the parts of the book it draws on.