Skip to main content

Generative AI

Updated 2 min read

Share this page

Send the link, quote the definition with a link back, or show it as a card on your own site.

https://softwaredictionary.org/terms/generative-ai

In short

Generative AI is artificial intelligence that creates new content, such as text, images, code, or audio, based on patterns learned from existing data.

What is generative AI?

Generative AI refers to models that produce new content instead of only classifying or scoring existing data. Given a prompt, such as a question or a description, a generative model can write an answer, draft code, create an image, compose music, or synthesize a voice. The best-known examples are large language models for text and code, along with image and video generators.

These models are trained on huge datasets to learn the statistical patterns of their domain. A large language model generates text one token at a time, each time choosing a likely next token based on everything before it, while most image generators use diffusion models that start from random noise and gradually refine it into a picture that matches the prompt. Settings like temperature control how predictable or varied the output is.

A helpful analogy is an extremely well-read improviser: it has absorbed countless examples and can produce something new in a similar style on request, but it doesn't look facts up unless it is connected to a source. That is why generative AI can hallucinate, confidently producing plausible but false statements, and why techniques like retrieval-augmented generation (RAG) and human review matter in real products such as coding assistants, chatbots, and document drafting tools.

Generative AI is often confused with AI in general. Traditional, or discriminative, machine learning models classify or score existing inputs, such as flagging a transaction as fraud, while generative models create new outputs. Generative AI is also not the same as an AI agent: an agent uses a generative model to plan and take actions with tools, while the model on its own only produces content.

Key takeaways

  • Generative AI creates new text, images, code, audio, or video from a prompt.
  • LLMs generate text token by token; many image models use diffusion.
  • Outputs are based on learned patterns, not verified facts, so hallucinations happen.
  • Grounding answers with RAG and adding human review improve reliability.
  • Discriminative models classify existing data; generative models produce new data.

Example

Requesting generated text from an APIjavascript
// Send a prompt to a text-generation API (endpoint and fields are illustrative)
const response = await fetch("https://api.example.com/v1/generate", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: `Bearer ${process.env.AI_API_KEY}`,
  },
  body: JSON.stringify({
    prompt: "Write a haiku about code reviews.",
    maxTokens: 60,
    temperature: 0.8, // higher values give more varied output
  }),
});
const { text } = await response.json();
console.log(text);

Readers ask

What is the difference between generative AI and traditional AI?

Traditional machine learning systems mostly analyze existing data, for example classifying an image or predicting a price. Generative AI creates new content, such as writing text or generating an image, though both are built on machine learning.

Are large language models generative AI?

Yes. Large language models are the most widely used kind of generative AI; they generate text and code by predicting one token after another. Generative AI also includes models that create images, audio, and video.

Can generative AI output be trusted?

Not blindly. Generative models can produce convincing but incorrect statements, outdated information, or insecure code, so important outputs should be checked against reliable sources, tested, or reviewed by a person.

See also

Spotted a mistake or something missing on this page?Suggest an edit

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings