Skip to lesson content

BUILD / UNDERSTAND / VERIFY · LESSON 02 OF 20

Generative AI fundamentals: what the model can and cannot know

Ask an assistant to rewrite a delivery notice and it may do a fine job. Ask when your parcel will arrive and the same assistant may need a live tracking system. The interface looks identical, but the information problem has changed. Learning to spot that difference is the first useful GenAI skill.

3 min reading20–40 min suggested practiceBuilds on lesson 1

What you will learn

  • Explain generation, inference, training, and grounding.
  • Distinguish model knowledge from supplied evidence.
  • Recognize tasks that need deterministic software or live data.
Four mechanisms, one application
  1. 01GenerateRewrite and explain
  2. 02CalculateExact rules and arithmetic
  3. 03RetrieveFind approved evidence
  4. 04Act or look upUse an authorized tool

Put the terminology in context

Artificial intelligence is a broad field concerned with systems performing tasks associated with intelligence. Machine learning fits patterns from data rather than requiring a hand-written rule for every case. Deep learning uses multilayer neural networks. Generative AI produces content such as text, images, or audio from learned patterns and supplied inputs.

These terms are related, but the neat staircase often drawn in roadmaps hides exceptions. Transformers are an architecture, not a synonym for all generative AI. Large language models are one important family of generative systems. A conventional classifier and a text generator may both help the same product: one routes a support ticket while the other drafts a reply.

Follow a request through inference

For a text model, input is divided into tokens and represented numerically. The model processes the context and predicts a distribution over possible next tokens. A decoding procedure selects output tokens until generation stops. Training previously adjusted the model's parameters; a normal inference request does not retrain those parameters.

Supplying a policy in a prompt therefore changes the information available for this response. It does not permanently teach the base model your company policy. Conversation history, stored application memory, and training are three different mechanisms. Keeping them separate will save you confusion when you debug a follow-up question.

Fluent language is not evidence

Northstar's fictional return window is 30 days. If you ask a model without providing that policy, it may produce a plausible window from patterns learned elsewhere. Even a confident answer is not proof. Grounding means supplying relevant evidence and checking that the answer follows from it.

Hallucination is a useful shorthand for unsupported or fabricated content, but name the actual failure in your bug report: wrong number, invented source, unsupported eligibility claim, or false action confirmation. Those labels point to different fixes. A missing policy may need retrieval; an incorrect total may need a calculator; an invented confirmation needs execution-result validation.

Match the task to the right mechanism

Use generation for rewriting a supplied notice, explaining a policy, or drafting a response. Use ordinary code for exact totals, identifier validation, permissions, and state transitions. Use retrieval for approved documents. Use an authenticated tool for a current order status. Many useful systems combine all four.

Temperature affects sampling when the model supports that setting. It is not an accuracy knob: a low value does not turn a false premise into a true one. Context windows limit how much information a model can process in a request, but a larger window does not ensure it uses every detail correctly. Test the behavior you need instead of treating a parameter as a guarantee.

PUT IT TO WORK

Your practice task

Classify these requests: rewrite a delivery email; calculate tax from a supplied rate; explain a return policy; retrieve an order status; invent a product slogan. Assign generation, deterministic code, retrieval, or an authenticated tool to each. Then write one example where two mechanisms must work together.

Checkpoint: compare your reasoning

A return-policy explanation combines retrieval and generation. A tax calculation should use deterministic arithmetic, even if a model explains the result. An order-status answer requires identity checks and a lookup; a model's training data cannot establish a customer's current order state.

References and further reading

Use these primary references for deeper study and current API details. Examples in this lesson use fictional Northstar data.