Courseiva

CCNA LLM Fundamentals Questions

75 of 109 questions · Page 1/2 · LLM Fundamentals · Answers revealed

1
Multi-Selectmedium

An enterprise is building a document Q&A application with OCI Generative AI. They want to minimize hallucinations. Which TWO techniques should they implement? (Choose two.)

Select 2 answers
A.Fine-tune the model on domain-specific data
B.Increase the model's context window to its maximum
C.Use Retrieval-Augmented Generation (RAG)
D.Use a higher temperature in sampling
E.Apply greedy decoding
AnswersA, C

Fine-tuning improves factual accuracy for the domain, reducing hallucinations.

Why this answer

RAG grounds answers in retrieved documents, and fine-tuning on domain-specific data reduces errors. Increasing context window alone does not reduce hallucinations; greedy decoding reduces creativity but not factual errors.

2
MCQhard

A data scientist is comparing BLEU, ROUGE, and BERTScore to evaluate a summarization model. The client cares most about whether the summary captures all key facts from the source document. Which metric is most aligned with this requirement?

A.Perplexity
B.BERTScore
C.BLEU
D.ROUGE
AnswerD

ROUGE recall (e.g., ROUGE-1, ROUGE-L) measures overlap with the reference, directly indicating how many key facts are captured.

Why this answer

ROUGE is recall-oriented, measuring how much of the reference content appears in the generated summary, which aligns with capturing key facts. BLEU is precision-oriented, and BERTScore measures semantic similarity but is not specifically recall-focused.

3
MCQeasy

Which of the following is a known limitation of large language models where the model generates plausible-sounding but factually incorrect information?

A.Bias
B.Context window limitation
C.Hallucination
D.Knowledge cutoff
AnswerC

Hallucination describes the generation of plausible but false information.

Why this answer

Hallucination is the term used when an LLM produces content that is not grounded in training data or provided context, appearing confident but being incorrect.

4
MCQmedium

A company wants to build a customer service chatbot that answers questions about their internal policy documents. The documents are updated monthly, and the team cannot afford to retrain a model each time. Which approach is MOST appropriate?

A.Train a custom model from scratch on the policy documents each month
B.Use a larger foundation model with a longer context window and paste all documents into each prompt
C.Fine-tune a base LLM on the policy documents monthly
D.Use Retrieval-Augmented Generation (RAG) with the policy documents indexed in a vector store
AnswerD

RAG retrieves relevant document chunks at query time, ensuring the chatbot always answers from the latest uploaded documents without any model retraining.

Why this answer

RAG (Retrieval-Augmented Generation) allows the LLM to retrieve relevant document sections at inference time, so knowledge stays current without retraining. The other options either require expensive retraining for each update or lack document grounding.

5
MCQhard

When evaluating a summarization model, the team notices that the ROUGE-L score is high but human evaluators rate the summaries poorly for coherence. What does this discrepancy MOST likely indicate?

A.The model is suffering from hallucination
B.The reference summaries are too short
C.ROUGE-L is not sensitive to coherence and fluency, only to n-gram overlap
D.The human evaluators are biased
AnswerC

ROUGE-L measures longest common subsequence; it does not evaluate readability or logical flow.

Why this answer

ROUGE-L measures longest common subsequence overlap, focusing on word order recall. It does not capture coherence, factual consistency, or fluency. High ROUGE-L with low human scores suggests the summaries are lexically similar but not well-formed.

6
MCQmedium

A developer is using the OCI Generative AI service and notices that the cost per API call is higher than expected. Which factor contributes MOST to the cost of an LLM inference call?

A.Number of input and output tokens
B.Model size (number of parameters)
C.Context window size
D.Temperature setting
AnswerA

Pricing is usually based on token usage; more tokens mean higher cost.

Why this answer

Most LLM APIs charge based on the number of input and output tokens. The token count directly affects cost. Model size, context window, and temperature are related but the direct billing metric is token count.

7
MCQmedium

A developer is implementing a text generation pipeline using OCI Generative AI and needs to produce diverse, creative outputs for a marketing campaign. Which sampling strategy should they choose?

A.Beam search
B.Temperature sampling with temperature=0.0
C.Top-p sampling with p=0.9
D.Greedy decoding
AnswerC

Top-p sampling introduces controlled randomness, making outputs more diverse and creative while maintaining coherence.

Why this answer

Top-p (nucleus) sampling selects from a dynamically chosen set of tokens whose cumulative probability exceeds p, allowing diversity while avoiding the long tail of improbable tokens.

8
MCQmedium

An OCI user wants to generate embeddings for a large corpus of technical documents to enable semantic search. Which type of model should they use?

A.A summarization model
B.A classification model
C.A generation model like Cohere Command
D.An embedding model like Cohere Embed
AnswerD

Cohere Embed is designed to create dense vector embeddings that represent the semantic meaning of text, ideal for semantic search.

Why this answer

Embedding models are specifically designed to produce dense vector representations that capture semantic meaning. They are distinct from generation models. For semantic search, embeddings from an embedding model are compared using cosine similarity.

9
MCQhard

A team is deploying a chatbot that must never output harmful or biased statements. They plan to use a pre-trained LLM with in-context learning. Which additional measure is MOST effective at reducing harmful outputs without retraining?

A.Apply a larger context window to include more safety instructions
B.Fine-tune the model on a curated dataset of safe dialogues
C.Use beam search with a high beam width
D.Include few-shot examples in the system prompt that demonstrate appropriate responses
AnswerD

In-context learning with few-shot examples can bias the model toward desired behavior without any model update.

Why this answer

Providing few-shot examples of desired behavior in the system prompt (in-context learning) can guide the model toward safe responses. Fine-tuning would require retraining, and prompt engineering is broader; few-shot examples are a specific, effective technique.

10
Multi-Selecthard

An OCI customer is deploying a chatbot using a pre-trained LLM. They are concerned about the model generating biased or harmful content. Which TWO strategies should they implement as part of their responsible AI approach? (Choose two.)

Select 2 answers
A.Train the model from scratch on a curated dataset
B.Increase the context window to include more examples
C.Set up a human-in-the-loop review for sensitive queries
D.Use top-k sampling with k=1
E.Implement a content filtering layer to detect and block harmful outputs
AnswersC, E

Human review ensures oversight for high-risk interactions.

Why this answer

Content filtering and human review are direct mitigations. Training from scratch is impractical; modifying sampling does not address bias; increasing context window is irrelevant.

11
MCQeasy

Which of the following is a key limitation of large language models that RAG (Retrieval-Augmented Generation) aims to address?

A.Hallucinations (factual errors)
B.Context length constraints
C.Bias in training data
D.Knowledge cutoff date
AnswerA

RAG retrieves factual documents from a knowledge base and provides them as context, significantly reducing the likelihood of the model generating incorrect facts.

Why this answer

RAG addresses hallucinations by grounding the model's output in retrieved documents that contain factual information. Knowledge cutoff, bias, and context length constraints are separate issues that RAG may partially help with, but its primary purpose is to reduce factual errors.

12
MCQhard

An OCI Generative AI practitioner observes that a Cohere Command model generates responses with outdated information about a recent event. The model was fine-tuned six months ago. Which technique should be applied to incorporate new knowledge without retraining the model?

