1Z0-1127-25 Practice Question: Building LLM Applications with RAG and Vector Search
A healthcare startup is building a chatbot that retrieves patient treatment guidelines using OCI Generative AI Service and OCI OpenSearch. They require that all retrieved documents are from approved sources only and that the system can explain which source was used for each response. Which combination of features should they implement?
⚠ Common exam trap
Many exam-takers assume semantic similarity or prompt engineering alone can enforce access control, but in RAG systems, retrieval-layer filtering is the only reliable way to restrict document access before the model sees the content.
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
✓
Add a metadata filter for source_type='approved' in the retrieval step and include document IDs in the context for the model.
It directly addresses both requirements: a metadata filter on `source_type='approved'` ensures only approved documents are retrieved from OpenSearch, and including document IDs in the context allows the model to cite the specific source for each response. This approach enforces access control at the retrieval layer while providing traceability, which is essential for compliance in healthcare applications.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Add a metadata filter for source_type='approved' in the retrieval step and include document IDs in the context for the model.
Why this is correct
Metadata filtering enforces source restriction; document IDs provide provenance.
- ✗
Rely on the vector search's cosine similarity to rank approved sources higher.
Why it's wrong here
Similarity ranking does not guarantee exclusion of non-approved sources.
- ✗
Use prompt engineering to ask the model to ignore non-approved sources.
Why it's wrong here
Prompting is not a reliable enforcement mechanism.
- ✗
Reduce the top-K value to limit the number of retrieved documents.
Why it's wrong here
Top-K limits count, not source.
Go deeper
Related to this question
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 →
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.