liveBook · Manning

Generative modeling

As explained in Build AI-Enhanced Web Apps

Generative AI is an artificial-intelligence paradigm that generates new content from learned patterns rather than only classifying inputs or following predefined rules.

Generative modeling learns patterns in data and uses them to produce new content. Unlike a model that only recognizes whether an image contains a cat, a generative model can create text, images, audio, video, or code. In a web app, that turns user input into a dynamic response rather than selecting only from predefined content. section 1.5 section 1.0

A large language model (LLM) is one common choice for text features. It uses the context of a prompt to predict a likely next word or sequence of words, enabling answers, summaries, and conversations. Other model types suit other tasks; choose by the required output and consider the quality and type of training data, not just the model architecture. section 1.2.1 section 1.7

To make generation useful in a web app, connect the model to the rest of the product:

  • Provide a UI for prompts and generated results; use conversational components when the interaction calls for follow-up turns. section 1.2.1
  • Handle requests and model-provider integration in the backend, with attention to privacy, reliability, latency, and scaling. section 1.2.1 section 1.7
  • Validate generated content before relying on it. Clear objectives, carefully framed context, cross-validation, and bias auditing help address inaccurate or misleading output. section 1.6.3

Marketing and support features

A marketing tool can accept a written prompt and return campaign images or product descriptions. A support interface can generate replies to customer inquiries, or use feedback sentiment and context to shape a personalized response. Both features need an interface, model access, and checks appropriate to their use. section 1.1.2 section 1.2.1

A JavaScript implementation can use React for the UI, Next.js for backend integration, and the Vercel AI SDK to connect to providers such as Google Gemini or OpenAI. Generated output is not guaranteed to be factual: hallucinations, bias, security, resource use, and compliance remain product concerns. section 1.3 section 1.6.3 section 1.7

How Build AI-Enhanced Web Apps covers it

How deep it goes
Explains pattern-based generation, LLM prediction, application components, and validation concerns without working through model-training internals.
Examples
Uses marketing image and copy generation, customer-support responses, and a mock interview application as product examples.
What it assumes
Assumes basic JavaScript and familiarity with simple React applications while introducing the remaining AI concepts as needed.
What you can do after
Apply it via React, Next.js, and the Vercel AI SDK to add model-backed features while checking generated outputs.
How it connects
Connects large language models, transformers, user interfaces, backend infrastructure, API integration, and output validation.

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 Build AI-Enhanced Web Apps. The section links point to the parts of the book it draws on.