A.Use a longer context window and include all new articles in the prompt
B.Fine-tune the model again with the new data
C.Implement a RAG pipeline that indexes the latest documents into a vector store and retrieves relevant passages at query time
D.Increase the temperature parameter to encourage more creative outputs
AnswerC

RAG solves knowledge staleness without retraining.

Why this answer

RAG retrieves relevant, current documents at inference time, providing up-to-date context without modifying the model parameters.

13
MCQmedium

A company wants to build a customer service chatbot that answers questions about their internal policy documents. The documents are updated monthly, and the team cannot afford to retrain a model each time. Which approach is MOST appropriate?

A.Train a custom model from scratch on the policy documents each month
B.Use Retrieval-Augmented Generation (RAG) with the policy documents indexed in a vector store
C.Fine-tune a base LLM on the policy documents monthly
D.Use a larger foundation model with a longer context window and paste all documents into each prompt
AnswerB

RAG retrieves relevant document chunks at query time, ensuring the chatbot always answers from the latest uploaded documents without any model retraining.

Why this answer

RAG (Retrieval-Augmented Generation) allows the LLM to retrieve relevant document sections at inference time, so knowledge stays current without retraining. The other options either require expensive retraining for each update or lack document grounding.

14
MCQhard

A team is building a code generation assistant using OCI Generative AI. They notice that the model occasionally produces code with subtle security vulnerabilities. Which approach would most effectively reduce this risk without compromising the assistant's usefulness?

A.Use a larger context window to include all project files in every prompt
B.Switch to a model with more parameters
C.Use greedy decoding to reduce randomness in code generation
D.Fine-tune the model on a dataset of secure code examples and security best practices
AnswerD

Fine-tuning on secure examples helps the model learn to generate safer code by adjusting its weights.

Why this answer

Fine-tuning on a curated dataset of secure code examples can teach the model to avoid common vulnerability patterns while retaining its general coding ability. RAG with security docs could also help, but fine-tuning directly addresses the model's behavior more comprehensively.

15
MCQhard

A researcher is comparing BLEU and ROUGE scores for a machine translation model. They notice that the BLEU score is high but the ROUGE score is low. Which scenario is MOST consistent with this observation?

A.The model outputs very long and verbose translations
B.The model outputs concise translations that capture key words but miss some reference phrases
C.The model is overfitting to the training data
D.The reference translations are of poor quality
AnswerB

Concise translations achieve high precision (high BLEU) but low recall (low ROUGE) because they miss some n-grams from the reference.

Why this answer

High BLEU and low ROUGE indicate that the generated text has high precision (many n-grams match reference) but low recall (missing many reference n-grams). This often occurs when the output is short or overly cautious.

16
Multi-Selectmedium

Which THREE of the following are known limitations of LLMs that practitioners must account for?

Select 3 answers
A.Knowledge cutoff: the model only knows information up to its training data date
B.Bias: training data may contain societal biases that the model can amplify
C.Hallucination: generating plausible-sounding but factually incorrect information
D.Inability to produce creative text
E.Complete lack of understanding of language syntax
AnswersA, B, C

LLMs have no inherent knowledge of events after their training cutoff.

Why this answer

LLMs can produce hallucinations (factual errors), have a knowledge cutoff date, and can exhibit bias from training data. They do not inherently lack creativity, and context length is a limitation but not a 'lack of understanding'.

17
MCQmedium

Which of the following sampling strategies is most likely to produce the most diverse and creative text?

A.Beam search with width 5
B.Greedy decoding
C.Top-p sampling with p=0.1
D.Temperature sampling with temperature=1.2
AnswerD

High temperature flattens the distribution, increasing diversity.

Why this answer

Temperature sampling with a higher temperature (>1) increases the probability of less likely tokens, promoting creativity and diversity.

18
MCQmedium

When using an LLM for code generation, a developer notices the model occasionally produces syntactically incorrect code. Which approach is most likely to reduce syntax errors while still allowing diverse output?

A.Use top-k sampling with k=100
B.Increase the context window size
C.Set temperature to 0 and use greedy decoding
D.Increase the temperature to 1.5
AnswerC

Greedy decoding (temperature=0) is deterministic and lowers syntax errors.

Why this answer

Lowering temperature reduces randomness, making outputs more deterministic and less prone to errors, while still allowing some variation.

19
Multi-Selectmedium

A data scientist is evaluating an LLM for a summarization task. They have a set of human-written reference summaries. Which THREE metrics are commonly used to evaluate summarization quality? (Choose three.)

Select 3 answers
A.BLEU
B.Cosine similarity
C.Perplexity
D.BERTScore
E.ROUGE
AnswersA, D, E

BLEU is precision-oriented and often used alongside ROUGE.

Why this answer

ROUGE, BLEU, and BERTScore are all used for summarization evaluation. Perplexity measures model confidence, and cosine similarity is for embedding comparison.

20
Multi-Selectmedium

A developer is building a text generation application using OCI Generative AI and wants to control the creativity of the output. Which THREE sampling parameters can they adjust? (Choose three.)

Select 3 answers
A.Top-k
B.Top-p
C.Max tokens
D.Temperature
E.Beam search width
AnswersA, B, D

Top-k limits the sampling pool to the k most likely tokens, controlling diversity.

Why this answer

Temperature scales the logits before softmax. Top-k limits the sampling pool to the k most likely tokens. Top-p (nucleus) sampling selects from tokens whose cumulative probability exceeds p.

Beam search is a decoding strategy (not a sampling parameter), max tokens controls output length, and frequency penalty reduces repetition.

21
MCQmedium

A company wants to build a customer service chatbot that answers questions about their internal policy documents. The documents are updated monthly, and the team cannot afford to retrain a model each time. Which approach is MOST appropriate?

A.Train a custom model from scratch on the policy documents each month
B.Fine-tune a base LLM on the policy documents monthly
C.Use a larger foundation model with a longer context window and paste all documents into each prompt
D.Use Retrieval-Augmented Generation (RAG) with the policy documents indexed in a vector store
AnswerD

RAG retrieves relevant document chunks at query time, ensuring the chatbot always answers from the latest uploaded documents without any model retraining.

Why this answer

RAG (Retrieval-Augmented Generation) allows the LLM to retrieve relevant document sections at inference time, so knowledge stays current without retraining. The other options either require expensive retraining for each update or lack document grounding.

22
Multi-Selectmedium

A data scientist is evaluating an LLM's performance on a summarization task. Which TWO metrics are most suitable for this evaluation?

Select 2 answers
A.Perplexity
B.Human evaluation
C.BLEU
D.ROUGE
E.BERTScore
AnswersD, E

ROUGE is specifically designed for summarization evaluation, measuring n-gram overlap and recall.

Why this answer

ROUGE measures recall-oriented overlap between generated and reference summaries, suitable for summarization. BERTScore uses semantic similarity via embeddings. BLEU is for translation, perplexity for language modeling, and human evaluation is qualitative.

23
MCQmedium

A team is deploying an LLM-based application that must adhere to strict data residency requirements. All processing must occur within a specific OCI region. Which OCI service should they use to host and serve the LLM?

A.OCI Streaming
B.OCI Functions
C.OCI Object Storage
D.OCI Data Science with a model deployment endpoint
AnswerD

OCI Data Science provides model deployment capabilities within a chosen region, ensuring data stays in that region.

Why this answer

