Databricks Generative AI Engineer Associate Question 99
Single answerYou are tasked with building a Generative AI application that integrates with a large language model (LLM) to provide contextual answers to user queries by pulling relevant data from your organization's internal documents. Which LangChain tool or feature would be most appropriate to achieve this functionality?
- A
Retrieval-Augmented Generation (RAG) with a vector database
- B
LangChain's Prompt Templates for crafting prompts
- C
LangChain's Agent and Tool framework for API calls
- D
LangChain's Chain-of-Thought (CoT) reasoning
Show answer and explanation
Correct answer: A
Explanation
To build a Generative AI application that retrieves relevant context from internal documents for user queries, Retrieval-Augmented Generation (RAG) is the most appropriate approach. LangChain supports RAG workflows by integrating with vector databases to store and retrieve embeddings of internal documents. Prompt Templates, API agents, and CoT reasoning are useful in other contexts but do not address the specific need for document retrieval and contextualization.
- A. Correct.
This is correct. Retrieval-Augmented Generation (RAG) with a vector database allows you to retrieve relevant context from internal documents and combine it with the generative capabilities of an LLM to provide accurate answers.
- B. Incorrect.
This is incorrect. While crafting prompts using LangChain's Prompt Templates is useful for defining how the LLM interacts, it does not specifically address retrieving relevant data from internal documents.
- C. Incorrect.
This is incorrect. LangChain's Agent and Tool framework is ideal for executing API calls or interacting with external services but does not focus on retrieving and integrating internal document data.
- D. Incorrect.
This is incorrect. Chain-of-Thought (CoT) reasoning is a technique to improve logical reasoning in LLMs but is unrelated to retrieving or contextualizing data from documents.