Generative AI questions
LLMs, transformers, prompting, RAG, fine-tuning and risks.
1. Generative AI refers to models that:
- Only sort numbers
- Create new content such as text, images or code
- Only store data
- Only classify data
Answer
B. Create new content such as text, images or code They generate new outputs resembling their training data.
2. LLM stands for:
- Logical Language Module
- Linear Learning Machine
- Long Lasting Memory
- Large Language Model
Answer
D. Large Language Model LLMs are trained on large amounts of text.
3. Most modern LLMs are based on which architecture?
- Recurrent network only
- k-Means
- Transformer
- Decision tree
Answer
C. Transformer The Transformer was introduced in 2017 ("Attention Is All You Need").
4. The key mechanism in a Transformer that relates every token to every other token is:
- Pooling
- Convolution
- Self-attention
- Backtracking
Answer
C. Self-attention Self-attention weighs how much each token should attend to others.
5. An LLM generates text by repeatedly:
- Sorting words alphabetically
- Predicting the next token
- Searching a database of answers
- Copying the most similar web page
Answer
B. Predicting the next token Generation is next-token prediction, one token at a time.
6. A "prompt" is:
- The model's training data
- The input text or instructions given to a generative model
- A type of GPU
- The model's output score
Answer
B. The input text or instructions given to a generative model Prompts guide the model's response.
7. Prompt engineering means:
- Designing inputs carefully to get better outputs from a model
- Building GPUs
- Writing database schemas
- Training a model from scratch
Answer
A. Designing inputs carefully to get better outputs from a model Clear instructions, context and examples improve results.
8. Giving a model a few worked examples inside the prompt is called:
- Few-shot prompting
- Zero-shot prompting
- Pre-training
- Fine-tuning
Answer
A. Few-shot prompting Examples in the prompt show the desired pattern.
9. Asking a model to do a task with no examples is:
- Reinforcement learning
- Zero-shot prompting
- Transfer learning
- Few-shot prompting
Answer
B. Zero-shot prompting Only the instruction is given.
10. "Hallucination" in an LLM means:
- Running out of memory
- Refusing every question
- Generating images instead of text
- Producing confident but false or made-up information
Answer
D. Producing confident but false or made-up information Outputs should be verified, especially facts.
11. RAG (Retrieval-Augmented Generation) improves answers by:
- Training a bigger model
- Retrieving relevant documents and giving them to the model as context
- Removing the prompt
- Increasing randomness
Answer
B. Retrieving relevant documents and giving them to the model as context Grounding answers in retrieved sources reduces hallucination.
12. Fine-tuning a model means:
- Compressing the output
- Further training a pre-trained model on task-specific data
- Writing a better prompt
- Changing the GPU
Answer
B. Further training a pre-trained model on task-specific data It adapts the model's weights to a task.
13. What is an embedding?
- A numeric vector that represents the meaning of text or other data
- A compressed zip file
- A type of prompt
- A database table
Answer
A. A numeric vector that represents the meaning of text or other data Similar meanings have nearby vectors.
14. Vector databases are mainly used to:
- Run SQL joins faster
- Store images only
- Host websites
- Store embeddings and find similar items quickly
Answer
D. Store embeddings and find similar items quickly They support similarity search, often for RAG.
15. The "temperature" setting in text generation controls:
- The GPU temperature
- The length of the prompt
- How random or creative the output is
- The training speed
Answer
C. How random or creative the output is Lower temperature gives more predictable output.
16. A "token" in an LLM is roughly:
- A full paragraph
- A GPU core
- A password
- A word or part of a word
Answer
D. A word or part of a word Text is split into tokens before processing.
17. The context window of an LLM is:
- The training dataset
- The number of users
- The maximum amount of text (tokens) it can consider at once
- The screen size
Answer
C. The maximum amount of text (tokens) it can consider at once Inputs longer than the window must be shortened.
18. Which model type is commonly used to generate images from text?
- Linear regression
- Diffusion models
- k-Nearest Neighbours
- Decision trees
Answer
B. Diffusion models Diffusion models turn noise into images step by step.
19. GAN stands for:
- Gradient Approximation Net
- Generative Adversarial Network
- Graph Analysis Node
- General Attention Network
Answer
B. Generative Adversarial Network A generator and a discriminator compete during training.
20. In a GAN, the discriminator's job is to:
- Label the training data
- Generate new images
- Compress the model
- Tell real data from generated data
Answer
D. Tell real data from generated data The generator tries to fool the discriminator.
21. RLHF stands for:
- Random Layer Hidden Function
- Rapid Learning High Frequency
- Recurrent Language Hybrid Format
- Reinforcement Learning from Human Feedback
Answer
D. Reinforcement Learning from Human Feedback Human preferences are used to make outputs more helpful and safe.
22. Pre-training an LLM usually involves:
- Training on a single document
- Labelling every sentence manually
- Writing prompts by hand
- Learning from a very large general text corpus
Answer
D. Learning from a very large general text corpus It learns language patterns before any fine-tuning.
23. A system prompt is used to:
- Set overall behaviour and rules for the model in a conversation
- Store user passwords
- Train the model
- Speed up the GPU
Answer
A. Set overall behaviour and rules for the model in a conversation It frames how the model should respond.
24. "Chain-of-thought" prompting encourages the model to:
- Answer in one word
- Ignore the question
- Repeat the prompt
- Reason step by step before answering
Answer
D. Reason step by step before answering Step-by-step reasoning often improves complex answers.
25. Prompt injection is:
- A GPU driver bug
- A type of embedding
- Hidden instructions in input that try to override a model's intended behaviour
- A faster way to train
Answer
C. Hidden instructions in input that try to override a model's intended behaviour Applications must treat untrusted content as data, not instructions.
26. Which is a responsible practice when using generative AI for coursework or work?
- Assuming outputs are always correct
- Sharing private data in prompts
- Submitting outputs without reading them
- Checking facts and following the rules on disclosure
Answer
D. Checking facts and following the rules on disclosure Verify outputs and respect privacy and policies.
27. Multimodal models can:
- Only run on phones
- Only translate languages
- Work with more than one type of data, such as text and images
- Only process numbers
Answer
C. Work with more than one type of data, such as text and images They accept or produce several modalities.
28. An AI "agent" typically:
- Is a human support worker
- Uses a model plus tools to take actions towards a goal
- Is a type of database
- Only answers yes or no
Answer
B. Uses a model plus tools to take actions towards a goal Agents call tools (search, code, APIs) in steps.
29. Quantisation of a model mainly:
- Reduces its size and speeds it up by using lower-precision numbers
- Adds more parameters
- Improves data quality
- Creates new training data
Answer
A. Reduces its size and speeds it up by using lower-precision numbers Fewer bits per weight means smaller, faster models.
30. Copyright and privacy concerns with generative AI arise mainly from:
- The data used for training and the content the model outputs
- The programming language used
- The speed of the internet
- The colour of the interface
Answer
A. The data used for training and the content the model outputs Both training data and outputs raise legal questions.
31. Which output is most likely to need human review before use?
- A greeting message
- A model's summary of legal or medical facts
- A list of rhyming words
- A suggested variable name
Answer
B. A model's summary of legal or medical facts High-stakes facts must be verified.
32. A "foundation model" is:
- A database schema
- A large model trained on broad data that can be adapted to many tasks
- A model with no parameters
- The first version of any app
Answer
B. A large model trained on broad data that can be adapted to many tasks Foundation models are adapted by prompting or fine-tuning.
33. Top-p (nucleus) sampling chooses the next token from:
- The smallest set of tokens whose total probability exceeds p
- All tokens equally
- Only the single most likely token
- Tokens in alphabetical order
Answer
A. The smallest set of tokens whose total probability exceeds p It limits choices to the most probable ones.
34. Positional encoding in Transformers provides:
- User identity
- Extra training data
- Image colours
- Information about the order of tokens
Answer
D. Information about the order of tokens Self-attention alone does not know token order.
35. Which is a common way to evaluate a chatbot's answers at scale?
- Counting the words in each answer
- Measuring GPU temperature
- Test sets with expected answers plus human or model-based grading
- Checking the font size
Answer
C. Test sets with expected answers plus human or model-based grading Evaluation compares outputs with references or rubrics.
36. In Generative AI, which description best fits “token”?
- maximum amount of context a model can process
- unit used to represent model input or output text
- adapt pretrained model weights on training data
- weight information from relevant positions
Answer
B. unit used to represent model input or output text token is used to unit used to represent model input or output text.
37. In Generative AI, which description best fits “embedding”?
- control randomness of sampled outputs
- weight information from relevant positions
- numeric vector representation of content
- plausible but unsupported model output
Answer
C. numeric vector representation of content embedding is used to numeric vector representation of content.
38. In Generative AI, which description best fits “transformer”?
- neural architecture using attention mechanisms
- numeric vector representation of content
- unit used to represent model input or output text
- instructions and context given to a model
Answer
A. neural architecture using attention mechanisms transformer is used to neural architecture using attention mechanisms.
39. In Generative AI, which description best fits “attention”?
- weight information from relevant positions
- numeric vector representation of content
- instructions and context given to a model
- control randomness of sampled outputs
Answer
A. weight information from relevant positions attention is used to weight information from relevant positions.
40. In Generative AI, which description best fits “prompt”?
- instructions and context given to a model
- plausible but unsupported model output
- maximum amount of context a model can process
- retrieve external information to augment generation
Answer
A. instructions and context given to a model prompt is used to instructions and context given to a model.
41. In Generative AI, which description best fits “temperature”?
- control randomness of sampled outputs
- unit used to represent model input or output text
- neural architecture using attention mechanisms
- instructions and context given to a model
Answer
A. control randomness of sampled outputs temperature is used to control randomness of sampled outputs.
42. In Generative AI, which description best fits “RAG”?
- adapt pretrained model weights on training data
- numeric vector representation of content
- retrieve external information to augment generation
- unit used to represent model input or output text
Answer
C. retrieve external information to augment generation RAG is used to retrieve external information to augment generation.
43. In Generative AI, which description best fits “fine-tuning”?
- weight information from relevant positions
- plausible but unsupported model output
- control randomness of sampled outputs
- adapt pretrained model weights on training data
Answer
D. adapt pretrained model weights on training data fine-tuning is used to adapt pretrained model weights on training data.
44. In Generative AI, which description best fits “hallucination”?
- retrieve external information to augment generation
- control randomness of sampled outputs
- numeric vector representation of content
- plausible but unsupported model output
Answer
D. plausible but unsupported model output hallucination is used to plausible but unsupported model output.
45. In Generative AI, which description best fits “context window”?
- control randomness of sampled outputs
- retrieve external information to augment generation
- weight information from relevant positions
- maximum amount of context a model can process
Answer
D. maximum amount of context a model can process context window is used to maximum amount of context a model can process.
46. Which Generative AI concept matches this description: “unit used to represent model input or output text”?
- temperature
- token
- hallucination
- transformer
Answer
B. token The definition describes token.
47. Which Generative AI concept matches this description: “numeric vector representation of content”?
- token
- embedding
- RAG
- transformer
Answer
B. embedding The definition describes embedding.
48. Which Generative AI concept matches this description: “neural architecture using attention mechanisms”?
- transformer
- temperature
- fine-tuning
- embedding
Answer
A. transformer The definition describes transformer.
49. Which Generative AI concept matches this description: “weight information from relevant positions”?
- RAG
- attention
- temperature
- context window
Answer
B. attention The definition describes attention.
50. Which Generative AI concept matches this description: “instructions and context given to a model”?
- fine-tuning
- embedding
- prompt
- attention
Answer
C. prompt The definition describes prompt.
51. Which Generative AI concept matches this description: “control randomness of sampled outputs”?
- transformer
- prompt
- attention
- temperature
Answer
D. temperature The definition describes temperature.
52. Which Generative AI concept matches this description: “retrieve external information to augment generation”?
- token
- embedding
- transformer
- RAG
Answer
D. RAG The definition describes RAG.
53. Which Generative AI concept matches this description: “adapt pretrained model weights on training data”?
- hallucination
- token
- fine-tuning
- RAG
Answer
C. fine-tuning The definition describes fine-tuning.
54. Which Generative AI concept matches this description: “plausible but unsupported model output”?
- transformer
- hallucination
- RAG
- embedding
Answer
B. hallucination The definition describes hallucination.
55. Which Generative AI concept matches this description: “maximum amount of context a model can process”?
- context window
- embedding
- prompt
- token
Answer
A. context window The definition describes context window.
Mock test
- Generative AI Mock Test 15 questions · 15 min