SRAI Book 4 · Chapter 1 · PU-B04-C01

Generative AI and LLM Foundations

Understand how language models represent text, predict successive tokens and use attention, while applying evidence, evaluation and governance controls for responsible institutional use.

01 / LEARNING OUTCOMES

Understand how language models generate content and how evidence makes their use defensible.

  1. Distinguish generative modelling from discriminative prediction.
  2. Explain tokenization, context and autoregressive next-token probability.
  3. Compare greedy, temperature, top-k and top-p decoding policies.
  4. Interpret a transparent scaled dot-product attention calculation.
  5. Separate fluency, groundedness, correctness, safety and decision fitness.
  6. Construct a reproducible evidence chain for accountable institutional use.

02 / GENERATIVE-AI EVIDENCE CHAIN

Generate, ground, verify and authorize.

01

Generate

Produce a statistically plausible continuation from tokens, context and decoding settings.

02

Ground

Connect material claims to authorized, current and traceable evidence.

03

Verify

Test correctness, limitations, safety and fitness for the intended workflow.

04

Authorize

Retain accountable human approval, escalation paths and an auditable record.

03 / CONTROLLED LABORATORY

A miniature language pipeline makes the essential mechanisms visible.

The approved notebook constructs a tokenizer, estimates next-token probabilities, compares decoding policies and performs a transparent self-attention calculation.

Grounding exercises then show why linguistic fluency cannot establish factual authority, safety or institutional authorization.

VERIFIED NOTEBOOK SCOPE
Total cells41
Code / Markdown cells21 / 20
Reproducibility seed42
Evidence-chain stages6
Decision controls8
Validated environmentsVS Code / Colab
PLAUSIBILITY

A language model generates a probable continuation.

Token probability and fluent wording do not prove that a statement is correct, current, supported or suitable for a consequential decision.

AUTHORITY

Evidence must come from outside fluency.

Authorized sources, claim-level verification, safeguards and accountable human review determine what the generated output may responsibly support.

04 / SRAI DECISION STANDARD

Generated content earns trust through evidence and accountable use.

  • The intended and excluded uses are documented.
  • Model, prompt, context and decoding settings are recorded.
  • Material claims are grounded in authorized and current sources.
  • Fluency, groundedness, correctness, safety and decision fitness are evaluated separately.
  • Privacy, security, failure and escalation controls are operational.
  • An accountable human authorizes consequential use.

VIDEO LESSON

Watch the complete Lesson 1 presentation.

Open on YouTube ↗

CONTROLLED RESOURCES

Read, reproduce, practise and review.

View the complete GitHub production unit ↗