Courseiva

CCNA Fundamentals of Large Language Models Questions

30 of 105 questions · Page 2/2 · Fundamentals of Large Language Models · Answers revealed

76
MCQhard

An OCI GenAI model generates English to French translation. Which metric is most appropriate to evaluate its quality?

A.Perplexity
B.ROUGE
C.F1 score
D.BLEU
AnswerD

BLEU is the standard metric for translation tasks.

Why this answer

BLEU (Bilingual Evaluation Understudy) is the standard metric for machine translation tasks because it measures the n-gram overlap between the generated translation and one or more reference translations, directly assessing fluency and adequacy. For English-to-French translation, BLEU correlates well with human judgment of translation quality, making it the most appropriate choice.

Exam trap

Oracle often tests the distinction between metrics for generation tasks (BLEU for translation, ROUGE for summarization, perplexity for language modeling) and classification metrics (F1 score), leading candidates to confuse their appropriate domains.

How to eliminate wrong answers

Option A is wrong because perplexity measures how well a language model predicts a sequence of tokens, not the quality of a translation against a reference. Option B is wrong because ROUGE is designed for summarization tasks, focusing on recall of n-grams and longest common subsequences, not translation accuracy. Option C is wrong because F1 score is a classification metric (precision and recall) that does not capture the sequential and lexical alignment required for evaluating translation output.

77
MCQeasy

A researcher wants to compare the performance of two LLMs on OCI Generative AI: a base model and an instruct model. They notice the instruct model often refuses to generate certain types of content. Which factor most likely explains this behavior?

A.The base model was programmed to follow stricter rules.
B.The instruct model has been fine-tuned with reinforcement learning from human feedback (RLHF) to align with safety guidelines.
C.The instruct model was trained on a smaller dataset.
D.The base model rejects content more often.
AnswerB

RLHF makes instruct models more likely to reject unsafe requests.

Why this answer

Instruct models are typically fine-tuned using reinforcement learning from human feedback (RLHF) to align with safety guidelines and ethical constraints. This fine-tuning process teaches the model to refuse generating harmful, biased, or unsafe content, which explains why the instruct model refuses certain types of content while the base model does not.

Exam trap

Oracle often tests the misconception that refusal behavior is due to dataset size or rule-based programming, when in fact it is a direct result of RLHF-based safety alignment in instruct models.

How to eliminate wrong answers

Option A is wrong because base models are not programmed with explicit rule-based filters; they are trained on large text corpora without specific refusal mechanisms. Option C is wrong because the training dataset size does not directly cause refusal behavior; instruct models are often fine-tuned on smaller, curated datasets but the refusal stems from RLHF alignment, not dataset size. Option D is wrong because base models typically do not reject content more often; they generate outputs freely without the safety alignment that instruct models undergo.

78
MCQmedium

An AI engineer is testing a large language model on OCI Generative AI and receives this error: 'Token limit exceeded. Maximum context length is 4096 tokens.' The prompt is 4000 tokens long. What is the most effective way to resolve the issue without losing important context?

A.Reduce the prompt length by summarizing or trimming less relevant information.
B.Switch to a model with a larger context window, if available.
C.Increase the max_tokens parameter in the API call.
D.Split the prompt into multiple requests and combine outputs.
AnswerA

Reducing prompt length ensures it fits within the token limit while preserving key context.

Why this answer

The error indicates that the combined prompt and generated output exceed the model's maximum context length of 4096 tokens. Since the prompt alone is 4000 tokens, there is very little room for the model to generate a response. Trimming or summarizing less relevant parts of the prompt directly reduces the token count, allowing the model to produce a complete output without exceeding the limit.

This approach preserves the most critical context while staying within the model's constraints.

Exam trap

Oracle often tests the misconception that increasing max_tokens or switching models can bypass the token limit, but the core issue is the total context length, which is a fixed architectural constraint of the model.

How to eliminate wrong answers

Option B is wrong because switching to a model with a larger context window may not be available in the current environment or may introduce additional costs and latency; the question asks for the most effective way to resolve the issue without losing important context, and reducing the prompt is a more direct and universally applicable solution. Option C is wrong because increasing the max_tokens parameter does not change the total context length limit; it only controls the maximum number of tokens the model can generate, and if the prompt already consumes 4000 tokens, increasing max_tokens would still cause the total to exceed 4096. Option D is wrong because splitting the prompt into multiple requests and combining outputs can lead to loss of coherence and context across the separate calls, and the model does not maintain state between requests, so important relationships between parts of the prompt would be lost.

79
MCQhard

A data scientist is designing a prompt to extract structured information (e.g., JSON) from text using an instruct model on OCI Generative AI. The model sometimes outputs additional text beyond the JSON, breaking parsing. Which prompt engineering technique is most effective to enforce structured output?

A.Use a base model instead of an instruct model.
B.Set the temperature to 0.0 to reduce randomness.
C.Include a few-shot example of the expected JSON output in the prompt.
D.Increase max_tokens to allow for additional output.
AnswerC

Few-shot examples teach the model to output precisely in the desired format.

Why this answer

