Courseiva
Prompt EngineeringhardMultiple ChoiceObjective-mapped

1Z0-1127-25 Prompt Engineering Practice Question

A developer is using Cohere Command R+ via OCI Generative AI and wants to ground answers in a provided set of documents using the `documents` parameter. Which prompt structure ensures the model correctly adheres to the documents?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Use a preamble: 'You answer questions based only on the provided documents. If the answer is not in the documents, say you don't know.' Then pass documents via the `documents` parameter in the request

Cohere's document-grounded generation requires the preamble to instruct the model to answer based solely on the documents, and the conversation history must include the documents in the correct format.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use a preamble: 'You answer questions based only on the provided documents. If the answer is not in the documents, say you don't know.' Then pass documents via the `documents` parameter in the request

    Why this is correct

    This matches Cohere's best practice: a clear preamble instruction plus the `documents` parameter.

  • Set a system prompt that says 'You are a helpful assistant' and pass documents in the `documents` parameter with no further instruction

    Why it's wrong here

    The model may ignore documents without an explicit instruction to ground answers in them.

  • Place the documents in the conversation history as an assistant message before the user's question

    Why it's wrong here

    Documents are not typically placed in conversation history; they belong in the `documents` parameter.

  • Include the documents in the user message after the question

    Why it's wrong here

    Documents should be passed via the dedicated `documents` parameter, not inline in the user message.

About these practice questions

One of 768 original 1Z0-1127-25 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 1Z0-1127-25 practice question is part of Courseiva's free Oracle certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 1Z0-1127-25 exam.