liveBook · Manning

Generative modeling

As explained in Just Use Postgres!

Generative AI comprises artificial-intelligence models that produce new content such as text, images, audio, or code from learned patterns.

Generative artificial intelligence uses models trained on large datasets to produce new text, images, videos, audio, code, and other content from learned patterns. Large language models interpret natural-language prompts to answer questions, converse, and perform tasks. section 8.0 section 8.1.1

A generative AI application can:

  • Accept natural-language prompts to search movie descriptions through stored vector embeddings. section 8.1
  • Use an LLM as a conversational movie chatbot or an agent that manages watchlists. section 8.1
  • Combine Postgres, pgvector, similarity search, and retrieval-augmented generation for personalized recommendations. section 8.7

Movie recommendation prompt

A user asks, “What are the other two movies produced by the studio that made Shrek?” An LLM can interpret the request and respond with examples such as “Madagascar” and “Kung Fu Panda.” section 8.1.1

Figure 8.1 The LLM uses various tools to perform tasks following user prompts.
A diagram of a diagram

AI-generated content may be incorrect.

LLMs can call web tools, services, protocols, and APIs when completing prompts that require actions beyond their internal knowledge. section 8.1.1

How Just Use Postgres! covers it

How deep it goes
Explains models, prompts, embeddings, tools, and application patterns without descending into model internals.
Examples
Uses movie recommendations, a Shrek filmography question, conversational chatbots, embeddings, and watchlist management.
What you can do after
Build it from scratch by combining LLMs, embeddings, Postgres, pgvector, similarity search, and RAG.
How it connects
Connects LLMs with Postgres, pgvector, vector embeddings, similarity search, retrieval-augmented generation, and AI agents.

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 Just Use Postgres!. The section links point to the parts of the book it draws on.