Few-shot prompting provides explicit examples of the desired output format, which instructs the model to follow the exact JSON structure and reduces the likelihood of extraneous text. This technique leverages the model's in-context learning ability to adhere to formatting constraints, making it the most effective for enforcing structured output in OCI Generative AI instruct models.

Exam trap

Oracle often tests the misconception that lowering temperature or increasing tokens can enforce output format, when in reality only explicit formatting examples (few-shot) reliably constrain the model's output structure.

How to eliminate wrong answers

Option A is wrong because base models lack instruction-following capabilities and are more prone to generating unstructured or irrelevant text, making them less suitable for structured output tasks. Option B is wrong because setting temperature to 0.0 reduces randomness but does not prevent the model from outputting additional explanatory text beyond the JSON; it only makes outputs more deterministic, not format-compliant. Option D is wrong because increasing max_tokens allows more room for additional output, which would exacerbate the problem of extra text beyond the JSON, not solve it.

80
MCQeasy

An OCI AI Language text classification request returns the output shown. Which conclusion is most accurate?

A.The model is uncertain about the sentiment.
B.The text is classified as Positive with high confidence.
C.The API endpoint is misconfigured.
D.The --endpoint parameter is optional.
AnswerB

The label 'Positive' with score 0.98 confirms high-confidence classification.

Why this answer

The output shows a sentiment label of 'Positive' with a confidence score of 0.98, indicating the model is highly confident in its classification. Option B correctly identifies this as a positive sentiment with high confidence, which is the most accurate conclusion based on the provided data.

Exam trap

The trap here is that candidates may misinterpret a high confidence score as uncertainty (Option A) due to a common misconception that AI models always express doubt, but in OCI AI Language, a score near 1.0 explicitly indicates high certainty.

How to eliminate wrong answers

Option A is wrong because a confidence score of 0.98 indicates the model is very certain, not uncertain, about the sentiment. Option C is wrong because the API endpoint is not misconfigured; the request returned a valid response with a sentiment label and confidence score, which would not happen if the endpoint were misconfigured. Option D is wrong because the --endpoint parameter is not optional; it is required to specify the OCI AI Language endpoint for the API call, and its absence would cause a request failure.

81
MCQmedium

A model generates code with security issues. Which approach is best to mitigate this?

A.Reduce max_tokens
B.Increase temperature
C.Use a different model
D.Add a system prompt with security guidelines
AnswerD

System prompts can guide the model to produce secure code.

Why this answer

Adding a system prompt with security guidelines (option D) instructs the model to follow best practices, directly addressing security concerns without changing model training.

82
MCQhard

Refer to the exhibit. A developer runs the OCI CLI command and receives the output. However, the text "Hello, how are you?" is actually a mix of English and French words. Why does the model assign only 0.03 to French?

A.The text is overwhelmingly English, so the model assigns a low probability to French.
B.The model is limited to identifying a single language per query.
C.The model cannot detect multiple languages in a single text.
D.The model's scores are normalized to sum to 1, so a high English score forces low others.
AnswerA

The phrase is mostly English, so the model is confident it is English.

Why this answer

The model's output shows a probability distribution over languages, and the text is predominantly English with only a few French words. The model assigns a low probability (0.03) to French because the overwhelming majority of tokens are English, making the text far more likely to be classified as English. This reflects how language identification models evaluate the overall composition of the input.

Exam trap

Oracle often tests the misconception that normalized probabilities force a single language to dominate, but the trap here is that candidates may think the low French score is an artifact of normalization rather than a reflection of the actual token distribution in the text.

How to eliminate wrong answers

Option B is wrong because the model can output probabilities for multiple languages simultaneously, as shown in the exhibit where both English and French scores are present. Option C is wrong because the model can detect multiple languages in a single text, as evidenced by the non-zero probability assigned to French; it does not have a hard limit of one language per query. Option D is wrong because while scores are normalized to sum to 1, the low French score is due to the actual token composition, not merely a forced consequence of normalization; normalization reflects the relative likelihoods, but the model could assign high scores to multiple languages if the text were genuinely multilingual.

83
MCQeasy

What is the role of the softmax function in the output layer of an LLM?

A.Apply attention
B.Tokenize input
C.Compute gradients
D.Convert logits to probabilities
AnswerD

Softmax normalizes logits into a probability distribution.

Why this answer

The softmax function in the output layer of an LLM converts the raw, unnormalized scores (logits) produced by the final linear layer into a probability distribution over the vocabulary. This allows the model to output a valid probability for each token, where all probabilities sum to 1, enabling sampling or greedy decoding for next-token prediction.

Exam trap

The trap here is that candidates may confuse the role of softmax with other transformer components like attention or tokenization, especially since all are critical to LLM operation, but only softmax directly converts logits to probabilities in the output layer.

How to eliminate wrong answers

Option A is wrong because attention is a mechanism within the transformer architecture (e.g., self-attention in the encoder/decoder blocks) that computes weighted sums of values based on queries and keys, not a function applied in the output layer. Option B is wrong because tokenization is a preprocessing step that splits input text into tokens (e.g., using BPE or WordPiece) before the model processes them, not a function of the output layer. Option C is wrong because gradient computation is part of the backpropagation algorithm during training, not an inference-time operation of the output layer; softmax itself is differentiable but its role is to produce probabilities, not compute gradients.

