liveBook · Manning

Prompt engineering

As explained in Effective Data Analysis

Prompt engineering is the practice of designing and refining instructions supplied to generative models to obtain desired outputs.

Prompt engineering is the practice of designing and refining instructions for generative AI models so they produce desired, consistent output. Clear prompts can increase usefulness, reduce some model weaknesses, and support reliable integration into analytics, software, and end-user tools. section 12.4.1 section 12.5

A practical prompt-engineering workflow includes:

  • Review the model’s capabilities and performance for the intended task or domain. section 12.4.1
  • State the requested analysis, output characteristics, and content to include or exclude. section 12.4.1 section 12.4.4
  • Iterate on wording and formatting, then test the results against stakeholder needs and appropriate performance metrics. section 12.4.4 section 12.5

From vague request to useful analysis

“Analyze the attached dataset” produced a request for clarification. A refined prompt—“Provide the mean and median for login_days, and mean login_days values by region”—returned overall statistics and regional comparisons. The same approach can request descriptive statistics, documented predictive-model steps, Python code, stakeholder recommendations, and output limited to model-supported variables. section 12.4.4

How Effective Data Analysis covers it

How deep it goes
Explains iterative prompt design, model review, output constraints, and evaluation, but does not detail model internals or fine-tuning.
Examples
Uses customer-login statistics, support-text summaries, rat-sighting analysis, predictive models, Python code, and agency recommendations.
What it assumes
Assumes basic analytics familiarity while teaching prompt construction through dataset descriptions, statistics, modeling, and evaluation tasks.
What you can do after
Apply prompt refinement to request analyses, code, metrics, models, and constrained stakeholder recommendations from chatbots.
How it connects
Connects generative AI with large language models, data analysis, predictive modeling, and stakeholder recommendations.

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 Effective Data Analysis. The section links point to the parts of the book it draws on.