🔥 3-day streak
Databricks Certified Generative AI Engineer Associate54 / 145
Question 54 of 145

You are building a LangChain (LCEL) chain that classifies incoming customer emails using a Databricks Foundation Model API endpoint. During a nightly job, you must process roughly 50,000 emails that are already loaded into a Python list. Your current code loops over the list and calls chain.invoke() once per email, but the job is too slow to finish within its window. Without changing the model or endpoint, what is the most appropriate way to improve throughput while keeping the same LCEL chain?

Reviewed for accuracy · Report an issueNext question