84
MCQeasy

A user has a prompt that exceeds the model's token limit. What is the best practice to handle this?

A.Summarize the earlier parts of the prompt and include the summary.
B.Increase the max tokens parameter in the API call.
C.Truncate the prompt and hope the model understands.
D.Split the input into multiple calls and merge results.
AnswerA

Correct: Summarization preserves context while reducing token count.

Why this answer

When a prompt exceeds the model's token limit, the best practice is to summarize the earlier parts of the prompt and include the summary. This preserves the essential context without exceeding the token limit, as the model's context window is fixed (e.g., 4,096 tokens for GPT-3.5 or 8,192 for GPT-4). Summarization reduces token count while retaining key information, enabling the model to process the entire input within its constraints.

Exam trap

Oracle often tests the misconception that increasing the max tokens parameter can extend the input capacity, when in reality it only affects output length, not the fixed context window.

How to eliminate wrong answers

Option B is wrong because increasing the max tokens parameter does not expand the model's context window; it only controls the length of the generated response, not the input prompt limit. Option C is wrong because truncating the prompt arbitrarily removes potentially critical context, leading to incomplete or incorrect model understanding, as the model cannot infer missing information. Option D is wrong because splitting the input into multiple calls and merging results breaks the conversational context; the model has no memory across separate API calls, so the merged output would lack coherence and continuity.

85
Multi-Selectmedium

Which TWO of the following are common applications of large language models in enterprise settings?

Select 2 answers
A.Summarizing lengthy legal documents.
B.Performing real-time signal processing for audio streams.
C.Generating boilerplate code from natural language descriptions.
D.Replacing relational databases for data storage.
E.Enhancing low-resolution images through super-resolution.
AnswersA, C

LLMs are effective for text summarization.

Why this answer

Large language models (LLMs) excel at abstractive summarization, which involves condensing lengthy legal documents into concise summaries while preserving key facts and legal reasoning. This is a common enterprise application for legal departments, as LLMs can process large volumes of text and generate coherent, context-aware summaries without requiring manual reading.

Exam trap

Oracle often tests the distinction between LLMs' text-based capabilities and specialized AI tasks (e.g., signal processing, image enhancement), leading candidates to mistakenly assume LLMs can handle any AI task due to their broad 'general intelligence' appearance.

86
MCQhard

An architect is designing a multi-tenant application using OCI Generative AI. Each tenant has custom instructions and data. To minimize cost while maintaining isolation, which deployment approach is recommended?

A.Dedicated fine-tuned endpoint per tenant.
B.Shared base model with per-tenant system prompts and retrieval.
C.On-premises deployment of open-source models.
D.Single large fine-tuned model with conditional logic.
AnswerB

This approach uses a shared model with tenant-specific prompts and RAG, balancing cost and isolation.

Why this answer

It leverages a shared base model with per-tenant system prompts and retrieval-augmented generation (RAG) to isolate custom instructions and data without the cost of dedicated endpoints. This approach minimizes compute overhead by reusing a single model instance while maintaining logical isolation through prompt engineering and vector-based retrieval, aligning with OCI's pay-as-you-go pricing model.

Exam trap

The trap here is that candidates often assume fine-tuning is necessary for customization, overlooking that system prompts and retrieval can achieve equivalent isolation at a fraction of the cost, which the Oracle OCI GenAI exam tests by contrasting dedicated endpoints against shared-model strategies.

How to eliminate wrong answers

Option A is wrong because dedicating a fine-tuned endpoint per tenant multiplies infrastructure costs linearly with each tenant, defeating the cost-minimization goal. Option C is wrong because on-premises deployment of open-source models incurs fixed hardware and operational costs, lacks OCI's managed scaling benefits, and still requires per-tenant isolation mechanisms. Option D is wrong because a single large fine-tuned model with conditional logic introduces coupling between tenants, risking data leakage and making updates or rollbacks complex without true isolation.

87
MCQmedium

A healthcare startup is building an AI assistant to help doctors draft clinical notes from patient-physician conversations. They have a large language model that is fine-tuned on medical data. During testing, they notice the model occasionally generates plausible-sounding but incorrect medical recommendations. The startup wants to deploy the assistant to assist doctors, not replace them. They have the following options: (A) Deploy the model as-is and rely on doctors to catch errors, (B) Add a disclaimer that the model may make mistakes, (C) Implement a fact-checking pipeline that cross-references outputs with a trusted medical knowledge base before presenting to doctors, (D) Reduce the model's temperature to 0 to ensure deterministic outputs. Which option best balances safety and utility?

A.Implement a fact-checking pipeline that cross-references outputs with a trusted medical knowledge base.
B.Add a disclaimer that the model may make mistakes.
C.Deploy the model as-is and rely on doctors to catch errors.
D.Reduce the model's temperature to 0 to ensure deterministic outputs.
AnswerA

Fact-checking reduces hallucinations and ensures accuracy.

Why this answer