OCI Data Science with a model deployment endpoint is the correct choice because it provides a managed infrastructure for hosting and serving LLMs within a specific OCI region, ensuring all processing and data remain within that region to meet strict data residency requirements. The model deployment endpoint runs on dedicated compute resources in the chosen region, allowing low-latency inference while adhering to regional data boundaries.

Exam trap

The 1Z0-1127 exam often tests the distinction between storage, compute, and serving services, and the trap here is that candidates may confuse OCI Object Storage (which stores model artifacts) with the actual serving infrastructure needed to run inference, or assume OCI Functions can handle LLM workloads despite its stateless, memory-constrained design.

How to eliminate wrong answers

Option A is wrong because OCI Streaming is a real-time data ingestion and processing service for streaming data (e.g., logs, events), not designed to host or serve LLMs; it lacks the compute and inference capabilities required for model serving. Option B is wrong because OCI Functions is a serverless compute service for running stateless code snippets (functions) in response to events, but it is not optimized for hosting large language models due to cold start latency, limited memory, and lack of GPU support. Option C is wrong because OCI Object Storage is a scalable storage service for unstructured data (e.g., model artifacts, datasets), but it cannot serve inference requests or run compute workloads; it is used to store model files, not to host or serve the LLM.

24
Multi-Selecteasy

Which TWO of the following are true about positional encoding in transformer models?

Select 2 answers
A.It is learned independently for each position in the training data
B.It provides the model with information about the order of tokens in a sequence
C.It is added to the token embeddings before passing through the transformer layers
D.It replaces the need for self-attention
E.It is only used in encoder-only architectures like BERT
AnswersB, C

Since self-attention is permutation-invariant, positional encodings are necessary to capture sequence order.

Why this answer

Positional encoding provides information about token order and is added to the input embeddings. It is used in encoder-decoder and decoder-only models. It does not replace attention, and it is not learned for each token position in the original formulation (it uses fixed sine/cosine functions).

25
Multi-Selecthard

An OCI user wants to reduce the cost of running a generative AI model while maintaining output quality. Which THREE strategies can help achieve this?

Select 3 answers
A.Use greedy decoding instead of sampling
B.Use a smaller model from the same family
C.Increase max tokens to ensure complete answers
D.Implement caching for repeated queries
E.Optimize prompts to be more concise
AnswersB, D, E

Smaller models are cheaper to run.

Why this answer

Using a smaller model from the same family (e.g., switching from Llama 3 70B to Llama 3 8B) reduces the number of parameters and computational resources required per inference, directly lowering cost. Smaller models often retain strong performance on many tasks, especially when the task complexity does not demand the full capacity of the larger model, thus maintaining output quality while reducing token processing costs.

Exam trap

The 1Z0-1127 exam often tests the misconception that greedy decoding reduces cost (it does not—it only changes the decoding strategy, not the model size or token count) and that increasing max tokens improves quality (it actually increases cost and can degrade output by encouraging rambling).

26
MCQeasy

Which tokenization algorithm is commonly used by models like GPT and BERT, and works by merging frequently occurring character pairs iteratively?

A.Morpheme-based tokenization
B.Byte-Pair Encoding (BPE)
C.SentencePiece
D.WordPiece
AnswerB

BPE iteratively merges the most frequent character pairs to build a vocabulary of subword tokens.

Why this answer

Byte-Pair Encoding (BPE) starts with characters and merges the most frequent pairs to create subword units. WordPiece uses a similar likelihood-based approach. SentencePiece is a framework that can use BPE or unigram.

27
MCQhard

A data scientist is evaluating a summarization model on a news article dataset. They compute ROUGE-L and BLEU scores. The ROUGE-L score is high, but the BLEU score is low. Which of the following best explains this discrepancy?

A.The BLEU score is unreliable for summarization tasks
B.The model is overfitting to the training data
C.The summaries are very short and use different vocabulary from the reference
D.The summaries are too long and contain many irrelevant n-grams
AnswerC

Short summaries that capture key content (high ROUGE-L) but with different word choices (low n-gram overlap) cause low BLEU.

Why this answer

ROUGE-L measures the longest common subsequence, emphasizing recall of key content (n-grams in order). BLEU measures n-gram precision, penalizing short or non-fluent outputs. A high ROUGE-L but low BLEU suggests the summaries capture the main ideas but use different phrasing or are too short.

28
Multi-Selectmedium

An enterprise is deploying an LLM application on OCI and must minimize hallucinations. Which TWO strategies should they implement? (Choose two.)

Select 2 answers
A.Apply prompt engineering techniques such as asking the model to cite sources
B.Increase the temperature parameter to encourage more diverse outputs
C.Use a smaller model to reduce complexity
D.Fine-tune the model on a dataset of factual question-answer pairs
E.Implement Retrieval-Augmented Generation (RAG) with a curated knowledge base
AnswersA, E

Prompt engineering can guide the model to rely on provided context and cite sources, reducing hallucinations.

Why this answer

RAG grounds the model in retrieved documents, and prompt engineering (e.g., asking the model to cite sources) can reduce hallucinations. Fine-tuning on factual data helps but may not eliminate hallucinations entirely. Increasing temperature increases randomness, which can worsen hallucinations.

Using a smaller model typically reduces capability, making hallucinations more likely.

29
Multi-Selectmedium

A team wants to compare the semantic similarity between two sentences using embeddings. Which THREE steps are required?

Select 3 answers
A.Use a text generation model to compare the sentences
B.Normalize the resulting vectors to unit length
C.Compute the cosine similarity between the two vectors
D.Train a new neural network on the two sentences
E.Pass both sentences through an embedding model to obtain dense vector representations
AnswersB, C, E

Normalization ensures that cosine similarity is equivalent to the dot product of the normalized vectors.

Why this answer

Generate embeddings for both sentences, then compute cosine similarity. Normalizing vectors ensures cosine similarity equals the dot product. Training a new model is unnecessary, and using a generation model is not appropriate for embeddings.

30
MCQmedium

A company wants to build a customer service chatbot that answers questions about their internal policy documents. The documents are updated monthly, and the team cannot afford to retrain a model each time. Which approach is MOST appropriate?

A.Use Retrieval-Augmented Generation (RAG) with the policy documents indexed in a vector store
B.Fine-tune a base LLM on the policy documents monthly
C.Use a larger foundation model with a longer context window and paste all documents into each prompt
D.Train a custom model from scratch on the policy documents each month
AnswerA

RAG retrieves relevant document chunks at query time, ensuring the chatbot always answers from the latest uploaded documents without any model retraining.

Why this answer

RAG (Retrieval-Augmented Generation) allows the LLM to retrieve relevant document sections at inference time, so knowledge stays current without retraining. The other options either require expensive retraining for each update or lack document grounding.

31
MCQeasy

Which of the following is a recognized limitation of large language models?

A.They always require internet access
B.They cannot perform translation between languages
C.They can generate factually incorrect information (hallucinations)
D.They can only process numerical data
AnswerC

Hallucinations are a key limitation where models produce confident but false statements.

Why this answer

Large language models (LLMs) are known to generate factually incorrect information, often called 'hallucinations.' This occurs because LLMs are probabilistic models that predict the next token based on training data patterns, not verified facts. They lack a grounding mechanism to validate outputs against real-world truth, making hallucinations a fundamental limitation.

Exam trap

The 1Z0-1127 exam often tests the misconception that LLMs are infallible or always correct, leading candidates to overlook the well-documented hallucination problem in favor of incorrect assumptions about connectivity or data types.

