Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Langgraph extension experiment #35

Open
wants to merge 18 commits into
base: dev
Choose a base branch
from

Conversation

helenCNode
Copy link
Collaborator

The langgraph branch tested a simple graph for making retrieval more sophisticated ('retrieval graph').

This branch tests a simple graph for commenting on or extending LLM results ('chat graph').

The following changes have been necessary in order to make the code as simple, flexible and comprehensible as possible for future development.

  • The State class representing inputs to graph nodes now inherits from LangGraph's MessagesState, which future collaborators will recognise easily from LangGraph documentation and examples
  • To enable this, the old Response class representing chain output has become CustomAIMessage, a class which inherits from LangChain's AIMessage
  • Within the graph, responses are now converted into CustomAIMessages and appended to state['messages']

The simple graph has a node which comments on whether the LLM response is likely to be using up-to-date information, based on context metadata.

I think future deployments need to avoid this split between retrieval and chat graphs and just have one graph representing the entire workflow.

@helenCNode helenCNode requested a review from beingkk January 8, 2025 17:21
@beingkk beingkk changed the base branch from langgraph to dev January 14, 2025 16:13
@beingkk
Copy link
Contributor

beingkk commented Jan 14, 2025

Hey @helenCNode just raising the attention that there are conflicts with the dev branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants