1Z0-1158-26
Free 1Z0-1158-26 practice questions
10 questions from our 1Z0-1158-26 practice tests, each with the correct answer and a written explanation. Read them with the answers shown, or switch to quiz mode and answer first.
Question 1 of 10, Applying Large Language Model Concepts
An assistant confidently cites a policy clause that does not exist. What is this behavior called, and what is a common mitigation?
- APrompt injection; add a content moderation guardrail in Block mode
- BTokenization error; switch to a model with a larger vocabulary
- COverfitting; increase the number of fine-tuning epochs on the policy documents
- DHallucination; ground answers in retrieved sources and require citations Correct answer
Answer and explanation: Fabricated but plausible content is hallucination, commonly mitigated by retrieval-augmented generation that grounds answers in source documents and requires citations. More fine-tuning epochs can worsen overfitting, prompt injection is a manipulation attack, and vocabulary size does not cause invented facts.
Question 2 of 10, Applying Agentic AI Concepts
A long-running research agent must survive client disconnects and run for many minutes. Which combination of Responses API features fits this agent's execution model?
- AShort-term memory compaction with a low compact threshold only
- BBackground mode with response IDs, polling or stream resumption Correct answer
- CChat Completions with streaming and a client-side retry loop
- DFunction calling with parallel_tool_calls disabled and a short timeout
Answer and explanation: Background mode runs the request asynchronously; the client keeps the response ID and polls or resumes the stream (if created with stream=true), so disconnects do not lose work. Chat Completions streaming needs a live connection, disabling parallel calls does not address duration, and compaction reduces context size rather than enabling asynchronous execution.
Question 3 of 10, Applying Agentic AI Concepts
A team evaluates its agent only by checking whether the final answer is correct. Which additional evaluation dimension is MOST important for agents specifically?
- AThe number of characters in each answer compared with a reference answer
- BThe trajectory: whether the agent chose the right tools and arguments in a sensible order Correct answer
- CThe average latency of the production endpoint measured under a synthetic load test before each release
- DThe model's general benchmark scores published by the model provider
Answer and explanation: Agent evaluation should also inspect trajectories (tool selection, arguments, step order and efficiency), because a correct final answer can hide unsafe or wasteful actions. Answer length and provider benchmarks say little about agent behavior, and endpoint latency under load is a performance metric rather than a measure of whether the agent acts correctly.
Question 4 of 10, Configuring OCI Enterprise AI Models
A team wants a model to follow a specific output style and domain terminology learned from 5,000 labeled examples while keeping training cost low. Which OCI approach fits?
- AUploading the examples to a vector store and attaching it with the file_search tool
- BFull fine-tuning of all model weights on an on-demand model from the playground
- CAdding all 5,000 examples to the system prompt of every request as few-shot examples
- DParameter-efficient fine-tuning, such as T-Few or LoRA, on a fine-tuning cluster Correct answer
Answer and explanation: OCI fine-tuning uses parameter-efficient methods such as T-Few and LoRA on a fine-tuning dedicated AI cluster, updating only a small set of weights, which lowers cost while teaching style and terminology. Full fine-tuning is not offered on on-demand models, retrieval supplies facts rather than learned style, and thousands of few-shot examples would not fit efficiently in each prompt.
Question 5 of 10, Configuring OCI Enterprise AI Models
A global retailer needs on-demand inference capacity that can spill over across several OCI regions in its realm when one region is busy, without hosting clusters. Which configuration fits?
- AA routing profile for the model with the selected regions, used as the model value Correct answer
- BA private endpoint in each region, connected to the others through remote peering connections
- CA hosting dedicated AI cluster in each region behind an OCI load balancer
- DA separate Generative AI project per region with failover in the client
Answer and explanation: Routing profiles route on-demand requests for a model across user-selected regions within the same realm, and the routing profile OCID is passed as the model. Private endpoints and peering control network paths, hosting clusters are dedicated capacity that the requirement excludes, and per-region projects plus client failover is extra custom logic.
Question 6 of 10, Building OCI Enterprise AI Agents
A developer must let an agent answer questions from 2,000 internal PDF policies using the OCI Responses API with the least custom retrieval code. Which approach should the developer take?
- AFine-tune a chat model on the PDFs with LoRA on a dedicated AI cluster so the policies become part of the model weights for every request
- BUpload each PDF as an input_file on every request so the model reads the whole policy set in its context window
- CUpload the PDFs with the Files API, attach them to a vector store, and add a file_search tool that references the vector store ID Correct answer
- DExpose the PDFs through a function tool that the application implements with its own keyword index and ranking logic
Answer and explanation: The File Search tool retrieves content from files in a vector store during response generation, so uploading through the Files API, adding the files to a vector store and declaring {"type":"file_search","vector_store_ids":[...]} gives retrieval without custom code. Sending all PDFs as input files exceeds per-request file limits and wastes tokens. Fine-tuning does not reliably inject document facts and is costly to refresh, and a hand-built function tool means writing and maintaining the retrieval yourself.
Question 7 of 10, Building OCI Enterprise AI Agents
An agent uses a function tool named get_order_status. The model's response contains a function_call item. What must the application do next so the model can finish its answer?
- ACall the Responses API again with tool_choice set to none so that the model answers using only its training data
- BRun the function itself and send a function_call_output item with the matching call_id in a follow-up Responses request Correct answer
- CWait for the OCI Generative AI service to execute the function in a managed container and return the output automatically
- DRegister the function as a remote MCP server so that the pending call is replayed by the service on the next request
Answer and explanation: With function calling the model only requests the call; the application executes its own function and returns a function_call_output carrying the same call_id, either with previous_response_id (service-managed state) or by resending the conversation (client-managed state). OCI does not execute local application functions, unlike the hosted Code Interpreter. Forcing tool_choice none discards the needed data, and converting the function to MCP does not replay an outstanding call.
Question 8 of 10, Building OCI Enterprise AI Agents
A team is porting a Python agent written against the OpenAI SDK so that it runs on OCI Enterprise AI with the OCI Responses API. Which change to the client construction is required for the calls to succeed?
- AReplace the OpenAI SDK with the OCI Python SDK GenerativeAiInferenceClient, because the Responses API is not reachable from the OpenAI SDK
- BSet base_url to the OCI Generative AI management endpoint and pass the compartment OCID instead of a project OCID
- CSet base_url to the regional OCI Generative AI inference endpoint ending in /openai/v1 and pass the project OCID in the project argument Correct answer
- DKeep the default OpenAI base URL and add an OCI region header so that OpenAI forwards the request into the tenancy
Answer and explanation: The OCI Responses API is OpenAI-compatible: the OpenAI SDK is pointed at https://inference.generativeai.<region>.oci.oraclecloud.com/openai/v1 and a project OCID is supplied, because projects are required for OCI OpenAI-compatible calls. Oracle recommends the OpenAI SDK rather than the OCI SDK for this API. OpenAI's own endpoint never forwards traffic into OCI, and the management (control-plane) endpoint with a compartment OCID does not serve /responses.
Question 9 of 10, Building and Deploying Hosted Agents
A hosted agent must call an on-premises inventory API reachable only through the company's VCN and FastConnect. Which networking configuration is required on the application?
- AA private endpoint for inbound access, because inbound and outbound traffic always use the same network path
- BCustom (customer-managed) outbound networking that routes all egress through a chosen VCN and subnet Correct answer
- CDefault service-managed outbound networking, plus an allow rule for the on-premises CIDR in the service gateway
- DA public endpoint with an allowlist of the on-premises IP range, so that the API can call the agent instead
Answer and explanation: Custom (customer-managed) outbound networking routes all egress through a VCN and subnet via a private endpoint connection, which gives access to networks connected to that VCN such as on-premises via FastConnect. Default outbound networking reaches OCI services and the internet only. Inbound endpoint access is a separate setting, and reversing the call direction does not meet the requirement.
Question 10 of 10, Governing and Optimizing OCI Enterprise AI
An application uses an on-demand model and must screen user prompts for prompt injection and PII before sending them to the model. How can this be done?
- ARely on the default guardrails that are applied to all foundational models automatically
- BCreate a hosting cluster endpoint for screening, because on-demand traffic cannot be evaluated
- CEnable Block mode on the on-demand model in the Console, since guardrail modes apply to every model
- DCall the ApplyGuardrails API with the prompt and act on the returned results in the application Correct answer
Answer and explanation: For on-demand models, the ApplyGuardrails API evaluates content for content moderation, prompt injection, PII and more, and the application decides what to do with the results. Inform and Block modes apply only to dedicated cluster endpoints, and guardrails are not applied to foundational models by default beyond basic output filtering.