How to eliminate wrong answers

Option A is wrong because many LLMs can run locally without internet access (e.g., offline inference with models like Llama 2 or GPT-4-all), though some cloud-based APIs require connectivity. Option B is wrong because LLMs excel at translation between languages, as demonstrated by models like GPT-4 and Google's PaLM 2 supporting dozens of language pairs. Option D is wrong because LLMs process text tokens (words, subwords) via transformer architectures, not numerical data alone; they handle natural language, code, and symbolic inputs.

32
MCQmedium

A data scientist is fine-tuning a Llama 2 model on a custom dataset for a summarization task. After fine-tuning, the model produces summaries that are too similar to the input text, often copying sentences verbatim. Which adjustment is MOST likely to reduce copying and improve abstractive summarization?

A.Increase the temperature to 0.8 and use top-p sampling
B.Switch to greedy decoding
C.Increase the beam search width
D.Reduce the context window size
AnswerA

Higher temperature flattens the probability distribution, making the model more likely to generate novel phrases rather than copying.

Why this answer

Increasing temperature (e.g., to 0.8) adds randomness to token selection, making the model less likely to choose the most probable tokens that lead to verbatim copying from the input. Top-p sampling further restricts the sampling pool to a cumulative probability mass, balancing diversity and coherence. In contrast, greedy decoding and beam search always select high-probability tokens, which encourages copying.

Reducing context window may lose important information, not fix copying. Thus, higher temperature with top-p sampling is the best adjustment to promote abstractive summarization.

33
Multi-Selecthard

A developer is debugging a RAG pipeline where the LLM frequently ignores retrieved documents and produces hallucinations. Which THREE factors could contribute to this problem?

Select 3 answers
A.The generation temperature is set to 0
B.The prompt does not explicitly instruct the model to base its answer on the provided context
C.The retrieval top-K parameter is set too low
D.The embedding model's output dimension is too large
E.The chunking strategy uses zero overlap between consecutive chunks
AnswersB, C, E

If the prompt does not instruct the model to use the retrieved documents, it may default to its internal knowledge.

Why this answer

Low chunk overlap can cause loss of context, improper prompt instructions may lead the model to ignore retrieved content, and a small top-K retrieval may miss relevant documents. A large embedding dimension improves retrieval precision, and a high temperature increases randomness but does not cause ignoring documents.

34
MCQmedium

A developer notices that a text generation model produces repetitive phrases when using greedy decoding. Which sampling strategy would best introduce controlled randomness to reduce repetition while maintaining coherence?

A.Use greedy decoding but with a repetition penalty
B.Apply temperature sampling with temperature > 1
C.Increase the beam width in beam search
D.Disable top-k sampling
AnswerB

Higher temperature flattens the probability distribution, making less likely tokens more probable, reducing repetition while maintaining coherence.

Why this answer

Temperature sampling scales the logits before applying softmax, controlling the randomness of token selection. A temperature > 1 increases diversity, reducing repetition, while still allowing the model to generate coherent text.

35
MCQmedium

A company needs to generate embeddings for a large corpus of legal documents to enable semantic search. Which type of model should they use?

A.An encoder-only embedding model like Cohere Embed
B.A decoder-only generation model like GPT
C.A text-to-speech model
D.A machine translation model
AnswerA

Embedding models are specifically trained to output high-quality embeddings for similarity.

Why this answer

An encoder-only embedding model like Cohere Embed is designed to convert text into dense vector representations (embeddings) that capture semantic meaning, which is exactly what is needed for semantic search over a large corpus of legal documents. These models use a bidirectional transformer architecture to encode context from both directions, producing fixed-size embeddings that can be efficiently compared using cosine similarity or other distance metrics.

Exam trap

The 1Z0-1127 exam often tests the misconception that any large language model (LLM) can generate embeddings, but the trap here is that decoder-only models (like GPT) are fundamentally designed for generation, not for producing fixed-size, bidirectional embeddings suitable for semantic search.

How to eliminate wrong answers

Option B is wrong because decoder-only generation models like GPT are optimized for autoregressive text generation, not for producing fixed-size embeddings; they lack the bidirectional context needed for high-quality semantic representations. Option C is wrong because text-to-speech models convert text into audio waveforms, which is irrelevant for generating text embeddings for semantic search. Option D is wrong because machine translation models are designed to map text from one language to another, not to produce general-purpose embeddings for similarity search.

36
Multi-Selectmedium

A data scientist is building a text summarization system using an LLM. They want to evaluate the model's output against human-written summaries. Which TWO metrics are most appropriate for this evaluation? (Choose two.)

Select 2 answers
A.Human evaluation rubrics
B.BLEU
C.ROUGE
D.Perplexity
E.BERTScore
AnswersC, E

ROUGE is recall-oriented and widely used for summarization evaluation.

Why this answer

ROUGE is recall-oriented and measures overlap of n-grams, making it a standard metric for summarization. BERTScore measures semantic similarity using embeddings, which can capture meaning even when wording differs. BLEU is more for translation, perplexity measures fluency, and human evaluation is qualitative but not a metric.

37
MCQmedium

An organization needs to deploy a model that can both understand and generate text, such as for a translation task where the input is in English and output is in French. Which model architecture is most suitable?

A.Encoder-decoder (e.g., T5)
B.Decoder-only (e.g., GPT)
C.Encoder-only (e.g., BERT)
D.Mixture of Experts (MoE)
AnswerA

T5 is an encoder-decoder model specifically designed for text-to-text tasks like translation, where the full input is encoded and the decoder generates the output.

Why this answer

Encoder-decoder architectures like T5 are designed for sequence-to-sequence tasks. The encoder processes the input sequence, and the decoder generates the output sequence, making it ideal for translation.

38
MCQmedium

Which of the following metrics is most suitable for evaluating a translation model's output against multiple reference translations?

A.ROUGE
B.Perplexity
C.BERTScore
D.BLEU
AnswerD

BLEU is the standard metric for machine translation.

Why this answer

BLEU (Bilingual Evaluation Understudy) is the most suitable metric for evaluating a translation model's output against multiple reference translations because it measures n-gram precision between the candidate translation and one or more reference translations. It directly quantifies how many words and phrases in the candidate match those in the references, making it the standard metric for machine translation tasks.

Exam trap

The trap here is that candidates often confuse ROUGE (recall-based) with BLEU (precision-based) or assume BERTScore's semantic matching is better for translation, but BLEU is explicitly the standard for multi-reference translation evaluation in the NLP community.

How to eliminate wrong answers

Option A is wrong because ROUGE (Recall-Oriented Understudy for Gisting Evaluation) focuses on recall of n-grams and is primarily designed for summarization evaluation, not translation. Option B is wrong because Perplexity measures how well a language model predicts a sequence of tokens, but it does not compare against reference translations and is not a direct evaluation metric for translation quality. Option C is wrong because BERTScore uses contextual embeddings from BERT to compute similarity between candidate and reference, but it is a semantic similarity metric and not specifically optimized for evaluating translation output against multiple references; BLEU remains the standard for this task.

39
Multi-Selectmedium

A data scientist is debugging a RAG system where the generated answers are not relevant to the retrieved documents. Which TWO factors are MOST likely causing this issue?

