How to plan a graph? how to plan an entire conversation? #558
Unanswered
supersam-portal
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm recently encounter some issue building a project and start to think about how to orchestrate the agent into curate a conversation flow.
So here's a brief project summary:
The project is basically a chatbot that will guide user to integrate some 3rd party login (send a certain tag by function return so it show up in frontend as a button to click and finish SSO), think like google SSO to access google drive. Once the llm has access to the external system like google, it should be able to do something useful like have conversation about the data from the external system.
It seems simple at first, but the llm's behavior is not always very reliable. because when llm decide to invoke a function, it's actually have 3 steps
user input -> llm 1 -> fn() -> llm 2-> output to user
and say if llm choose the right fn with right parameter, i get a return like Connect!. but the second llm call see this button and consider that as a user input and thought user already connected. Then the output of the llm 2 will try to directly invoke the fn to use the connection token to retrieve the data from google, but function would fail because connection haven't been established.
This was using ancient agent executor. I know there is
return_direct=True
but it won't allow when there are multple tools and some wants return direct and some will not return direct.So I start explore langgraph coz it seems to give me more granular control. however, as it become more flexible, i do have to design more components, design the nodes functionality and how edges connect these nodes. I also realized that even the graph can be complex, it's still just one round of conversation and it has to be able to be able to fit in the entire life cycle of the conversation. In the case of this project there are 2 states in the life cycle: 1. the connection stage 2. reporting stage. But potentially it can have a lot more stages in the future.
So I'm not sure if the community has any good article or guidance on how I should plan this graph? and what are some of the techniques that can help langgraph "remembers" the states of the conversation?
Beta Was this translation helpful? Give feedback.
All reactions