What is Generative AI

Gen AI · Foundations of Generative AI

Theory

Generative AI is a family of models that create new content (text, images, audio or code) instead of only labelling existing data. A traditional, discriminative model answers "is this email spam?"; a generative model answers "write a polite reply to this email." It learns the patterns in very large amounts of training data and then produces new output that plausibly follows those patterns, one small piece at a time.

For a data learner, the practical shift is that you can ask in plain language for a SQL draft, a summary of 500 customer reviews or a product description. The output is a likely answer, not a looked-up fact, so it still needs checking before you rely on it.

Why we use it

It automates work that used to need a human writer or analyst: drafting, summarising, translating, explaining and generating code. Tasks with no single correct label, like "summarise these complaints", become something software can do.

When to use it

Use it for open-ended writing, summarisation, pulling fields out of messy text, and assistants. When you need an exact figure from your warehouse or a yes/no prediction on structured data, plain SQL or a classic ML model is usually cheaper and more reliable.

How it works

  1. You give an instruction (a prompt)
  2. Model reads the prompt as tokens
  3. Model predicts a likely next piece of output
  4. Is the response complete? Yes: Stop and return the output. No: Append the piece and predict the next one.
  5. You review and use the generated content

Example

Prompt: "Write a 2-line product tagline for a reusable coffee cup."

Output:
"Your coffee. Your planet. One cup at a time."
(A discriminative model, given the same cup, could only tell you its brand or color — it can’t write new copy about it.)

Key points

Gen AI topics

Foundations of Generative AI

Prompt Engineering

Retrieval & Embeddings

Customizing Model Behavior

AI Agents & Tool Use

Multimodal & Applied AI

Ethics, Cost & Careers

T
Tech Town
Log InSign Up Free
Home SQL Python DSA Power BI Snowflake Databricks Spark Gen AI Practice Problems Contest Blog

Generative AI for the Data Stack

LLMs, prompt engineering, RAG, embeddings, agents and the tools shaping modern AI products — explained practically. Click any topic in the sidebar to open it right here.

{{ sectionCount }}
Sections
{{ topicCount }}
Topics
Free
Forever
Section {{ sec.num }}

{{ sec.label }}

Gen AI  /  {{ current.sectionLabel }}  /  {{ current.name }}

{{ current.name }}

💡

{{ current.tldr }}

Explained

{{ para }}

Why we use it

{{ rich.why }}

When to use it

{{ rich.when }}

Diagram

{{ rich.dg.caption }}

{{ tb.title }}
{{ c.v }}
{{ rich.dg.op }}
➜
{{ rich.dg.output.title }}
{{ c.v }}
{{ nd.label }}
{{ nd.sub }}
{{ nd.label }}
{{ nd.sub }}
{{ rich.dg.left.title }}
{{ it }}
{{ rich.dg.right.title }}
{{ it }}
Flowchart — how it works
{{ nd.text }}
{{ nd.text }}
◇ {{ nd.text }}
Yes → {{ nd.yes }}
No → {{ nd.no }}
See It In Action
{{ current.example }}
Key Takeaways — click to check off
{{ pt.mark }} {{ pt.text }}

Share this topic