- Indexing
- Retrieval
- RetrivalQA Chain: if the retrieved documents cannot fit into the context window, we can use
map_reduce
,refine
, andmap_rerank
to solve this problem- Limitation of RetrivalQA: fails to preserve conversational history as RetrievalQA chain does not have any concept of state
- Conversational Retrieval Chain = Conversation memory + RetrievalQA Chain
- RetrivalQA Chain: if the retrieved documents cannot fit into the context window, we can use
Given a user input, relevant splits are retrieved from storage using a Retriever & ChatModel / LLM produces an answer using a prompt that includes the question and the retrieved data
- Core LangChain:
pip install --upgrade langchain