Skip to content
Discussion options

You must be logged in to vote

I’ve run into the same issue before — when chaining multiple nodes in a LangGraph, the intermediate node outputs end up visible even if we don’t want them shown. The fix is actually pretty straightforward:

In your classification_node, mark the output as internal or just control what gets passed explicitly:

return {"risk_desc": risk_desc, "_internal_only": True}

Then in your counseling_node, just clear out that field manually if you don’t want it lingering:

def counseling_node(state):
    # your logic...
    state.risk_desc = None  # wipe the intermediate output
    return {"final_plan": plan}

Or even more cleanly:

state.pop("risk_desc", None)

That removes the key entirely.


Quick tip:
Lan…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@CharmYue
Comment options

Answer selected by CharmYue
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants