🔥 3-day streak
Databricks Certified Generative AI Engineer Associate57 / 145
Question 57 of 145
You are building a RAG chain with LangChain Expression Language (LCEL) on Databricks. Your chain retrieves context from a Vector Search index and formats a prompt that needs BOTH the retrieved context AND the user's original question. You write a retrieval step that takes the incoming question string, embeds it, and returns formatted document text. However, when you compose the chain, the prompt template's `{question}` variable ends up empty because the retriever consumed the input and only passed forward the document text. What is the most idiomatic LCEL construct to fix this so the prompt receives both the context and the original question?
Reviewed for accuracy · Report an issueNext question