GenAI Basics · Question 13 · Hard
Which order of steps is correct for answering a user question with a typical RAG pipeline?
- Generate the answer → embed the query → chunk the documents → retrieve chunks
- Embed the query → generate the answer → retrieve chunks → chunk the documents
- Retrieve chunks → chunk the documents → embed the chunks → generate the answer
- Chunk and embed the documents into a vector store → embed the user's query → retrieve the most similar chunks → add them to the prompt and generate the answer
Answer and explanation
Answer: D. Chunk and embed the documents into a vector store → embed the user's query → retrieve the most similar chunks → add them to the prompt and generate the answer
Explanation: The documents are indexed ahead of time by chunking, embedding and storing them. At query time, the query is embedded, the nearest chunks are retrieved and the LLM generates an answer grounded in them.
Previous: In a transformer model, what does the self-attention mechanism do? · Next: A model has a context window of 8,000 tokens, shared by the input and the…
Practise genai basics
Try a fresh set of genai basics questions with an explanation after every answer, free and without signing up: GenAI Basics practice. Or sit a full placement mock test.
More genai basics questions
- What is an LLM's context window?
- A company's product price list changes every day, and its chatbot must answer…
- In a transformer model, what does the self-attention mechanism do?
- A model has a context window of 8,000 tokens, shared by the input and the…
- What is the main pre-training objective of decoder-only (GPT-style) large…
- Asking an LLM to perform a task with only an instruction and no examples in…
- What mainly distinguishes generative AI from traditional predictive…
- In the model family name GPT, what does GPT stand for?
- Further training an already pre-trained model on a smaller, task-specific…
- A model that can accept both an image and a text question about that image…
More technical & programming practice
Pseudo-code · C Programming · Java · Python · Data Structures · Algorithms · Object-Oriented Programming · DBMS
LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge