Generative AI is artificial intelligence that creates new content, such as text, code, images, audio and video, rather than only classifying or predicting. Text generators are large language models (LLMs) that write one token at a time by predicting what comes next; image generators are mostly diffusion models that turn random noise into a picture step by step. Both learn from enormous datasets, and both need careful engineering, grounding and evaluation to be reliable in real products.

How is generative AI different from other AI?

Most machine learning before 2020 was discriminative: given an input, predict a label or a number. Is this email spam? What will this flat rent for? Generative models learn the structure of the data itself well enough to produce new examples: a new paragraph in the style of the prompt, a new image matching a description, new code that satisfies a request. The two are complementary. A support system might use a discriminative classifier to route a ticket and a generative model to draft the reply.

How do large language models generate text?

An LLM is a transformer neural network trained to predict the next token (a word or part of a word) in vast amounts of text. Generation is a loop:

  1. The prompt is split into tokens and turned into vectors (embeddings).
  2. Layers of self-attention let every token draw context from the others.
  3. The final layer outputs a probability for every token in the vocabulary.
  4. One token is chosen (the most likely, or a random pick weighted by probability), appended, and the loop repeats.

After this pretraining, models are fine-tuned on instruction-following examples and aligned with human preferences so they behave as helpful assistants rather than autocomplete engines. Our explainer on how LLMs work covers the training stages.

How do image generators work?

Most modern image generators are diffusion models. During training, images are gradually corrupted with noise and a network learns to reverse each small step. To generate, the model starts from pure noise and repeatedly removes noise, guided by a text description encoded by a language model, until a coherent image emerges. Earlier approaches included GANs, in which two networks compete; GANs are still used for some tasks, but diffusion now dominates text-to-image generation.

What kinds of generative models exist?

Model familyGeneratesCore idea
Large language modelsText, code, structured dataNext-token prediction with transformers
Diffusion modelsImages, video, audioLearn to reverse a noising process
GANsImages, super-resolutionGenerator vs discriminator game
Variational autoencodersImages, latent representationsCompress to a latent space and decode
Multimodal modelsText from images, images from textShared embeddings across modalities

What is generative AI actually used for?

  • Customer support: drafting replies, summarising tickets, answering FAQs from company documents.
  • Software development: code completion, test generation, explaining unfamiliar code.
  • Content and marketing: first drafts, translations into Indian languages, product descriptions.
  • Knowledge work: summarising long reports, extracting fields from invoices and contracts.
  • Education: explanations at different levels, practice questions, feedback on writing.
  • Design: concept images, variations and mock-ups.

In almost every successful deployment, generative AI produces a draft or suggestion that a person or a validation step checks, rather than acting completely unsupervised.

What are the limits of generative AI?

LimitWhy it happensWhat builders do
HallucinationThe model generates plausible text, not verified factsRetrieval with citations, validation, human review
Stale knowledgeTraining data stops at a cut-off dateRetrieval from up-to-date sources
InconsistencySampling adds randomnessLower temperature, structured outputs, tests
Cost and latencyLarge models need heavy computeSmaller models, caching, batching
Security risksInstructions hidden in inputs can hijack the modelPermission limits, input/output checks
BiasTraining data reflects human biasesEvaluation across groups, guardrails

See why AI hallucinates and prompt injection explained for two of these in depth.

How do you customise a generative model?

There are four main levers, from cheapest to most involved:

Relative effort to customise an LLM (1 = least)
Prompting1
Retrieval (RAG)2
Fine-tuning (e.g. LoRA)3
Pretraining your own model4

An ordinal ranking for orientation, not a measurement; actual effort depends on the project.

  • Prompting: clear instructions, examples and output formats. Always the first step.
  • Retrieval-augmented generation: fetch relevant documents and include them in the prompt, so answers are grounded in your data.
  • Fine-tuning: train the model further on examples of the behaviour you want, often with LoRA.
  • Pretraining: training a model from scratch, which few organisations need, but which teaches you how all of this works.

Is generative AI changing jobs in India?

It is changing tasks more than eliminating whole roles, at least so far: drafting, summarising and first-pass coding are faster, while checking, integrating and deciding remain human work. The roles growing around it are the people who can build reliable systems with these models: AI and LLM engineers, full-stack developers who integrate AI features, and data and MLOps engineers who keep them running. The government's IndiaAI Mission, with its focus on compute, datasets and Indian-language models, also signals sustained public investment in the field.

How should you evaluate a generative AI system?

Unlike classification, there's rarely a single right answer, so evaluation needs more thought:

  • Build a test set of realistic inputs with the qualities a good answer must have.
  • Check facts against sources automatically where possible (does the cited passage support the claim?).
  • Use rubric-based grading, by people or by a separate model, for tone, completeness and format.
  • Track regressions: rerun the test set after every prompt or model change.
  • Monitor in production: user feedback, escalation rates and cost per conversation.

What are tokens, context windows and parameters?

Three terms come up constantly. A token is the unit an LLM reads and writes: often a word, part of a word or a punctuation mark. Indian-language text often splits into more tokens than English for the same meaning, which affects cost and speed. The context window is how many tokens the model can consider at once, including your prompt, any documents you supply and its own reply. Parameters are the learned weights inside the network; more parameters usually mean more capability but also more memory and cost to run. When people compare models, they are usually comparing these three things plus quality on benchmarks and real tasks.

Should a business use an API or an open model?

Hosted APIs are the fastest way to start: no infrastructure, strong quality, pay per use. Open-weight models that you run yourself offer more control over data, cost at high volume and the ability to fine-tune deeply, at the cost of running GPUs and handling updates. Many teams prototype with an API, then move high-volume or sensitive workloads to a smaller open model fine-tuned for their task. Knowing both paths, including how to fine-tune and serve a model, is one of the most valuable skills an AI engineer can have.

What does it take to build generative AI products?

Calling an API is the easy part. Production systems need software engineering (APIs, databases, authentication), retrieval and data pipelines, evaluation, security and deployment, plus enough understanding of how the models work to debug them. That's why serious learning paths start with programming and machine learning before LLMs.

Program Zero's generative AI and LLM course goes from attention and transformers to building a GPT-style model from scratch, fine-tuning with LoRA, RAG and agents, after earlier phases in Python, data, ML and deep learning. See the full curriculum for the order.