Select 2 answers
A.The retriever is returning irrelevant chunks due to poor embeddings or low similarity threshold
B.The generation model is not conditioned on the retrieved chunks, possibly because the prompt does not instruct it to use them
C.The context window of the generation model is smaller than the retrieved chunks
D.The temperature is set too low, making outputs deterministic
E.The chunking strategy produces chunks that are too small, losing context
AnswersA, B

Irrelevant chunks lead to irrelevant answers; this is a common cause.

Why this answer

If the retriever returns irrelevant chunks or the generation model ignores the context, the answers will be off-topic. Checking retrieval relevance and prompt instruction is key.

40
MCQmedium

Which evaluation metric is designed to measure the overlap of n-grams between a generated summary and a reference summary, focusing on recall of content words?

A.Perplexity
B.ROUGE
C.BERTScore
D.BLEU
AnswerB

ROUGE (Recall-Oriented Understudy for Gisting Evaluation) measures recall of n-grams between generated and reference summaries.

Why this answer

ROUGE-N measures n-gram recall (how many n-grams from the reference appear in the generated text). BLEU measures n-gram precision. BERTScore leverages contextual embeddings.

Perplexity measures likelihood under the model.

41
MCQmedium

A team wants to use an LLM to answer questions about a private codebase that is updated hourly. They cannot afford to fine-tune every hour. Which OCI feature or approach is most suitable?

A.Use a long-context model with full codebase in prompt
B.Implement Retrieval-Augmented Generation (RAG) with a vector database
C.Fine-tune a model on the codebase daily
D.Use a smaller model with faster inference
AnswerB

RAG provides up-to-date retrieval without retraining.

Why this answer

Retrieval-Augmented Generation (RAG) with a vector database is the most suitable approach because it allows the LLM to answer questions about a frequently updated private codebase without retraining. RAG retrieves relevant code snippets from a vector index at query time, ensuring the model always has access to the latest code without the cost and latency of hourly fine-tuning.

Exam trap

The trap here is that candidates often assume fine-tuning is the only way to incorporate private or dynamic data, overlooking RAG's ability to provide real-time, cost-effective access to frequently updated information without retraining.

How to eliminate wrong answers

Option A is wrong because a long-context model with the full codebase in the prompt is impractical: the codebase is updated hourly and likely exceeds the model's context window, leading to truncation, high token costs, and degraded performance. Option C is wrong because fine-tuning a model daily (or hourly) is too expensive and time-consuming for a rapidly changing codebase, and it does not support real-time updates without retraining. Option D is wrong because using a smaller model with faster inference does not solve the core problem of accessing up-to-date private code; it only addresses inference speed, not knowledge freshness or retrieval.

42
MCQmedium

A practitioner is using a Cohere Command model on OCI for a translation task. They notice that the output is often incomplete and cuts off mid-sentence. Which parameter should they adjust to address this?

A.Temperature
B.Max tokens
C.Frequency penalty
D.Top-p
AnswerB

Max tokens sets the maximum length of the generated output.

Why this answer

The 'Max tokens' parameter controls the maximum length of the generated output. When a model cuts off mid-sentence, it means the token limit has been reached before the model could complete its response. Increasing this value allows the model to generate more tokens, thus completing the translation.

Exam trap

The 1Z0-1127 exam often tests the misconception that temperature or top-p controls output length, when in fact they only affect token selection probability and diversity, not the maximum number of tokens generated.

How to eliminate wrong answers

Option A is wrong because Temperature controls the randomness of the output, not the length; lowering it makes the model more deterministic but does not prevent truncation. Option C is wrong because Frequency penalty reduces repetition by penalizing tokens that have already appeared, but it does not affect the total number of tokens generated. Option D is wrong because Top-p (nucleus sampling) controls the cumulative probability threshold for token selection, influencing diversity, not the output length.

43
Multi-Selectmedium

Which TWO components are essential in a Retrieval-Augmented Generation (RAG) pipeline?

Select 2 answers
A.Chunking the documents into smaller pieces
B.Embedding the chunks into a vector space
C.Fine-tuning the LLM on the documents
D.Knowledge distillation
E.Beam search decoding
AnswersA, B

Chunking is necessary for indexing.

Why this answer

Chunking splits documents, embedding converts chunks to vectors, retrieval fetches relevant chunks, and generation produces the answer.

44
MCQhard

A practitioner needs to choose a pre-trained model for a sentiment analysis task on customer reviews. The model must be efficient for inference and capable of handling multiple languages. Which architecture is MOST suitable?

A.Encoder-only BERT model
B.Encoder-decoder T5 model
C.Decoder-only GPT model
D.Mixture of Experts model
AnswerD

Mixture of Experts models achieve efficiency through sparse activation and can specialize experts per language, making them ideal for multilingual sentiment analysis with fast inference.

Why this answer

Mixture of Experts (MoE) models are designed for efficient inference by activating only a subset of parameters per input, reducing computational cost. They can also support multiple languages by allocating different experts to different language patterns, making them highly suitable for multilingual sentiment analysis. In contrast, encoder-only BERT models are efficient but may not scale as well for multilingual tasks without large capacity, encoder-decoder models are optimized for sequence-to-sequence tasks, and decoder-only models are primarily generative and less efficient for classification.

Exam trap

Candidates may default to BERT as the standard for classification, but MoE offers better efficiency and multilingual support in modern architectures.

45
MCQeasy

Which of the following is a distinguishing feature of in-context learning compared to fine-tuning?

A.In-context learning modifies the model's weights based on examples
B.In-context learning does not update the model's weights; instead, examples are provided in the prompt
C.In-context learning is only possible with encoder-only models
D.In-context learning requires additional training on a labeled dataset
AnswerB

In-context learning uses examples in the prompt at inference time without any weight updates.

Why this answer

In-context learning does not update model weights; it provides examples in the prompt at inference time. Fine-tuning updates the model weights through additional training on a dataset.

46
MCQeasy

What is the key advantage of multi-head attention over single-head attention in transformer models?

A.It eliminates the need for positional encoding
B.It reduces the total number of parameters
C.It allows the model to focus on different parts of the sequence simultaneously from different representation subspaces
D.It makes the model non-autoregressive
AnswerC

Each head learns different attention patterns, improving model capacity.

Why this answer

Multi-head attention allows the model to attend to information from different representation subspaces at different positions, capturing a richer understanding.

47
MCQeasy

What is the primary difference between pre-training and fine-tuning in the context of large language models?

A.Pre-training trains from scratch, fine-tuning updates all weights on a new dataset
B.Pre-training uses a smaller dataset, fine-tuning uses a larger dataset
C.Pre-training produces embeddings, fine-tuning produces text generation
D.Pre-training is unsupervised, fine-tuning is always supervised
AnswerA

Pre-training involves training from random initialization on a large corpus; fine-tuning starts from pre-trained weights and updates them on a smaller dataset.

Why this answer

Pre-training trains a model on a large, general corpus to learn language representations; fine-tuning adapts the pre-trained model to a specific task or domain using a smaller labeled dataset.

48
MCQmedium

A developer is using OCI Generative AI with a Cohere Command model for text generation. They want the output to be more creative and diverse, but still relevant. Which sampling strategy should they use?

A.Temperature sampling (temperature > 1)
B.Top-k sampling
C.Top-p (nucleus) sampling
D.Greedy decoding
AnswerC

Top-p sampling dynamically chooses the set of tokens with cumulative probability p, balancing creativity and relevance by adapting to the model's confidence.

Why this answer

