LeetQuiz Logo
Privacy Policy•contact@leetquiz.com
© 2025 LeetQuiz All rights reserved.
Databricks Certified Generative AI Engineer - Associate

Databricks Certified Generative AI Engineer - Associate

Get started today

Ultimate access to all questions.


Comments

Loading comments...

What is the correct way to initialize an LLMChain with an OpenAI model using a prompt template?

prompt_template = "Tell me a {adjective} joke"
prompt = PromptTemplate(
    input_variables=["adjective"],
    template=prompt_template
)
llm = OpenAI()
llm_chain = LLMChain(prompt=prompt, llm=llm)
response = llm_chain.generate([{"adjective": "funny"}])

Real Exam
Community
LLeetQuiz



Powered ByGPT-5