Build an Agent with Long-Term, Personalized Memory

  Рет қаралды 26,742

Deploying AI

Deploying AI

Күн бұрын

This video explores how to store conversational memory similar to ChatGPT's new long-term memory feature.
We'll use LangGraph to build a simple memory-managing agent to extract pertinent information from a conversation and store it as long-term memory via parallel tool calling.
Interested in talking about a project? Reach out!
Email: christian@botany-ai.com
LinkedIn: linkedin.com/in/christianerice
Timestamps:
0:00 - Intro
0:16 - Memory Demo
3:21 - Approaches to Adding Memory
9:59 - Code Walkthrough
19:54 - Optimizations
Follow along with the code on GitHub:
github.com/christianrice/demo...

Пікірлер: 45
@joao.morossini
@joao.morossini 2 ай бұрын
Excelent content! Thanks for sharing, man :D
@jacobgoldenart
@jacobgoldenart 4 ай бұрын
Great code walk through. I'm working on something similar so it was cool to see how you approached it. Thanks for sharing.
@deployingai
@deployingai 3 ай бұрын
That's awesome! I'd love to hear what approach ends up working for you
@ratral
@ratral 4 ай бұрын
Thanks for the excellent idea and explanation.
@deployingai
@deployingai 3 ай бұрын
Thanks for watching!
@m4tthias
@m4tthias 4 ай бұрын
Nice. Look similar to Autogen's teachable agent. Appreciate your work.
@deployingai
@deployingai 3 ай бұрын
Thanks for sharing, you're totally right. I just read through their code, it was interesting to see their prompt methods and how they implemented their memory store! Cool feature
@mr.daniish
@mr.daniish 4 ай бұрын
Super loaded tutorial 🎉
@jeremybristol4374
@jeremybristol4374 4 ай бұрын
We were just talking about this issue. All of these chat UI's treat content as if it's disposable. What works in text messaging between two people doesn't translate as well when working with computers, not if the information has utility value. This is great!
@dinugakasun5218
@dinugakasun5218 Ай бұрын
Superb content, Thanks for sharing ✨
@weiwei6111
@weiwei6111 3 ай бұрын
Dude, your video help me a lot, THANKS!!!
@deployingai
@deployingai 3 ай бұрын
That's awesome, glad to hear it!
@JulianHarris
@JulianHarris 3 ай бұрын
This is so great: structured data extraction from conversations is something I’m also working on. And by the way: congrats: you have a better like-to-view ratio than MrBeast, at 4%. 🚀
@deployingai
@deployingai 3 ай бұрын
That's cool, thanks for sharing! I'd love to hear the approach that ends up working for you.
@PaulFischerclimbs
@PaulFischerclimbs 3 ай бұрын
Thanks for sharing 👍
@madelles
@madelles 4 ай бұрын
Hey thanks for this. Very nice to see an actual application build up like this. I will most certainly come back for more. I would be interested in seeing you set up a more corporate oriented use case. What if a free text field in a form contains information relevant to a sign up for a a services or something like that
@talhaanwar2911
@talhaanwar2911 3 ай бұрын
your miro drawing skills are next level thing
@thawab85
@thawab85 3 ай бұрын
i have a suspicion that @deployingai is creating AI videos to showcase his miro skills.
@deployingai
@deployingai 2 ай бұрын
Haha thanks!
@benjaminbascary8219
@benjaminbascary8219 2 ай бұрын
Can you share the vite front end? or how you setted up the front and the backend?
@jackmartin1146
@jackmartin1146 4 ай бұрын
Hello this is so cool, is it possible to share the full code including backend/front-end code as well, would love to try this, thanks so much!
@MCroppered
@MCroppered 3 ай бұрын
lol
@maskedvillainai
@maskedvillainai 3 ай бұрын
Hahahahahahah
@khushpatel7060
@khushpatel7060 3 ай бұрын
This is amazing, I creating something similar, Now I will use sentinal approach. btw, I would like ask, where can i find the frontend?
@adventurelens001
@adventurelens001 4 ай бұрын
Wow, this is super cool. Could something like this be applied to using an LLM to code a web app? One of my problems right now is that I'm using gpt4 to help code a project but before I can get through it, the context window creeps in and it starts to return incorrect code.
@akashdeb9823
@akashdeb9823 4 ай бұрын
I think I missed this in the memgpt paper but summarizing and storing attributes in long term memory and then refetching it for the context window is also likely going to increase the latency of the main response
@deployingai
@deployingai 3 ай бұрын
Agreed, that's something you would need to monitor for sure. For this version, I chose to just pass the memories along in the request so they wouldn't delay the response, but that will break down once the memory store gets to a point where you need to trim it. I think you could always pre-fetch the entire condensed form of the conversational memory ahead of the user's request, but it might be hard to pre-fetch just the memories relevant to the new query in the small window of time between when the person finishes their message and submits their request. Someone pointed out AutoGen's Teachable Agent approach to memory management, and they warn: "Note that this adds extra LLM calls involving a relatively small number of tokens, which can add a few seconds to the time a user waits for each response." But it looks like their approach adds multiple calls before and after the main request, which are all blockers to a response.
@unclecode
@unclecode 2 ай бұрын
Great work, don't you mind to share the code for front end? ;)
@tharunbhaskar6795
@tharunbhaskar6795 4 ай бұрын
Interesting. Subscribed. By the way, can I get the source code for the UI. It looks pretty neat and clean
@deployingai
@deployingai 3 ай бұрын
Great, thanks for watching! I'll need to clean it up a bit, but I'll share it when I have a chance. I used Radix UI and Tailwind for this demo, so they made this very easy to throw together.
@jackmartin1146
@jackmartin1146 3 ай бұрын
Hello@@deployingai possible to share the code now?
@kayalvizhi8174
@kayalvizhi8174 Ай бұрын
Did you forget to add the graphQl frontend code to Github ?
@zhrannnnn
@zhrannnnn 3 ай бұрын
Cool channel & video!! May I ask how long it took in order to get some views on your videos? Did you got views within 24 hours? Or did you start to get some views after X uploads?
@deployingai
@deployingai 2 ай бұрын
Hey thanks for watching! I've only published a handful of videos so I don't have much info for you, but the first few were definitely pretty quiet.
@michaelbuloichyk8986
@michaelbuloichyk8986 3 ай бұрын
How do you store the memories ? I prabably implemented it wrong, I did a while loop with input, now trying to come up with a solution of how to actually store the messages in the memory
@michaelbuloichyk8986
@michaelbuloichyk8986 3 ай бұрын
Can you share the details about how you implemented vectorDB in the loop? Would love to see the code. Much love, appreciate the effort of making the video. thanks!
@deployingai
@deployingai 3 ай бұрын
In my demo, I set up a backend using Supabase's Postgres database. The agent writes the memories directly to the database, and I stream the memories from the database to the frontend to instantly see updates. And since I have the memories available already in the frontend, I just use those in my requests to the LLM so that I can avoid having to make a request to my db before every new request to the LLM.
@gary3548
@gary3548 Ай бұрын
“I won’t go through how I actually built the application” what’s the point ? I switched off here.
@squiddymute
@squiddymute 3 ай бұрын
great, now do this with an open source LLM
@cluelesssoldier
@cluelesssoldier 4 ай бұрын
13:38 - Did... Did you just bribe and / or threaten your LLM to produce better results? lmao
@akashdeb9823
@akashdeb9823 4 ай бұрын
He was also compassionate and asked the LLM to take a deep breath
@cluelesssoldier
@cluelesssoldier 3 ай бұрын
I loved that part, as well! lol@@akashdeb9823
@deployingai
@deployingai 3 ай бұрын
Ha! Is it weird that I feel guilty about it now? Thanks for pointing this out, you sent me down a rabbit hole of great papers on prompting techniques and a new idea I want to try out. If it works I'll share a video! I really liked this paper on eccentric prompts: arxiv.org/pdf/2402.10949.pdf
@cluelesssoldier
@cluelesssoldier 3 ай бұрын
@@deployingai Can’t wait to see what else you come up with! After reviewing that document on eccentric prompts, it actually has me thinking I need to employ more ToT prompting into my own applications… 🤔
LangGraph Deep Dive: Agents with Parallel Function Calling
25:57
Deploying AI
Рет қаралды 4,8 М.
Memory in LLM Applications
16:16
Weights & Biases
Рет қаралды 6 М.
MEU IRMÃO FICOU FAMOSO
00:52
Matheus Kriwat
Рет қаралды 39 МЛН
World’s Deadliest Obstacle Course!
28:25
MrBeast
Рет қаралды 149 МЛН
Smart Sigma Kid #funny #sigma #comedy
00:25
CRAZY GREAPA
Рет қаралды 8 МЛН
My ChatGPT 4 Workflow & Tips as a Software Engineer
4:52
Marko
Рет қаралды 629 М.
Easiest way to build LLM apps - Langflow 1.0 demo and deep dive!
1:00:51
Mind-maps and Flowcharts in ChatGPT! (Insane Results)
13:05
AI Foundations
Рет қаралды 309 М.
AI Pioneer Shows The Power of AI AGENTS - "The Future Is Agentic"
23:47
Stop paying for ChatGPT with these two tools | LMStudio x AnythingLLM
11:13
Python RAG Tutorial (with Local LLMs): AI For Your PDFs
21:33
pixegami
Рет қаралды 130 М.
LangChain: Giving Memory to LLMs
15:48
Prompt Engineering
Рет қаралды 20 М.
Lid hologram 3d
0:32
LEDG
Рет қаралды 10 МЛН
ИГРОВОВЫЙ НОУТ ASUS ЗА 57 тысяч
25:33
Ремонтяш
Рет қаралды 303 М.
Best mobile of all time💥🗿 [Troll Face]
0:24
Special SHNTY 2.0
Рет қаралды 1,6 МЛН
Low Price Best 👌 China Mobile 📱
0:42
Tech Official
Рет қаралды 718 М.
После ввода кода - протирайте панель
0:18