Top-p (nucleus) sampling selects from the smallest set of tokens whose cumulative probability exceeds p. It adapts to the model's confidence, allowing diversity while maintaining relevance. Greedy decoding is deterministic, temperature scales all probabilities, top-k fixes the number of candidates, and beam search explores multiple sequences but tends to produce safe outputs.

49
MCQeasy

Which component of the Transformer architecture allows the model to focus on different parts of the input sequence when generating each output token?

A.Self-attention mechanism
B.Positional encoding
C.Feed-forward network
D.Layer normalization
AnswerA

Self-attention allows each token to attend to all other tokens.

Why this answer

Self-attention computes attention scores between all pairs of positions, enabling the model to weigh the importance of different input tokens.

50
MCQmedium

A company wants to build a customer service chatbot that answers questions about their internal policy documents. The documents are updated monthly, and the team cannot afford to retrain a model each time. Which approach is MOST appropriate?

A.Fine-tune a base LLM on the policy documents monthly
B.Use Retrieval-Augmented Generation (RAG) with the policy documents indexed in a vector store
C.Use a larger foundation model with a longer context window and paste all documents into each prompt
D.Train a custom model from scratch on the policy documents each month
AnswerB

RAG retrieves relevant document chunks at query time, ensuring the chatbot always answers from the latest uploaded documents without any model retraining.

Why this answer

RAG (Retrieval-Augmented Generation) allows the LLM to retrieve relevant document sections at inference time, so knowledge stays current without retraining. The other options either require expensive retraining for each update or lack document grounding.

51
Multi-Selecthard

An OCI practitioner is comparing BERTScore with traditional n-gram metrics (ROUGE, BLEU) for evaluating summarization. Which THREE statements about BERTScore are true?

Select 3 answers
A.BERTScore uses pre-trained contextual embeddings from BERT
B.BERTScore does not require a reference text
C.BERTScore computes similarity based on exact n-gram overlap
D.BERTScore typically has higher correlation with human judgment than ROUGE
E.BERTScore is more robust to paraphrasing than ROUGE or BLEU
AnswersA, D, E

It leverages BERT's embeddings to compute semantic similarity.

Why this answer

BERTScore uses contextual embeddings, captures semantic similarity, and correlates better with human judgment than n-gram metrics.

52
MCQmedium

An organization wants to deploy a model that can summarize long financial reports (5000+ tokens) without losing context. Which model architecture is best suited for this requirement?

A.Encoder-decoder model (e.g., T5)
B.Mixture-of-experts model
C.Decoder-only model (e.g., GPT)
D.Encoder-only model (e.g., BERT)
AnswerA

Encoder-decoder architecture excels at summarization and can handle long inputs via the encoder.

Why this answer

Encoder-decoder models like T5 or BART are designed for sequence-to-sequence tasks such as summarization, and can handle long inputs with their encoder.

53
MCQmedium

A company wants to build a customer service chatbot that answers questions about their internal policy documents. The documents are updated monthly, and the team cannot afford to retrain a model each time. Which approach is MOST appropriate?

A.Train a custom model from scratch on the policy documents each month
B.Use Retrieval-Augmented Generation (RAG) with the policy documents indexed in a vector store
C.Use a larger foundation model with a longer context window and paste all documents into each prompt
D.Fine-tune a base LLM on the policy documents monthly
AnswerB

RAG retrieves relevant document chunks at query time, ensuring the chatbot always answers from the latest uploaded documents without any model retraining.

Why this answer

RAG (Retrieval-Augmented Generation) allows the LLM to retrieve relevant document sections at inference time, so knowledge stays current without retraining. The other options either require expensive retraining for each update or lack document grounding.

54
MCQmedium

An organization needs to select a tokenisation algorithm for a multilingual LLM that will process English, Chinese, and Korean text efficiently. Which tokenisation method is BEST suited for this requirement?

A.WordPiece
B.Byte-Pair Encoding (BPE)
C.SentencePiece
D.Character-level tokenisation
AnswerC

SentencePiece treats the input as a raw byte stream and does not require pre-tokenisation, making it ideal for multilingual corpora including CJK languages.

Why this answer

SentencePiece is language-agnostic, works directly on raw text without requiring pre-tokenisation (e.g., whitespace splitting), and handles languages like Chinese and Korean where word boundaries are not obvious. BPE and WordPiece typically require pre-tokenisation, making them less suitable for CJK languages.

55
Multi-Selectmedium

A data scientist is building a RAG pipeline on OCI. Which TWO components are essential for the retrieval step?

Select 2 answers
A.Fine-tuned generation model
B.Embedding model to convert chunks into vectors
C.Document chunking
D.Beam search decoder
E.Human feedback loop
AnswersB, C

Embeddings are required for vector search.

Why this answer

Chunking splits documents into manageable pieces, and embedding converts them into vectors for similarity search.

56
MCQhard

An OCI user observes that their Mistral model produces very repetitive text when temperature is set to 0.9 and top-p to 1.0. Which adjustment is most likely to reduce repetition?

A.Decrease top-p to 0.5
B.Increase temperature to 1.5
C.Enable frequency penalty
D.Set top-k to 1
AnswerC

Frequency penalty penalizes tokens based on their frequency in the generated text.

Why this answer

Enabling frequency penalty directly reduces the likelihood of the model repeating the same tokens by subtracting a penalty proportional to the token's existing frequency in the generated text. This is the most targeted way to combat repetitive output without altering the core sampling parameters (temperature and top-p) that control randomness.

Exam trap

A common mistake in Oracle OCI GenAI is assuming that reducing randomness (lower top-p or top-k) will fix repetition, when it often makes it worse, and that increasing temperature helps, but it risks incoherence. Frequency penalty is the targeted solution.

How to eliminate wrong answers

Option A is wrong because decreasing top-p to 0.5 narrows the set of tokens considered for sampling, which can actually increase repetition by focusing on the most probable tokens. Option B is wrong because increasing temperature to 1.5 makes the output more random and chaotic, which may reduce repetition but often at the cost of coherence and relevance. Option D is wrong because setting top-k to 1 forces greedy decoding (always picking the single most probable token), which dramatically increases repetition and is the opposite of what is needed.

57
MCQhard

An LLM generates a response that contains a plausible-sounding but factually incorrect statement about a historical event. This is an example of which known limitation?

A.Knowledge cutoff
B.Hallucination
C.Bias in training data
D.Context length constraint
AnswerB

Hallucination is when the model produces factually incorrect or nonsensical content that appears plausible.

Why this answer

Hallucination in LLMs refers to the generation of content that is plausible-sounding but factually incorrect or nonsensical. This occurs when the model's probabilistic next-token prediction produces statements that are not grounded in its training data or real-world facts, often due to overgeneralization or lack of factual recall mechanisms.

Exam trap

A common pitfall is confusing hallucination with knowledge cutoff. Hallucination generates incorrect information even on topics within the training data's timeframe, while knowledge cutoff only explains missing recent events. This question tests the ability to distinguish these two limitations.

How to eliminate wrong answers

Option A is wrong because knowledge cutoff refers to the date after which the model has no training data, not to the generation of incorrect facts within its training period. Option C is wrong because bias in training data leads to systematic skewing of outputs (e.g., stereotypes), not to isolated factually incorrect statements about specific events. Option D is wrong because context length constraint limits the amount of input text the model can process at once, not the factual accuracy of its generated responses.

