LangChain
- Use LCEL (LangChain Expression Language) pipe syntax for composing chains — avoid legacy `LLMChain`. Separate prompt templates from chain logic. Use `RunnablePassthrough` and `RunnableParallel` for data flow control.
LangChain
- Use LCEL (LangChain Expression Language) pipe syntax for composing chains — avoid legacy `LLMChain`. Separate prompt templates from chain logic. Use `RunnablePassthrough` and `RunnableParallel` for data flow control.
- Use `ChatPromptTemplate.from_messages()` with system/human message tuples. Implement retrieval with `create_retrieval_chain` over raw similarity search. Use `with_structured_output()` for type-safe LLM responses. Always set `max_retries` and `request_timeout` on LLM clients. Use callbacks for logging/tracing, not inline print statements.