Courseiva
easyMultiple Choice

Generative AI Leader Practice Question: Best describes how large language models (LLMs)…

Which of the following best describes how large language models (LLMs) generate text?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

They predict the next token in a sequence based on the preceding tokens

LLMs are trained to predict the next token given the preceding tokens. During inference, they generate one token at a time autoregressively.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    They retrieve the most similar text from a database and return it

    Why it's wrong here

    Retrieval returns stored passages verbatim; LLMs synthesise new token sequences from parameters. It is tempting because retrieval-augmented generation does fetch documents, and nearest-neighbour retrieval would be the correct mechanism for a semantic search or knowledge-base lookup system rather than text generation.

  • ✗

    They use a rule-based grammar engine to construct sentences

    Why it's wrong here

    Rule-based grammar engines apply hand-written syntactic rules, whereas LLMs predict the next token from learned statistical patterns. It is tempting because early conversational systems did use hand-crafted rules, and a grammar engine would be the correct approach for deterministic, tightly constrained output such as form validation.

  • ✓

    They predict the next token in a sequence based on the preceding tokens

    Why this is correct

    LLMs are autoregressive: at each step they compute a probability distribution over the vocabulary and select the next token conditioned on all preceding tokens. Text emerges iteratively from this next-token prediction process rather than from retrieval or rule-based templates.

  • ✗

    They randomly select words from a fixed vocabulary

    Why it's wrong here

    Selection is conditioned on the preceding context and learned probability distribution, not uniform random choice from a vocabulary. It is tempting because sampling does introduce randomness, and random selection would be correct for generating test data or fuzzing inputs where coherence is irrelevant.

About these practice questions

Courseiva writes every Generative AI Leader question from scratch — 1,008 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This Generative AI Leader practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the Generative AI Leader exam.