Memory & Conversation Chain | Chain Types | Learning Langchain Series | Tutorial on 4 Memory Types
Вставка
- Опубліковано 9 лип 2024
- Github Code for this video:
github.com/full-stack-ai/popu...
Learn how to work with 4 types of Memories in Langchain using Conversation Chain.
Conversation chain is very useful when you build your QA Chatbot or you have a conversational Search mechanism using LLMs.
Knowledge Graph Memory is one of the most efficient methods to store lots of information in a low space memory and take advantage of LLMs interpretation to generate sentences out of the keywords from the knowledge graph.
aibrain.com/memory-graph/
I highly recommend do watch my other videos on other chain types from langchain:
- API CHAIN | • API Chain | Chain Type...
- CONSTITUTIONAL CHAIN | • CONSTITUTIONAL CHAIN |...
- RAG CHAIN | • RETRIEVAL CHAIN - RAG ...
- CHECKER CHAIN | • LLM CHECKER CHAIN | Le...
- ROUTER CHAIN | • ROUTER CHAIN | Learnin...
- SEQUENTIAL CHAIN | • SEQUENTIAL CHAIN | Lea...
Follow us on:
UA-cam: / @fullstackai24
Twitter: / fullstackinfoai
LinkedIn: / fullstackaialta
Join Discord: / discord
#langchain #ai #llm #python #conversation #chain #chatgpt #chatbot #openai #education #coding #artificialintelligence #machinelearning #fullstack #backend #largelanguagemodels #nlp #naturallanguageprocessing
------
Chapters:
0:00 Intro
0:12 What is Memory in Langchain?
1:02 Set up Virtual Environment
1:42 Working with ConversationBufferMemory from Langchain
3:34 What is under the hood for chat_memory and BaseChatMessageHistory
5:39 Install PyKernel for Jupyter Notebook
6:08 Return Memory's chat history
7:23 Build Conversation Chain from Langchain
7:53 Import Libraries
11:20 Construct LLM Model with OpenAI API
11:46 Construct Prompt Template
13:33 Construct Memory
14:08 Construct the Conversation Chain Object
16:28 Test the chain on ConversationBufferMemory
18:43 Test the chain on ConversationSummaryMemory
19:57 Test the chain on ConversationBufferWindowMemory
21:50 Test the chain on Conversation Knowledge Graph Memory
23:17 Recap
23:44 Thank you! - Наука та технологія