Implementing a fact-checking pipeline that cross-references outputs with a trusted medical knowledge base directly mitigates the risk of hallucinated medical recommendations while preserving the assistant's utility. This approach leverages retrieval-augmented generation (RAG) principles to ground the model's outputs in verified facts, ensuring safety without sacrificing the flexibility needed for drafting clinical notes.

Exam trap

The Oracle OCI Generative AI certification tests understanding that temperature controls output randomness and not factual accuracy; reducing temperature to 0 does not prevent hallucination.

How to eliminate wrong answers

Option B is wrong because a disclaimer does not prevent the model from generating incorrect medical advice; it merely shifts liability and does not address the underlying safety risk. Option C is wrong because deploying the model as-is and relying on doctors to catch errors places an unrealistic cognitive burden on clinicians, increasing the chance of oversight and patient harm. Option D is wrong because reducing temperature to 0 makes outputs deterministic but does not guarantee correctness; the model may still produce plausible-sounding but false recommendations from its training data, and deterministic outputs can actually amplify systematic errors.

88
Multi-Selecthard

Which THREE techniques are commonly used to improve the quality of text generation?

Select 3 answers
A.Temperature scaling
B.Top-k sampling
C.Greedy decoding
D.Random sampling
E.Beam search
AnswersA, B, E

Temperature scaling smooths token probabilities and can improve the quality-diversity trade-off.

Why this answer

Temperature scaling is correct because it controls the randomness of token probability distributions by dividing logits before softmax; lower temperatures (e.g., 0.1) make the model more deterministic, while higher temperatures (e.g., 1.5) increase diversity. This directly influences the quality of generated text by balancing coherence and creativity.

Exam trap

Oracle often tests the misconception that greedy decoding or random sampling are valid quality-improvement techniques, when in fact they either cause repetition (greedy) or incoherence (random) without the controlled stochasticity of temperature, top-k, or the global optimization of beam search.

89
MCQmedium

An organization is concerned about the safety of generated content. Which OCI feature allows them to define custom policies to block inappropriate outputs?

A.OCI IAM policies
B.Content filtering and safety controls in Generative AI
C.OCI Audit logs
D.OCI Vault
AnswerB

The Generative AI service includes configurable safety filters that can block inappropriate content based on defined categories and thresholds.

Why this answer

OCI Generative AI includes built-in content filtering and safety controls that allow organizations to define custom policies to block inappropriate or harmful outputs. These controls operate at the model inference layer, enabling fine-grained filtering based on categories such as toxicity, hate speech, or personally identifiable information (PII). This directly addresses the concern about generated content safety.

Exam trap

The trap here is that candidates often confuse IAM policies (access control) with content safety policies, or assume that logging (Audit) or encryption (Vault) can prevent inappropriate outputs, when in fact only the Generative AI service's built-in content filtering provides that capability.

How to eliminate wrong answers

Option A is wrong because OCI IAM policies govern access control and permissions for OCI resources, not the filtering or safety of generated content from AI models. Option C is wrong because OCI Audit logs capture API calls and operational events for compliance and monitoring, but they do not provide any mechanism to block or filter inappropriate outputs in real time. Option D is wrong because OCI Vault is a key management service for storing and managing secrets, encryption keys, and certificates; it has no role in content safety or output filtering for generative AI.

90
MCQhard

A financial institution uses an LLM for generating investment advice. They are concerned about hallucinations. Which method is most effective?

A.Fine-tune on general financial data.
B.Use RAG with a verified corpus of regulations and reports.
C.Increase the temperature to get more creative responses.
D.Use a larger model to improve accuracy.
AnswerB

Correct: Grounding in trusted data reduces hallucinations.

Why this answer

Retrieval-Augmented Generation (RAG) grounds the LLM's output in a verified, external knowledge base (e.g., regulations and reports). By retrieving relevant documents at inference time, RAG reduces the model's reliance on its parametric memory, directly mitigating hallucinations in high-stakes domains like financial advice.

Exam trap

Oracle often tests the misconception that simply fine-tuning or scaling a model can fix hallucinations, when in fact grounding via retrieval (RAG) is the most effective technique for factual accuracy in domain-specific applications.

How to eliminate wrong answers

Option A is wrong because fine-tuning on general financial data does not provide a mechanism to verify or update the model's knowledge at inference time; it only adjusts weights on static data, leaving the model prone to hallucinating outdated or fabricated details. Option C is wrong because increasing temperature makes the output more random and creative, which amplifies the risk of hallucinations rather than reducing them. Option D is wrong because using a larger model does not inherently solve hallucination; larger models can still confidently generate false information, and without a retrieval or grounding mechanism, they remain susceptible to fabricating details.

91
MCQhard

A data engineer wants to migrate a large corpus of PDFs to OCI for use with GenAI. Which storage and preprocessing approach is most efficient for RAG?

A.Store PDFs in OCI Object Storage, then use OCI AI Document Understanding to extract text and create embeddings.
B.Convert PDFs to text locally, upload to OCI Database, use SQL queries to retrieve.
C.Use OCI Data Flow to process in batch and store in NoSQL.
D.Store PDFs in OCI File Storage, mount to compute, run offline extraction.
AnswerA

