Free Databricks-Generative-AI-Engineer-Associate Actual Exam Questions - Question 3 Discussion
is getting an error.

Assuming the API key was properly defined, what change does the Generative AI Engineer need to
make to fix their chain?
A)

B)

C)

D)

Probably B makes the most sense here. The key issue seems to be that the prompt isn’t being passed as an argument when initializing the LLMChain, which is essential. Options A and D either don’t show the prompt explicitly passed or add extra steps that aren’t needed. Option C might be close, but B clearly shows the fix by including prompt=prompt in the chain constructor, so that should resolve the error.
C imo, since it explicitly adds the prompt argument when creating the LLMChain, fixing the error.
Maybe B, since it clearly shows passing the prompt as an argument to the chain constructor, which is necessary. The other options either miss this or add unnecessary complexity.
The issue looks like the prompt isn’t correctly linked when setting up the chain. Option C explicitly adds the prompt parameter in the LLMChain constructor, which is required for proper initialization. Options A and B don’t fully address the missing prompt argument, and D seems more verbose without adding value. So, C makes the most sense to avoid that error.
It’s B because it directly fixes the chain initialization by passing the prompt properly, keeping the code clean without overcomplicating things like in D. A and C miss this streamlined approach.
C imo, the problem looks like the prompt isn’t passed properly when creating the chain. Option C explicitly adds the prompt in the LLMChain constructor, which should fix the error. Options A and B are close but C’s syntax matches what I’ve seen in LangChain docs more closely. D seems to add extra steps that might not be needed here.
It’s A for me. The main problem seems to be that the prompt wasn’t explicitly included when creating the chain. Option A shows adding the prompt in the constructor, which matches the usual LangChain pattern. Options B and D also add the prompt but B uses a different method that’s a bit less standard, and D looks like an unnecessary extra step. So I’d say A directly fixes the missing prompt without complicating things.
B tbh, looks like the issue is with how the LLM chain is initialized. Option B adds the prompt in the constructor, fixing the error without extra complexity. D might work but seems a bit overdone.
D, the missing prompt parameter is causing the error in the chain setup.
D imo, looks like the chain setup is missing the prompt parameter.
Guessing C