Topic 2: How Generative AI works

How Generative AI works

Generative AI works through an interaction between you, the information you provide, and the AI model. You give the model a task and relevant context; the model processes that input and generates a response, and you decide whether the result is useful.

The important point is that GenAI does not simply “know the answer.” It generates output based on your instructions, the context available to it, and the model’s capabilities and limitations.

The 5 connected elements

  1. Instruction: Tell the model what you want it to do. Clear instructions give the model a clearer direction.
  2. Context: Provide the background information the model needs, such as documents, data, examples, audience, constraints or desired format.
  3. Model: The AI model processes your instruction and context within its capabilities and limits.
  4. Generation: The model generates an output based on the information and direction available to it.
  5. Validation: Review the output before using it. You may use it, edit it, reject it or ask for more.

Context has limits

AI models have a context window, the amount of information they can consider within an interaction. Providing more information isn’t always better.

Focus on giving the model the most relevant information for the task. Long documents may not always fit completely, and not every piece of information will receive equal attention.

Connecting GenAI to real information with RAG

Retrieval-Augmented Generation (RAG) lets a GenAI system retrieve relevant information from trusted external sources before generating a response.

Instead of relying only on what the model already knows, the system can retrieve information relevant to your question and use it as additional context. This can help produce a more grounded and relevant response.

Keep the human in the loop

GenAI should support your thinking, not replace your judgement. A useful mental model is:

Prompt + Context + Model → Generated Output → Human Validation

Review important facts, assumptions and recommendations before acting on an AI-generated response. If the first result isn’t good enough, add context, clarify your instruction, or challenge the response, then iterate.

You provide the direction and context. The model generates. You validate and decide.

Shruti DSM