This leverages cloud-native services for scalable extraction and embedding, ideal for RAG.

Why this answer

OCI Object Storage is optimized for large-scale, unstructured data like PDFs, and OCI AI Document Understanding provides a managed service to extract text from PDFs, which can then be directly fed into embedding pipelines for RAG. This eliminates the need for manual preprocessing or local compute, ensuring scalability and integration with GenAI services.

Exam trap

Oracle often tests the misconception that any storage service (like File Storage or Database) can be used for RAG, but the key is that Object Storage combined with a managed AI extraction service is the most efficient for unstructured data at scale, avoiding local processing overhead.

How to eliminate wrong answers

Option B is wrong because converting PDFs to text locally introduces a bottleneck and inefficiency for large corpora, and storing text in OCI Database with SQL queries is not designed for vector search or RAG workflows, lacking native embedding support. Option C is wrong because OCI Data Flow (Apache Spark) is for batch processing but storing in NoSQL does not provide the vector indexing or retrieval capabilities required for RAG, and it adds unnecessary complexity. Option D is wrong because OCI File Storage is a shared file system for compute instances, not optimized for high-throughput object access, and running offline extraction on a mounted compute instance is manual, lacks scalability, and does not leverage managed AI services.

92
MCQmedium

A data scientist wants to improve the accuracy of a summarization model on medical texts. Which OCI service feature is most suitable?

A.OCI Data Flow
B.OCI Language service
C.OCI Generative AI fine-tuning
D.OCI Anomaly Detection
AnswerC

Fine-tuning adapts a model to domain-specific data, improving accuracy.

Why this answer

C is correct because OCI Generative AI fine-tuning allows a data scientist to adapt a pre-trained large language model (LLM) specifically for medical text summarization by training it on domain-specific data. This improves accuracy by aligning the model's outputs with the terminology, context, and nuances of medical literature, which generic models may not capture well.

Exam trap

The trap here is that candidates may confuse the OCI Language service's pre-built summarization capabilities with the ability to customize a model for a specialized domain, overlooking that fine-tuning is required for significant accuracy improvements on niche text like medical records.

How to eliminate wrong answers

Option A is wrong because OCI Data Flow is a serverless Apache Spark-based data processing service for ETL and big data analytics, not designed for fine-tuning or improving summarization model accuracy. Option B is wrong because OCI Language service provides pre-trained NLP capabilities like sentiment analysis and entity extraction but does not support custom fine-tuning of generative models for summarization tasks. Option D is wrong because OCI Anomaly Detection is used for identifying unusual patterns in time-series data, such as equipment failures or fraud, and has no relevance to improving text summarization accuracy.

93
MCQhard

Refer to the exhibit. A user in GenAI-Users group tries to run a text generation inference but gets permission denied. What is the most likely issue?

A.The policy resource type is wrong.
B.The operation condition is too restrictive.
C.The group name mismatch.
D.The user is not in the compartment.
AnswerB

The condition likely does not match the actual operation, causing denial.

Why this answer

The policy attached to the GenAI-Users group includes a condition that restricts the operation to a specific compartment or resource, but the user is attempting to run inference in a different compartment or without meeting the condition. Since the condition is too restrictive, the IAM policy denies the action even though the user is in the correct group and the resource type is valid.

Exam trap

Oracle often tests the nuance that a policy with overly restrictive conditions (e.g., scoping to a specific compartment or resource) will deny access even when the group, resource type, and user compartment are all correct, leading candidates to incorrectly blame the group or resource type.

How to eliminate wrong answers

Option A is wrong because the policy resource type (e.g., 'ai-language-models' or 'genai-models') is correct for text generation inference in OCI Generative AI, so a mismatch would cause a different error. Option C is wrong because the group name mismatch would result in no policy being applied at all, not a permission denied error with a valid group. Option D is wrong because the user being in the compartment is not the issue; the condition in the policy is what restricts the operation, not the user's compartment membership.

94
MCQmedium

An AI specialist is troubleshooting why a fine-tuned model produces inconsistent results across different inference calls. What is the most likely cause?

A.The base model is not suitable
B.The temperature is set too high
C.The model is overfitted
D.The fine-tuning dataset is too small
AnswerB

High temperature increases randomness, causing variable outputs.

Why this answer

Temperature controls the randomness of token sampling during inference. A high temperature (e.g., >1.0) increases the probability of selecting less likely tokens, causing the model to produce varied outputs for the same input across different calls. This is the most direct cause of inconsistent results when the base model and fine-tuning are otherwise sound.

Exam trap

Oracle often tests the misconception that overfitting (Option C) causes inconsistency, but overfitting actually reduces variance by memorizing patterns; the trap is confusing output variability with poor generalization.

How to eliminate wrong answers

Option A is wrong because an unsuitable base model would cause consistently poor or biased outputs, not inconsistency across calls; the base model's suitability affects overall quality, not per-call variance. Option C is wrong because overfitting leads to memorization of training data, producing deterministic or near-identical outputs for similar inputs, not random inconsistency. Option D is wrong because a small fine-tuning dataset typically causes underfitting or poor generalization, not random variation across inference calls; inconsistency from small data would manifest as high variance across different inputs, not across repeated calls with the same input.