58
Multi-Selecthard

A practitioner is choosing a model for a code generation assistant that must run on OCI with low latency. Which THREE considerations are most important?

Select 3 answers
A.Model size (number of parameters)
B.Whether the model is available as a managed endpoint or requires self-hosting on OCI GPU shapes
C.The cost of fine-tuning the model on internal codebases
D.Availability of a model specifically fine-tuned for code (e.g., Code Llama, StarCoder)
E.The model's context window length
AnswersA, B, D

Smaller models generally have lower inference latency, which is critical for real-time code generation.

Why this answer

Smaller models typically have lower latency, model families (Llama, Code Llama) are designed for code, and deployment choices affect latency. Context window size and fine-tuning cost are secondary or not directly relevant to latency.

59
MCQhard

An OCI user is comparing two embedding models: one with 768 dimensions and another with 1024 dimensions. Which of the following trade-offs is most relevant?

A.The 1024-dimensional model always yields better accuracy with no additional cost
B.The 768-dimensional model is always faster and more storage-efficient
C.Higher dimensions may capture more fine-grained semantic information but require more storage and slower similarity search
D.Dimension size has no impact on performance or storage
AnswerC

This is the standard trade-off.

Why this answer

Higher dimensions can capture more nuanced semantics but require more storage and may increase retrieval latency.

60
MCQmedium

A data scientist is using OCI Generative AI to process a large batch of legal documents. The total cost is higher than expected. Which factor is most likely the primary driver of cost?

A.The number of API requests made
B.The total number of tokens processed (input + output)
C.The choice of sampling strategy (e.g., top-k vs greedy)
D.The latency of the inference endpoint
AnswerB

Pricing is typically per token; longer documents mean more tokens and higher cost.

Why this answer

In OCI Generative AI, pricing is primarily based on the total number of tokens processed, which includes both input (prompt) and output (generated) tokens. Processing large batches of legal documents generates high token counts due to lengthy text inputs and verbose outputs, directly increasing cost. The number of API requests alone does not determine cost—a single request with many tokens costs more than many requests with few tokens.

Exam trap

The 1Z0-1127 exam often tests the misconception that API request count is the primary cost driver, when in reality token-based pricing means a single large request can cost more than hundreds of tiny requests.

How to eliminate wrong answers

Option A is wrong because OCI Generative AI charges per token, not per API request; a single request with a large prompt and long response incurs higher cost than many small requests. Option C is wrong because sampling strategy (e.g., top-k vs greedy) affects output diversity and quality, not the token count or pricing model. Option D is wrong because latency of the inference endpoint impacts response time and throughput, not the cost per token or total cost.

61
Multi-Selectmedium

An organization wants to use OCI Generative AI for a multilingual translation task. They need high quality and must avoid biases present in the training data. Which THREE strategies should they consider? (Select THREE.)

Select 3 answers
A.Use a RAG pipeline to retrieve canonical translations from a trusted database
B.Implement a human-in-the-loop review process to catch biased translations
C.Fine-tune a pre-trained model on a high-quality parallel corpus for the target language pairs
D.Increase the temperature parameter to 1.5 to reduce repetitive biases
E.Use an encoder-decoder model such as T5 or BART
AnswersB, C, E

Human review is an effective way to identify and correct biased outputs.

Why this answer

Fine-tuning on high-quality parallel corpora improves accuracy. Using models designed for translation (e.g., encoder-decoder) often yields better results. Implementing human-in-the-loop review catches biases.

Increasing temperature may reduce bias but also reduces quality; it is not a primary strategy for bias mitigation. RAG is not directly applicable to translation as it requires retrieved documents in the target language.

62
MCQeasy

Which model architecture is used by BERT for natural language understanding tasks?

A.Recurrent neural network
B.Encoder-decoder
C.Encoder-only
D.Decoder-only
AnswerC

BERT is an encoder-only model that uses bidirectional self-attention to understand the full context of the input.

Why this answer

BERT uses an encoder-only architecture, which processes the entire input sequence bidirectionally. This makes it well-suited for tasks like classification, NER, and QA where understanding the full context is important.

63
MCQmedium

A company has a large dataset of legal documents in multiple languages. They need to find documents semantically similar to a query. Which step is essential for this task?

A.Apply BPE tokenization to all documents
B.Use a text embedding model to convert documents into dense vector representations
C.Fine-tune a generation model on the legal documents
D.Use beam search to identify similar passages
AnswerB

Embedding models produce vectors that enable semantic similarity computation via cosine similarity.

Why this answer

Embedding models convert text into dense vectors that capture semantic meaning. Cosine similarity between query and document embeddings is then used to find similar documents.

64
MCQmedium

A researcher wants to compare two summarization models. Model A achieves a higher ROUGE-L score than Model B, but human evaluators prefer Model B's summaries. Which of the following is the MOST likely reason?

A.Model A overfits to the training data
B.Model B has a larger context window
C.ROUGE-L measures n-gram overlap, which may not align with human judgment of quality
D.Model A is an encoder-decoder model while Model B is decoder-only
AnswerC

Human evaluators consider factors like readability and conciseness, which ROUGE-L does not capture fully.

Why this answer

ROUGE-L measures n-gram overlap, which may not capture semantic quality. Human evaluators often prefer summaries that are fluent, coherent, and concise, even if they use different wording. The discrepancy indicates that ROUGE-L alone is insufficient for evaluation.

65
MCQmedium

A company wants to build a sentiment analysis system for customer reviews. They have a labeled dataset of 10,000 reviews. Which approach is most cost-effective and likely to yield good performance?

A.Use GPT-4 with a prompt and no fine-tuning
B.Use a simple bag-of-words model with logistic regression
C.Fine-tune a pre-trained BERT model on the labeled dataset
D.Train a Transformer model from scratch on the reviews
AnswerC

BERT is pre-trained for language understanding; fine-tuning on a small classification dataset is efficient and effective.

Why this answer

Fine-tuning a pre-trained encoder-only model like BERT on the labeled dataset is a standard approach for classification tasks, offering good performance with relatively modest data and compute.

66
MCQhard

An LLM is being used to answer customer queries about a product catalog. The answers are fluent but sometimes include plausible-sounding but incorrect product details. What is this phenomenon called, and which technique is most effective to mitigate it?

A.Knowledge cutoff; fine-tune the model on the catalog
B.Hallucination; use Retrieval-Augmented Generation (RAG) with the catalog indexed
C.Bias amplification; increase temperature
D.Overfitting; reduce the model size
AnswerB

Hallucination is the correct term; RAG is the standard mitigation.

Why this answer

Hallucination is the generation of false information; RAG grounds responses in retrieved factual documents, reducing hallucinations.

67
MCQmedium

An OCI user observes that their embedding model returns vectors that are not normalized, and they want to compute cosine similarity between two text embeddings. What should they do?

A.Compute the Euclidean distance between the vectors
B.Compute the L1 norm of the difference
C.Normalize the vectors to unit length, then compute the dot product
D.Compute the dot product directly
AnswerC

Cosine similarity is dot product of normalized vectors. Normalizing ensures the result is in [-1,1] and reflects the cosine of the angle.

Why this answer

Cosine similarity measures the cosine of the angle between two vectors, which is equivalent to the dot product of the vectors after they have been normalized to unit length (L2 norm = 1). Option C correctly describes this process: first normalize each embedding vector to unit length, then compute the dot product. This is the standard approach because raw embedding vectors from models like OCI's AI services may not be unit vectors, and the dot product alone does not account for magnitude differences.

