🔥 3-day streak
Databricks Certified Generative AI Engineer Associate109 / 145
Question 109 of 145

A Generative AI Engineer is building a RAG chain with LangChain Expression Language (LCEL) on Databricks. They have a retriever that returns a list of Document objects and a ChatPromptTemplate that expects a single string variable named 'context'. When they wire the retriever output directly into the prompt template, the model receives a raw list of Document objects instead of clean text, producing malformed prompts. What is the most appropriate way to fix this in the LCEL chain?

Reviewed for accuracy · Report an issueNext question