liveBook · Manning

Generative modeling

As explained in Starting Data Analytics with Generative AI and Python

A machine-learning model that generates new content, such as text, code, or explanations, from learned patterns and user instructions.

Generative modeling produces new text, code, and explanations in response to instructions. In data analytics, a language model can act like a patient advisor: ask it where to start, which methods fit a question, or how to write a first version of an analysis. It can suggest a tailored workflow, but it cannot take responsibility for understanding the data or making the decision. section 1.1 section 1.2.1

Use generated output as a proposal to test, not a result to trust.

  • State the business question and relevant data clearly. If the answer drifts, restate the exact question rather than assuming the model remembers it. section 3.3.1
  • Run generated code and inspect its outputs. Check joins, measures, charts, and findings against the underlying records. section 3.3.1 section 3.5
  • Check factual claims and domain-specific advice. Plausible answers may be invented, and small changes in prompt wording can change the response. section 1.1 section 1.2.3
  • Keep confidential data out of unsuitable public interfaces, and set objectives, error handling, and cost controls when integrating a model through an API. section 1.3.1 section 1.3.6

From a vague request to a testable sales analysis

An analyst asks for Python code to identify popular product categories by sales volume, revenue, and region. A vague follow-up produces counts of categories instead—an answer to a different question. Restating the full question leads to code that joins order, product, and customer data and aggregates sales by category and state. The analyst still has to run the code, resolve plotting errors, and check whether the measures answer the intended business question. section 3.3.1

The model is strongest as a supplement to an analytical workflow. It can help plan data preparation, suggest statistical methods, draft code, and propose interpretations of charts. For example, large regional differences in delivery times can prompt possible logistics explanations and follow-up questions—not a verified account of their causes. Complex calculations and production code need separate execution and testing. section 4.5 section 1.2.3

How Starting Data Analytics with Generative AI and Python covers it

How deep it goes
Develops a prompt–run–inspect–revise workflow and practical safeguards, while deliberately deferring model architecture and advanced API integration.
Examples
Uses product-category sales code, regional delivery-time charts, and customer-review analysis to show both useful suggestions and failures.
What it assumes
Assumes responsibility for the business question and data meaning, but starts model interaction with ordinary conversational questions rather than advanced prompting.
What you can do after
Apply it via ChatGPT or Gemini to draft and refine analyses, then execute code and verify claims against data.
How it connects
Links language models to data quality, descriptive analytics, statistical inference, text mining, and data visualization.

Also explained in

Compare how 29 books explain generative modeling →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Starting Data Analytics with Generative AI and Python. The section links point to the parts of the book it draws on.