wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

RAG and Transformer Models Practice Questions

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

What is the primary goal of Retrieval-Augmented Generation (RAG)?

a)

Reduce training data labeling costs

b)

Improve answer accuracy using external context

c)

Make models smaller through pruning

d)

Increase token throughput during inference

2.

Which component retrieves semantically relevant chunks in a RAG pipeline?

a)

Generator module

b)

Retriever module

c)

Ranker module

d)

Tokenizer module

3.

What is typically stored in a RAG knowledge base for retrieval?

a)

Raw audio waveforms only

b)

Vector embeddings of documents

c)

Model logits from training

d)

Discrete token IDs only

4.

In RAG, what is injected into prompts to provide added context before generation?

a)

Random noise vectors

b)

Retrieved passages or snippets

c)

Optimizer hyperparameters

d)

Loss function definitions

5.

RAG combines which two main processes to answer queries?

a)

Reinforcement and distillation

b)

Retrieval and generation

c)

Classification and clustering

d)

Segmentation and detection

6.

Embeddings convert textual data into what form for similarity search?

a)

One-hot vectors

b)

Dense numerical vectors

c)

Sparse bag-of-words

d)

Character bigrams

7.

Top-k retrieval in similarity search means what?

a)

Return chunks above a threshold score

b)

Return the k highest-scoring items

c)

Return items within k token distance

d)

Return k random items for diversity

8.

Why can RAG reduce the need to frequently retrain large models?

a)

It freezes all parameters permanently

b)

It updates information through the knowledge base

c)

It compresses the model architecture

d)

It ignores user queries requiring updates

9.

What is the main role of the Generator in a RAG pipeline?

a)

Store embeddings efficiently

b)

Produce answers conditioned on retrieved context

c)

Rank documents before indexing

d)

Monitor latency of the retriever

10.

Which property of text do embeddings aim to preserve for retrieval?

a)

Syntactic tree structure

b)

Semantic similarity relationships

c)

Rendering font appearance

d)

Exact token positions

11.

What commonly leads to hallucination in language models?

a)

Overfitting to exact tokens

b)

Generating without sufficient factual context

c)

Too many attention heads used

d)

Excessive positional encoding

12.

In transformer models, what mechanism captures long-range dependencies?

a)

Max pooling layers

b)

Recurrent gating units

c)

Self-attention mechanisms

d)

Gradient clipping steps

13.

Why are positional encodings necessary in transformer architectures?

a)

They track token order information

b)

They reduce model parameter count

c)

They compress vocabulary size

d)

They simplify gradient updates

14.

What is the primary function of the Encoder in a standard transformer?

a)

Generate final output tokens sequentially

b)

Produce contextualized representations of inputs

c)

Optimize loss during backpropagation

d)

Store parameters for attention layers

15.

Which attention type prevents a decoder from looking at future tokens during training?

a)

Bidirectional attention

b)

Causal (masked) attention

c)

Global additive attention

d)

Sparse block attention

16.

Why is multi-head attention beneficial in transformers?

a)

It reduces inference precision needs

b)

It allows learning diverse relational patterns

c)

It avoids using positional encodings

d)

It eliminates the need for feed-forward layers

17.

During generation, what does the Decoder primarily do in transformers?

a)

Index documents for retrieval

b)

Predict the next token conditioned on context

c)

Compute gradient norms for stability

d)

Select hyperparameters for training

18.

In generative AI workflows, what is the purpose of inference?

a)

Train model parameters on data

b)

Serve and run models to produce outputs

c)

Annotate datasets for future tasks

d)

Compress models into smaller files

19.

How does fine-tuning adapt a foundation model for domain tasks?

a)

By changing tokenizer vocabulary only

b)

By updating model weights on task data

c)

By freezing all layers permanently

d)

By replacing attention with convolutions

20.

Which benefit does RAG typically provide over pure parametric generation?

a)

Lower latency for every scenario

b)

Better factual grounding from retrieved sources

c)

Guaranteed grammatical perfection

d)

Zero-shot elimination of bias entirely