# Free 1Z0-1158-26 practice questions

> 10 free 1Z0-1158-26 practice questions with the correct answer and an explanation.

Page: https://devopscodelab.com/exams/oracle-1z0-1158-26/free-practice-questions/
Practice exams: https://devopscodelab.com/exams/oracle-1z0-1158-26/

### Question 1 of 10

An assistant confidently cites a policy clause that does not exist. What is this behavior called, and what is a common mitigation?

- A. Prompt injection; add a content moderation guardrail in Block mode
- B. Tokenization error; switch to a model with a larger vocabulary
- C. Overfitting; increase the number of fine-tuning epochs on the policy documents
- D. Hallucination; ground answers in retrieved sources and require citations

**Answer:** D

**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

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?

- A. Short-term memory compaction with a low compact threshold only
- B. Background mode with response IDs, polling or stream resumption
- C. Chat Completions with streaming and a client-side retry loop
- D. Function calling with parallel_tool_calls disabled and a short timeout

**Answer:** B

**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

A team evaluates its agent only by checking whether the final answer is correct. Which additional evaluation dimension is MOST important for agents specifically?

- A. The number of characters in each answer compared with a reference answer
- B. The trajectory: whether the agent chose the right tools and arguments in a sensible order
- C. The average latency of the production endpoint measured under a synthetic load test before each release
- D. The model's general benchmark scores published by the model provider

**Answer:** B

**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

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?

- A. Uploading the examples to a vector store and attaching it with the file_search tool
- B. Full fine-tuning of all model weights on an on-demand model from the playground
- C. Adding all 5,000 examples to the system prompt of every request as few-shot examples
- D. Parameter-efficient fine-tuning, such as T-Few or LoRA, on a fine-tuning cluster

**Answer:** D

**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

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?

- A. A routing profile for the model with the selected regions, used as the model value
- B. A private endpoint in each region, connected to the others through remote peering connections
- C. A hosting dedicated AI cluster in each region behind an OCI load balancer
- D. A separate Generative AI project per region with failover in the client

**Answer:** A

**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

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?

- A. Fine-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
- B. Upload each PDF as an input_file on every request so the model reads the whole policy set in its context window
- C. Upload the PDFs with the Files API, attach them to a vector store, and add a file_search tool that references the vector store ID
- D. Expose the PDFs through a function tool that the application implements with its own keyword index and ranking logic

**Answer:** C

**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

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?

- A. Call the Responses API again with tool_choice set to none so that the model answers using only its training data
- B. Run the function itself and send a function_call_output item with the matching call_id in a follow-up Responses request
- C. Wait for the OCI Generative AI service to execute the function in a managed container and return the output automatically
- D. Register the function as a remote MCP server so that the pending call is replayed by the service on the next request

**Answer:** B

**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

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?

- A. Replace the OpenAI SDK with the OCI Python SDK GenerativeAiInferenceClient, because the Responses API is not reachable from the OpenAI SDK
- B. Set base_url to the OCI Generative AI management endpoint and pass the compartment OCID instead of a project OCID
- C. Set base_url to the regional OCI Generative AI inference endpoint ending in /openai/v1 and pass the project OCID in the project argument
- D. Keep the default OpenAI base URL and add an OCI region header so that OpenAI forwards the request into the tenancy

**Answer:** C

**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

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?

- A. A private endpoint for inbound access, because inbound and outbound traffic always use the same network path
- B. Custom (customer-managed) outbound networking that routes all egress through a chosen VCN and subnet
- C. Default service-managed outbound networking, plus an allow rule for the on-premises CIDR in the service gateway
- D. A public endpoint with an allowlist of the on-premises IP range, so that the API can call the agent instead

**Answer:** B

**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

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?

- A. Rely on the default guardrails that are applied to all foundational models automatically
- B. Create a hosting cluster endpoint for screening, because on-demand traffic cannot be evaluated
- C. Enable Block mode on the on-demand model in the Console, since guardrail modes apply to every model
- D. Call the ApplyGuardrails API with the prompt and act on the returned results in the application

**Answer:** D

**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.

Ready for a timed run? Take the free 15-question 1Z0-1158-26 mini exam: https://devopscodelab.com/app/exams/oracle-1z0-1158-26/mini/

DevOpsCode Lab is not affiliated with Oracle. 1Z0-1158-26 and related names are trademarks of their owners. We write every question ourselves; these are not real exam questions.