Exam trap

The 1Z0-1127 exam often tests the misconception that the dot product alone is equivalent to cosine similarity, but the trap is that this only holds if the vectors are already normalized to unit length, which is not guaranteed by default.

How to eliminate wrong answers

Option A is wrong because Euclidean distance measures the straight-line distance between vectors, which is sensitive to vector magnitude and does not directly compute cosine similarity. Option B is wrong because the L1 norm of the difference (Manhattan distance) is a different metric that does not capture angular similarity. Option D is wrong because computing the dot product directly on non-normalized vectors yields a value that is influenced by both the angle and the magnitudes of the vectors, not purely the cosine of the angle.

68
MCQeasy

Which of the following is a decoder-only model architecture?

A.T5
B.GPT-3
C.BART
D.BERT
AnswerB

GPT-3 is decoder-only, using masked self-attention.

Why this answer

GPT is a decoder-only model. BERT is encoder-only. T5 is encoder-decoder.

69
MCQmedium

A company's AI system uses RAG to answer customer questions. Users often get incomplete answers because the retrieved chunks do not contain all relevant information. Which step in the RAG pipeline is most likely the issue?

A.Retrieval top-k setting
B.Generation model temperature
C.Chunking strategy (chunk size and overlap)
D.Embedding model selection
AnswerC

If chunks are too small or have insufficient overlap, relevant information may be split, leading to incomplete retrieval.

Why this answer

Chunking determines how documents are split into pieces. If chunks are too small, key information may be split across chunks, causing incomplete retrieval. Adjusting chunk size and overlap can improve completeness.

70
MCQhard

A team is building a code generation assistant and needs to choose between fine-tuning a base LLM or using in-context learning with a few examples. They have 500 high-quality code examples. The assistant must generate code for a wide variety of tasks. Which approach is BETTER and why?

A.Fine-tuning, because it reduces inference cost compared to providing examples each time
B.Fine-tuning, because it permanently encodes the examples into the model weights
C.In-context learning, because it allows the model to adapt to each task dynamically without risking catastrophic forgetting
D.In-context learning, because it requires no additional training infrastructure
AnswerC

In-context learning uses the model's existing knowledge and adapts via examples in the prompt, which is more flexible for diverse tasks with a small dataset.

Why this answer

Fine-tuning with 500 examples may lead to overfitting or catastrophic forgetting, especially when the tasks are diverse. In-context learning with a few examples per task is more flexible and leverages the model's pre-trained knowledge. The small dataset size makes fine-tuning risky.

71
MCQmedium

A developer is using the Cohere Command model for text generation and wants to ensure the output is deterministic for testing purposes. Which sampling strategy should they use?

A.Top-k sampling with k=50
B.Temperature sampling with temperature=0.7
C.Top-p (nucleus) sampling with p=0.9
D.Greedy decoding
AnswerD

Greedy decoding picks the most likely token at each step, making outputs deterministic.

Why this answer

Greedy decoding always selects the token with highest probability, producing the same output for a given input. Temperature, top-k, and top-p introduce randomness.

72
MCQeasy

Which of the following best describes the role of the self-attention mechanism in a Transformer model?

A.It encodes the order of tokens in the sequence
B.It computes a weighted sum of all input token representations, where weights depend on pairwise compatibility between tokens
C.It applies a convolutional filter over local windows of tokens
D.It replaces the need for positional encoding by using recurrence
AnswerB

Self-attention calculates attention scores between every pair of tokens and uses them to aggregate information.

Why this answer

The self-attention mechanism computes a weighted sum of all input token representations, where the weights are determined by the pairwise compatibility (attention scores) between tokens. This allows each token to dynamically attend to every other token in the sequence, capturing global dependencies without the limitations of fixed local windows or recurrence.

Exam trap

The 1Z0-1127 exam often tests the misconception that self-attention inherently encodes positional information, when in fact it is permutation-invariant and relies on separate positional encodings to maintain sequence order.

How to eliminate wrong answers

Option A is wrong because encoding the order of tokens is the role of positional encoding, not the self-attention mechanism itself; self-attention is permutation-invariant and requires explicit positional information. Option C is wrong because applying a convolutional filter over local windows describes a CNN approach, not the global, pairwise weighting of self-attention in Transformers. Option D is wrong because self-attention does not replace positional encoding; it operates without recurrence, but positional encoding is still necessary to inject sequence order information into the model.

73
MCQeasy

In the transformer architecture, what is the primary purpose of positional encoding?

A.To normalize the input embeddings
B.To reduce the number of parameters in the model
C.To enable multi-head attention
D.To provide the model with information about the order of tokens
AnswerD

Positional encoding injects sequence order information, allowing the model to use token positions.

Why this answer

Since self-attention processes tokens in parallel without inherent order, positional encoding adds information about the position of each token in the sequence.

74
MCQeasy

In a Transformer model, what is the role of positional encoding?

A.To reduce the number of parameters in the model
B.To enable the model to process tokens in parallel
C.To encode the semantic meaning of each token
D.To provide information about the position of each token in the sequence
AnswerD

This is the exact purpose of positional encoding.

Why this answer

Positional encoding is essential in Transformer models because the self-attention mechanism processes all tokens in parallel and has no inherent notion of sequence order. By adding positional encodings (often sinusoidal or learned) to the input embeddings, the model can distinguish between tokens at different positions, enabling it to capture word order and relative positions. Without this, the model would treat the sequence as a bag of tokens, losing all sequential context.

Exam trap

The 1Z0-1127 exam often tests the misconception that positional encoding is responsible for enabling parallel processing, when in fact it is the self-attention mechanism's non-sequential computation that allows parallelism, and positional encoding merely injects order information into that parallel framework.

How to eliminate wrong answers

Option A is wrong because positional encoding does not reduce the number of parameters; it adds a fixed or learned vector to each token embedding, which may slightly increase parameters if learned, but its primary purpose is not parameter reduction. Option B is wrong because parallel processing is enabled by the self-attention mechanism itself, not by positional encoding; positional encoding actually compensates for the lack of recurrence that would otherwise provide order information in sequential models. Option C is wrong because semantic meaning is encoded by the token embeddings (e.g., learned word vectors), while positional encoding only provides information about the token's position in the sequence.

75
Multi-Selecthard

An organization is deploying an LLM for document question answering. They want to reduce hallucinations and ensure answers are grounded in provided documents. Which THREE techniques should they implement? (Choose three.)

Select 3 answers
A.Use a longer context window to include more document text
B.Fine-tune the model on a corpus of in-domain documents
C.Set a low temperature (e.g., 0.1) for sampling
D.Set a high temperature (e.g., 1.5) for sampling
E.Use Retrieval-Augmented Generation (RAG)
AnswersB, C, E

Fine-tuning on relevant documents improves the model's knowledge and can reduce hallucination.

Why this answer

RAG retrieves relevant document chunks and conditions the generation on them, reducing hallucination. Fine-tuning on the document domain can improve grounding. Using a lower temperature (closer to 0) makes the model more deterministic and less likely to fabricate.

Higher temperature increases hallucination risk, and longer context window alone does not guarantee grounding.

Page 1 of 2 · 109 questions totalNext →

Ready to test yourself?

Try a timed practice session using only LLM Fundamentals questions.