95
Multi-Selecthard

An organization is planning to use OCI Generative AI for sensitive customer data. Which three OCI services or features should they consider for data governance and security?

Select 3 answers
A.OCI Vault for managing API keys
B.OCI Data Safe for data masking and encryption
C.OCI IAM for access control
D.OCI Data Labeling for annotating data
E.OCI Audit for logging API calls
AnswersA, C, E

Secure storage of API keys and secrets is crucial for authentication to Generative AI endpoints.

Why this answer

OCI Vault is a dedicated service for securely storing and managing secrets, including API keys used to authenticate to OCI Generative AI. By centralizing API key management in Vault, organizations can enforce rotation policies, access controls, and audit trails, which is critical for protecting sensitive customer data when invoking generative AI models.

Exam trap

Oracle often tests the misconception that database security services like Data Safe apply to all data in OCI, but candidates must recognize that Generative AI operates through API calls and does not use a relational database, making Data Safe irrelevant here.

96
MCQhard

An engineer sets beam search width to 1 during inference on OCI Generative AI. What is the most likely effect on output?

A.More memory usage
B.More diverse outputs
C.Better quality
D.Faster inference
AnswerD

Greedy decoding is the fastest decoding method as it considers only one candidate path.

Why this answer

Beam search width of 1 is equivalent to greedy decoding, where only the single most probable token is selected at each step. This eliminates the need to maintain and compare multiple candidate sequences, significantly reducing computational overhead and memory access, which directly speeds up inference.

Exam trap

A common misconception is that a smaller beam width always degrades quality, but the trap here is that beam width 1 (greedy decoding) is actually the fastest inference method. While it sacrifices diversity and sometimes quality, it is not necessarily worst for all tasks, especially when speed is prioritized.

How to eliminate wrong answers

Option A is wrong because beam width 1 uses less memory (only one candidate sequence is tracked), not more. Option B is wrong because greedy decoding reduces output diversity by always picking the highest-probability token, whereas larger beam widths explore more alternatives. Option C is wrong because greedy decoding often produces repetitive or locally optimal outputs, whereas moderate beam widths (e.g., 4–8) typically yield higher quality by considering global coherence.

97
MCQmedium

During fine-tuning of a Cohere model on OCI Data Science, the loss curve shows a sharp spike after epoch 3. What is the most appropriate action?

A.Gradient clipping.
B.Reduce learning rate.
C.Add more training data.
D.Increase batch size.
AnswerA

Gradient clipping limits gradient values, preventing explosion and stabilizing training.

Why this answer

A sharp spike in the loss curve after epoch 3 during fine-tuning indicates a gradient explosion, where the gradients become excessively large and destabilize the model's weights. Gradient clipping is the most appropriate action because it directly caps the gradient norm (e.g., using `max_grad_norm=1.0` in Cohere's fine-tuning API) to prevent these spikes, ensuring stable training without altering the learning dynamics.

Exam trap

Oracle often tests the distinction between gradient explosion (sharp spikes) and learning rate divergence (gradual increase), leading candidates to incorrectly choose reducing the learning rate instead of gradient clipping.

How to eliminate wrong answers

Option B is wrong because reducing the learning rate addresses gradual divergence or oscillation, not sudden spikes; a sharp spike is a sign of gradient explosion, not a learning rate that is too high. Option C is wrong because adding more training data improves generalization and reduces overfitting but does not mitigate gradient instability during training. Option D is wrong because increasing batch size can stabilize gradient estimates but may also increase memory usage and does not directly prevent individual gradient values from becoming too large; it can even exacerbate gradient explosion by averaging over more samples.

98
MCQhard

You are a machine learning engineer at a large e-commerce company. You have been tasked with deploying a large language model to power a customer service chatbot that handles product returns and refunds. The model will answer customer queries based on a knowledge base of return policies and FAQs. The company has strict requirements: (1) responses must be factually accurate and grounded in the knowledge base, (2) the system must be cost-effective, and (3) latency should be under 2 seconds per response. You decide to use a pre-trained LLM from OCI Data Science and implement retrieval-augmented generation (RAG). You have two options for the retriever: a dense embedding-based retriever (e.g., using OCI AI Language embeddings) or a sparse keyword-based retriever (e.g., BM25). You also need to decide on the generation model size: a 7B parameter model or a 70B parameter model. You run a pilot test: with the dense retriever + 7B model, average latency is 1.8 seconds and accuracy is 85%. With the sparse retriever + 7B model, latency is 1.2 seconds but accuracy drops to 75%. With the 70B model (any retriever), latency exceeds 5 seconds. Which combination should you choose to meet all requirements?

A.Sparse retriever + 70B model.
B.Dense retriever + 70B model.
C.Sparse retriever + 7B model.
D.Dense retriever + 7B model.
AnswerD

Meets both latency and accuracy requirements.

Why this answer

