- A
Pre-generate embeddings for all documents during ingestion and store them in the vector database, so at query time only the query embedding is generated and compared.
This eliminates the need to generate embeddings for each document during the query path, drastically reducing latency.
- B
Implement a caching layer with Redis to store previous query results and serve cached responses for identical queries.
Why wrong: Caching only helps for repeated queries; most patient queries are unique, so cache hit rate will be low.
- C
Reindex the OpenSearch vector index with optimal settings (e.g., HNSW algorithm, ef_search param) to speed up vector search.
Why wrong: While this may slightly improve search speed, the main bottleneck is embedding generation (8-10s), not search (5-7s).
- D
Switch to a faster embedding model like Cohere Embed v3 (English) which has lower latency.
Why wrong: Switching models may reduce embedding time slightly but still requires a synchronous API call per query, so latency remains high.
Quick Answer
The answer is to pre-generate embeddings for all documents during ingestion and store them in the vector database. This directly eliminates the 8-10 second embedding generation bottleneck at query time, reducing overall latency to only the time needed for generating the single query embedding and performing the vector search. On the Oracle Cloud Infrastructure Generative AI Professional 1Z0-1127 exam, this scenario tests your understanding of optimizing RAG latency by pre-computing embeddings, where the trap is to focus on compute scaling or connection pooling rather than addressing the root cause of redundant per-query document embedding. The key insight is that document embeddings are static and only need to be computed once during ingestion, while the query embedding must still be generated fresh each time. A useful memory tip: think of pre-computed embeddings as a pre-indexed library catalog—you wouldn’t re-catalog every book each time a patron asks a question, so don’t re-embed every document at query time.
1Z0-1127 Practice Question: Building LLM Applications with RAG and Vector Search
This 1Z0-1127 practice question tests your understanding of building llm applications with rag and vector search. Examine the command output carefully: the correct answer depends on what the output actually shows, not on general recall alone. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
A healthcare company is building a RAG-based chatbot to answer patient queries using medical documents stored in OCI Object Storage. They use OCI Generative AI service with Cohere Command R+ model and OCI OpenSearch as the vector database. The chatbot is deployed on OCI Compute with a Flask application. After deployment, the latency for each query is 15-20 seconds, which is unacceptable. Logs show that the embedding generation step (using OCI Generative AI embedding API) takes 8-10 seconds, and the vector search in OpenSearch takes 5-7 seconds. The team has already enabled connection pooling and increased the compute instance shape to the maximum allowed. Which action would MOST effectively reduce the overall latency?
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
Pre-generate embeddings for all documents during ingestion and store them in the vector database, so at query time only the query embedding is generated and compared.
The primary bottleneck is the embedding generation step (8-10 seconds). By pre-generating embeddings for all documents during ingestion and storing them in the vector database, the query-time embedding generation is eliminated, reducing the per-query latency to only the time needed to generate the query embedding and perform the vector search. This directly addresses the largest contributor to the 15-20 second latency.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Pre-generate embeddings for all documents during ingestion and store them in the vector database, so at query time only the query embedding is generated and compared.
Why this is correct
This eliminates the need to generate embeddings for each document during the query path, drastically reducing latency.
Related concept
Read the scenario before looking for a memorised answer.
- ✗
Implement a caching layer with Redis to store previous query results and serve cached responses for identical queries.
Why it's wrong here
Caching only helps for repeated queries; most patient queries are unique, so cache hit rate will be low.
- ✗
Reindex the OpenSearch vector index with optimal settings (e.g., HNSW algorithm, ef_search param) to speed up vector search.
Why it's wrong here
While this may slightly improve search speed, the main bottleneck is embedding generation (8-10s), not search (5-7s).
- ✗
Switch to a faster embedding model like Cohere Embed v3 (English) which has lower latency.
Why it's wrong here
Switching models may reduce embedding time slightly but still requires a synchronous API call per query, so latency remains high.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates may focus on optimizing the vector search or caching responses, but the real bottleneck is the embedding generation step, which must be eliminated at query time through pre-generation during ingestion.
Detailed technical explanation
How to think about this question
Pre-generating embeddings is a common pattern in production RAG systems where documents are static or infrequently updated. The Cohere Command R+ model's embedding API can be called during a batch ingestion pipeline, and the resulting vectors are stored in OpenSearch as indexed fields. At query time, only the user query needs to be embedded (a single API call), and the vector search compares this query embedding against the pre-computed document embeddings, drastically reducing latency. This approach also allows for offline optimization of embedding generation, such as batching and retry logic, without affecting user-facing response times.
KKey Concepts to Remember
- Read the scenario before looking for a memorised answer.
- Find the constraint that changes the correct option.
- Eliminate answers that are true in general but not in this case.
TExam Day Tips
- Watch for words such as best, first, most likely and least administrative effort.
- Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A small business has 20 workstations on the 192.168.1.0/24 network and one public IP from its ISP. The router uses PAT (NAT overload) so all 20 devices share one public address using different source ports. NAT questions test whether you understand the four address terms and which direction each translation applies.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
- →
Building LLM Applications with RAG and Vector Search — study guide chapter
Learn the concepts, then practise the questions
- →
Building LLM Applications with RAG and Vector Search practice questions
Targeted practice on this topic area only
- →
All 1Z0-1127 questions
500 questions across all exam domains
- →
Oracle Cloud Infrastructure Generative AI Professional 1Z0-1127 study guide
Full concept coverage aligned to exam objectives
- →
1Z0-1127 practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related 1Z0-1127 practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Fundamentals of Large Language Models practice questions
Practise 1Z0-1127 questions linked to Fundamentals of Large Language Models.
Using OCI Generative AI Service practice questions
Practise 1Z0-1127 questions linked to Using OCI Generative AI Service.
Building LLM Applications with RAG and Vector Search practice questions
Practise 1Z0-1127 questions linked to Building LLM Applications with RAG and Vector Search.
Deploying and Managing Generative AI on OCI practice questions
Practise 1Z0-1127 questions linked to Deploying and Managing Generative AI on OCI.
1Z0-1127 fundamentals practice questions
Practise 1Z0-1127 questions linked to 1Z0-1127 fundamentals.
1Z0-1127 scenario practice questions
Practise 1Z0-1127 questions linked to 1Z0-1127 scenario.
1Z0-1127 troubleshooting practice questions
Practise 1Z0-1127 questions linked to 1Z0-1127 troubleshooting.
Practice this exam
Start a free 1Z0-1127 practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this 1Z0-1127 question test?
Building LLM Applications with RAG and Vector Search — This question tests Building LLM Applications with RAG and Vector Search — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: Pre-generate embeddings for all documents during ingestion and store them in the vector database, so at query time only the query embedding is generated and compared. — The primary bottleneck is the embedding generation step (8-10 seconds). By pre-generating embeddings for all documents during ingestion and storing them in the vector database, the query-time embedding generation is eliminated, reducing the per-query latency to only the time needed to generate the query embedding and perform the vector search. This directly addresses the largest contributor to the 15-20 second latency.
What should I do if I get this 1Z0-1127 question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jun 24, 2026
This 1Z0-1127 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 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.