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 content, such as explanations or code, in response to instructions. In data analytics, a generative AI can act like an advisor on speed dial: it can suggest an approach, explain unfamiliar methods, and help prepare an analytical pipeline. The analyst still owns the question, the data, and the decision. section 1.2.1 section 1.2.3

Start with a business question, not a search for a magic tool. A language model can help identify relevant data, propose ways to clean and analyze it, generate Python code, and suggest how to present or interpret results. It can also summarize, classify, or answer questions about text. Use it alongside analytical tools rather than expecting it to perform every task reliably on its own. section 1.2.1 section 1.2.2 section 1.2.3

Figure 1.1 Recommended generative AI–supported data analysis flow
figure

Use this flow to see where generative AI can support the stages of a data analysis. section 1.2.1

Treat the interaction as an iterative workflow:

  • Describe the business question and relevant context. Ask for an approach or code, then check that the response answers the question you actually asked. section 1.3.6 section 3.3.1
  • Run and test generated code. Inspect the data and results, including sample records or counts, before trusting an interpretation. section 2.3 section 3.5
  • Refine the prompt when the answer misses a requirement. Restate important context rather than assuming the model will remember it correctly. section 3.3.1 section 3.5

A more precise sales question

A request for code about the “most common product categories” can produce category counts, even when the real business question concerns sales. A better prompt asks for a complete Python solution to compare product categories by sales volume and revenue across Brazilian regions. The proposed workflow merges product, order, and customer data before grouping the results. Execute and inspect the code rather than assuming the requested measures are correct. section 3.3.1 section 3.5

A confident answer is not proof. Models can generate plausible but invented information, respond differently to changes in wording, or lack specialized domain knowledge. Use their suggestions as leads to investigate, and check business conclusions against the data and relevant expertise. Do not paste confidential data into a public web interface. section 1.1 section 1.2.3 section 1.3.1

How Starting Data Analytics with Generative AI and Python covers it

How deep it goes
Explains iterative analytical workflows and limitations while deliberately avoiding model architecture details and advanced API integration.
Examples
Uses product-category sales across Brazilian regions and customer-review analysis to demonstrate AI-assisted analytics.
What you can do after
Apply generative AI via ChatGPT or Gemini to plan analyses, generate code, and refine answers while testing outputs.
How it connects
Connects generative AI with 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.