NEW
Font size
WorksheetsRAG and Transformer Models Practice Questions
Total questions: 20
Worksheet time: 10mins
What is the primary goal of Retrieval-Augmented Generation (RAG)?
Reduce training data labeling costs
Improve answer accuracy using external context
Make models smaller through pruning
Increase token throughput during inference
Which component retrieves semantically relevant chunks in a RAG pipeline?
Generator module
Retriever module
Ranker module
Tokenizer module
What is typically stored in a RAG knowledge base for retrieval?
Raw audio waveforms only
Vector embeddings of documents
Model logits from training
Discrete token IDs only
In RAG, what is injected into prompts to provide added context before generation?
Random noise vectors
Retrieved passages or snippets
Optimizer hyperparameters
Loss function definitions
RAG combines which two main processes to answer queries?
Reinforcement and distillation
Retrieval and generation
Classification and clustering
Segmentation and detection
Embeddings convert textual data into what form for similarity search?
One-hot vectors
Dense numerical vectors
Sparse bag-of-words
Character bigrams
Top-k retrieval in similarity search means what?
Return chunks above a threshold score
Return the k highest-scoring items
Return items within k token distance
Return k random items for diversity
Why can RAG reduce the need to frequently retrain large models?
It freezes all parameters permanently
It updates information through the knowledge base
It compresses the model architecture
It ignores user queries requiring updates
What is the main role of the Generator in a RAG pipeline?
Store embeddings efficiently
Produce answers conditioned on retrieved context
Rank documents before indexing
Monitor latency of the retriever
Which property of text do embeddings aim to preserve for retrieval?
Syntactic tree structure
Semantic similarity relationships
Rendering font appearance
Exact token positions
What commonly leads to hallucination in language models?
Overfitting to exact tokens
Generating without sufficient factual context
Too many attention heads used
Excessive positional encoding
In transformer models, what mechanism captures long-range dependencies?
Max pooling layers
Recurrent gating units
Self-attention mechanisms
Gradient clipping steps
Why are positional encodings necessary in transformer architectures?
They track token order information
They reduce model parameter count
They compress vocabulary size
They simplify gradient updates
What is the primary function of the Encoder in a standard transformer?
Generate final output tokens sequentially
Produce contextualized representations of inputs
Optimize loss during backpropagation
Store parameters for attention layers
Which attention type prevents a decoder from looking at future tokens during training?
Bidirectional attention
Causal (masked) attention
Global additive attention
Sparse block attention
Why is multi-head attention beneficial in transformers?
It reduces inference precision needs
It allows learning diverse relational patterns
It avoids using positional encodings
It eliminates the need for feed-forward layers
During generation, what does the Decoder primarily do in transformers?
Index documents for retrieval
Predict the next token conditioned on context
Compute gradient norms for stability
Select hyperparameters for training
In generative AI workflows, what is the purpose of inference?
Train model parameters on data
Serve and run models to produce outputs
Annotate datasets for future tasks
Compress models into smaller files
How does fine-tuning adapt a foundation model for domain tasks?
By changing tokenizer vocabulary only
By updating model weights on task data
By freezing all layers permanently
By replacing attention with convolutions
Which benefit does RAG typically provide over pure parametric generation?
Lower latency for every scenario
Better factual grounding from retrieved sources
Guaranteed grammatical perfection
Zero-shot elimination of bias entirely