(dense retriever + 7B model) is correct because it meets all three requirements: factual accuracy (85% accuracy from dense retrieval grounding), latency under 2 seconds (1.8 seconds), and cost-effectiveness (7B model is cheaper to run than 70B). The dense retriever provides better semantic matching for nuanced return policy queries, while the 7B model keeps inference fast and affordable.

Exam trap

Oracle often tests the trade-off between retrieval accuracy and model size, where candidates mistakenly prioritize a larger model (70B) for better generation quality, ignoring that the latency constraint makes it infeasible, or choose a sparse retriever thinking it's faster, but overlook the critical accuracy requirement for grounded responses.

How to eliminate wrong answers

Option A is wrong because the 70B model with any retriever exceeds 5 seconds latency, violating the 2-second requirement. Option B is wrong because the 70B model also exceeds 5 seconds latency, failing the latency requirement. Option C is wrong because the sparse retriever (BM25) with the 7B model yields only 75% accuracy, which is below the acceptable factual accuracy threshold given the strict requirement for grounded responses.

99
Multi-Selectmedium

Which three techniques are commonly used to reduce the risk of prompt injection in LLM applications? (Choose three.)

Select 3 answers
A.Enabling prompt validation against regex patterns.
B.Output filtering.
C.Increasing temperature.
D.Input sanitization.
E.Using role-based system prompts.
AnswersB, D, E

Filtering outputs can block dangerous responses.

Why this answer

Output filtering (B) is correct because it acts as a post-processing defense that scans the LLM's generated output for malicious content, such as leaked system prompts or injected commands, before it reaches the user. This technique helps mitigate the impact of successful prompt injections by catching and neutralizing harmful outputs that bypass input controls.

Exam trap

Oracle often tests the distinction between security controls and model parameters, so the trap here is that candidates mistakenly think adjusting model settings like temperature can reduce injection risk, when in fact only input/output controls and system prompt design are effective.

100
MCQeasy

An organization wants to use an LLM to summarize legal documents. Which consideration is most important for ensuring accurate summaries?

A.Fine-tune the model on a curated legal corpus
B.Use the largest available general-purpose model
C.Rely on zero-shot summarization with careful prompting
D.Pre-train a new model from scratch on legal texts
AnswerA

Domain-specific fine-tuning teaches the model legal terminology and reasoning.

Why this answer

Legal documents require precise understanding, so fine-tuning on legal data is critical. Option B is wrong because larger models don't guarantee domain accuracy. Option C is wrong because pre-training from scratch is expensive and unnecessary.

Option D is wrong because zero-shot may miss legal nuances.

101
MCQhard

During fine-tuning of a large language model on OCI, you notice that the model's performance on the validation set is not improving after several epochs, but the training loss continues to decrease. What is the most likely cause?

A.The learning rate is too high.
B.The validation set is not representative.
C.The model is overfitting to the training data.
D.The training data is too small.
AnswerC

Overfitting occurs when the model memorizes training examples, causing training loss to drop while validation performance plateaus or declines. This is the most likely cause.

Why this answer

When training loss decreases but validation performance stagnates or worsens, the model is overfitting to the training data. It memorizes the training examples but fails to generalize. A high learning rate might cause divergence, not this pattern.

Too small training data can contribute to overfitting but is not the direct symptom. An unrepresentative validation set could cause mismatch, but the described pattern is classic overfitting.

102
MCQeasy

A healthcare company is using OCI GenAI to generate patient summaries from clinical notes. The model output sometimes includes hallucinated medical facts, such as incorrect dosages or diagnoses, which could be dangerous. The team needs to improve factual accuracy while maintaining data privacy. They have a large collection of internal medical knowledge bases (clinical guidelines, drug databases) that are stored in OCI Object Storage. The current implementation uses a zero-shot prompt with the base Cohere Command model. The data science team has limited GPU resources and wants to avoid building a complex pipeline. Which course of action best addresses the hallucination problem?

A.Increase the temperature parameter to 0.9 to encourage more deterministic outputs.
B.Use prompt engineering to add 'Only provide facts that are absolutely certain.'
C.Implement a RAG pipeline that retrieves relevant documents from the internal knowledge bases and includes them in the prompt.
D.Fine-tune the Cohere model on a publicly available medical dataset like PubMed.
AnswerC

RAG grounds generation in retrieved facts, significantly reducing hallucinations.

Why this answer

A Retrieval-Augmented Generation (RAG) pipeline directly addresses hallucination by grounding the model's output in verified, internal medical knowledge bases stored in OCI Object Storage. This approach retrieves relevant clinical guidelines or drug database entries and includes them in the prompt, providing factual context without requiring fine-tuning or complex GPU-intensive pipelines. It also preserves data privacy by keeping sensitive medical data within OCI and avoids exposing it to external model training.

Exam trap

Oracle often tests the misconception that prompt engineering alone can reliably eliminate hallucinations, but the trap here is that without external knowledge injection (RAG), the model cannot overcome its inherent tendency to fabricate facts, especially in high-stakes domains like healthcare.

How to eliminate wrong answers

