Oracle Cloud Infrastructure 2024 Generative AI Professional — Question 2
Given the following code:
chain = prompt | llm
Which statement is true about LangChain Expression Language (LCEL)?
Answer options
- A. LCEL is a declarative and preferred way to compose chains together.
- B. LCEL is a programming language used to write documentation for LangChain.
- C. LCEL is a legacy method for creating chains in LangChain.
- D. LCEL is an older Python library for building Large Language Models.
Correct answer: A
Explanation
The correct answer, A, indicates that LCEL is designed to compose chains effectively, highlighting its declarative nature. Options B, C, and D are incorrect as they mischaracterize LCEL's purpose, suggesting it is for documentation, a legacy method, or an outdated library, which are not accurate descriptions of its function within LangChain.