Option A is wrong because increasing the temperature to 0.9 actually increases randomness and creativity, making outputs less deterministic and more prone to hallucinations, not less. Option B is wrong because prompt engineering with a vague instruction like 'Only provide facts that are absolutely certain' does not supply the model with actual factual data; the model still relies on its internal parametric knowledge, which is the source of hallucinations. Option D is wrong because fine-tuning on a publicly available dataset like PubMed introduces public, non-confidential data that may not align with the company's internal medical knowledge, and it requires significant GPU resources and complex pipeline management, which the team explicitly wants to avoid.

103
MCQmedium

A developer runs an OCI GenAI chat request with system prompt "You are a sarcastic assistant." The output is offensive. How can the developer enforce safety policies?

A.Use the OCI GenAI content moderation filter.
B.Change model to LLAMA.
C.Increase maxTokens.
D.Set temperature to 0.
AnswerA

Content moderation filters explicitly block harmful or offensive content in outputs.

Why this answer

The OCI GenAI content moderation filter is specifically designed to enforce safety policies by detecting and blocking offensive, harmful, or policy-violating content in both input prompts and model outputs. By enabling this filter, the developer can prevent the model from generating offensive responses even when a system prompt like 'You are a sarcastic assistant' encourages undesirable behavior.

Exam trap

Oracle often tests the misconception that adjusting model parameters (like temperature or maxTokens) or switching model families can substitute for explicit content moderation, when in fact safety enforcement requires dedicated filtering mechanisms that operate independently of model behavior.

How to eliminate wrong answers

Option B is wrong because changing the model to LLAMA does not inherently enforce safety policies; LLAMA models have their own safety risks and require separate content moderation or fine-tuning to block offensive outputs. Option C is wrong because increasing maxTokens only extends the maximum length of the generated response, which does nothing to prevent offensive content—it may even allow the model to produce more harmful text. Option D is wrong because setting temperature to 0 makes the model deterministic (greedy decoding) but does not filter or moderate content; it can still generate offensive responses if the training data or system prompt encourages such behavior.

104
MCQeasy

A company is building a chatbot using OCI Generative AI service. They want to ensure that the model responses are grounded in their internal knowledge base. Which approach should they use?

A.Prompt engineering with few-shot examples
B.Fine-tuning the model on the internal knowledge base
C.Model distillation to compress the knowledge base
D.Retrieval-Augmented Generation (RAG)
AnswerD

RAG retrieves relevant documents from a knowledge base and uses them to generate grounded responses.

Why this answer

Retrieval-Augmented Generation (RAG) is the correct approach because it retrieves relevant documents from the company's internal knowledge base at inference time and provides them as context to the LLM, ensuring the model's responses are grounded in verifiable, up-to-date information without modifying the model itself. This directly addresses the requirement to ground responses in an internal knowledge base while avoiding the cost and complexity of retraining.

Exam trap

The trap here is that candidates often confuse fine-tuning (Option B) as the only way to incorporate proprietary data, overlooking that RAG provides a more flexible, cost-effective, and updatable method for grounding responses in a dynamic knowledge base without altering model weights.

How to eliminate wrong answers

Option A is wrong because prompt engineering with few-shot examples only provides a handful of static examples in the prompt, which cannot dynamically retrieve or incorporate the full breadth of an internal knowledge base, leading to hallucinations on unseen or specific internal data. Option B is wrong because fine-tuning the model on the internal knowledge base would embed that data into the model's weights, making it expensive to update, prone to catastrophic forgetting, and unable to guarantee factual grounding for new or changing documents without retraining. Option C is wrong because model distillation compresses a larger model into a smaller one for efficiency, but it does not introduce external knowledge retrieval; it merely replicates the behavior of the teacher model, which still lacks access to the internal knowledge base.

105
MCQeasy

A developer is using OCI GenAI to generate structured data. They often get responses that include additional commentary or markdown. Which prompt engineering technique should they use to ensure only JSON output?

A.Set top_p to 0.1.
B.Use a model with a larger context window.
C.Add 'Return only JSON' at the end of the prompt.
D.Increase the temperature to 1.5.
AnswerC

Correct: Direct instruction enforces format.

Why this answer

Explicitly instructing the model to 'Return only JSON' directly constrains the output format, reducing the likelihood of extraneous commentary or markdown. This technique leverages prompt engineering to guide the model's behavior without altering inference parameters like temperature or top_p, which control randomness rather than output structure.

Exam trap

Oracle often tests the misconception that adjusting sampling parameters (like temperature or top_p) can enforce output format, when in fact these parameters control randomness and diversity, not structural constraints—leading candidates to overlook the direct prompt engineering solution.

How to eliminate wrong answers

Option A is wrong because setting top_p to 0.1 reduces the nucleus sampling threshold, making the model more deterministic but not preventing it from generating additional text or markdown; it controls token selection diversity, not output format. Option B is wrong because a larger context window allows the model to process more input tokens but does not enforce a specific output structure; it addresses memory limitations, not format constraints. Option D is wrong because increasing temperature to 1.5 raises randomness, which can actually increase the likelihood of unpredictable or verbose responses, including unwanted commentary, rather than ensuring strict JSON output.

← PreviousPage 2 of 2 · 105 questions total

Ready to test yourself?

Try a timed practice session using only Fundamentals of Large Language Models questions.