惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LINUX DO - 热门话题
Stack Overflow Blog
Stack Overflow Blog
B
Blog
WordPress大学
WordPress大学
Project Zero
Project Zero
P
Palo Alto Networks Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - 司徒正美
有赞技术团队
有赞技术团队
S
SegmentFault 最新的问题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
小众软件
小众软件
T
Tailwind CSS Blog
Forbes - Security
Forbes - Security
F
Full Disclosure
SecWiki News
SecWiki News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Hacker News: Ask HN
Hacker News: Ask HN
C
Check Point Blog
Microsoft Security Blog
Microsoft Security Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
F
Fortinet All Blogs
Cisco Talos Blog
Cisco Talos Blog
G
Google Developers Blog
J
Java Code Geeks
Google DeepMind News
Google DeepMind News
人人都是产品经理
人人都是产品经理
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recorded Future
Recorded Future
O
OpenAI News
Spread Privacy
Spread Privacy
MongoDB | Blog
MongoDB | Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
C
Cybersecurity and Infrastructure Security Agency CISA
S
Securelist
V
Vulnerabilities – Threatpost
Y
Y Combinator Blog
IT之家
IT之家
U
Unit 42
腾讯CDC
S
Security Affairs
C
Cisco Blogs
Schneier on Security
Schneier on Security
The Last Watchdog
The Last Watchdog
B
Blog RSS Feed
宝玉的分享
宝玉的分享
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Security @ Cisco Blogs
Cyberwarzone
Cyberwarzone
T
The Blog of Author Tim Ferriss

LangChain Forum - Topics tagged intro-to-langgraph

Null-drift: A bare-metal O(1) Memory Store for continuous LangGraph agents Interrupt does not work correctly in LangGraph Pre-interrupt() code re-runs on resume — anti-pattern, or is there a sanctioned way to detect resume? Would pre-inference routing help long-context agent workflows? Improving citation accuracy and reducing hallucinations in custom Parent-Child RAG pipeline (Gemma3:4B + FAISS+BM25 + Cross-encoder reranker) WikipediaLoader endup in JSONDecodeError Using LangGraph interrupt for multi-step wizards with branching — right tool or wrong abstraction? Built NORNR for spend governance in agent workflows LangGraph + PostgreSQL: Chat history and summarization best practice Discussion about why LangGraph JS ToolNode doesn’t inject ToolRuntime.state like Python does, and what the correct workaround or intended design pattern is. No cost displayed in LangSmith when using LiteLLM + LangGraph LiteLLM Router in LangChain: Missing Model Name and Cost in LangSmith Traces I find langgraph chat in documents useful, how can I hook it up as mcp or skill or a tool for the Claude Code? Can I get User IDs and Bot IDs of bots used in Slack channels for personal projects [Docs/Cookbook] Request to add a design pattern for "Package-Skill" with internal retries Using the useStream frontend API with custom FastAPI backend When is it actually a failure? Diagnosing agent behavior beyond LangGraph traces Can the input and output of deep_agent's sub-agents be output in streaming mode? Complete context compression through middleware Feedback Wanted: My Structured Multi-Agent Research Assistant (Inspired by LangGraph Academy) Problems encountered when study is interrupted Can you provide a learning roadmap for LangChain and LangGraph suitable for beginners? What is the return type of StateGraph.compile()? Does the cache param do anything when using create_agent? Issues about the entry points of RAG knowledge Is the way RAG stores retrieved information in the state also just by directly concatenating it like historical memory? Regarding whether the knowledge base recall can be excluded from the context and used as a node-level system prompt for the response model Extending LangSmith Auto Cost Tracking to Include Agent API Calls Best Practice for Assigning MCP Tools to Sub-Agents in a Multi-Tool MCP Server? Reducing Latency in GPT-5: Controlling Reasoning in LangChain Pattern for Persisting Structured Agent Outputs in LangGraph State (Instead of ToolMessage History) Langchiain deep_agent very slowly Stopping endpoint for deep agents Clarification on Official Container Images, Supported Python Versions, and the Recommended LangGraph Deployment Path Create_agent : Tool Invocation Failure in LangGraph Agent Chat model returns empty content when I inject a delayed ToolMessage from a scheduled callback Are dynamic tool lists allowed when using create_agent? Files in Agent Chat Make a llm.with_structured_output call a tool Seeking help with some merge message issues when LangGraph is called in parallel - LangGraph - LangChain Forum
Advice for implementing complex Customer AI HealthCare Assistant
razaullah · 2026-02-15 · via LangChain Forum - Topics tagged intro-to-langgraph

Hi @razaullah

This is a really solid and realistic healthcare use case. You’re right to be concerned about reliability, especially for booking flows where steps are mandatory and can’t be skipped.

Based on similar structured workflows I’ve worked on, I’d suggest slightly shifting the architecture rather than relying fully on a supervisor + sub-agent setup.

1. Supervisor + Sub-Agents

That pattern is powerful for reasoning-heavy or open-ended tasks, but for deterministic, step-by-step flows (like booking), it can become unpredictable. LLMs are probabilistic planners, so they may occasionally skip or reorder steps.

For booking pipelines, I would strongly recommend using LangGraph with explicit state and controlled transitions.

2. Move Booking to a State-Driven LangGraph

Instead of letting a supervisor decide the flow dynamically, define a state object and explicit nodes.

Example state:

from typing import TypedDict, Optional

class BookingState(TypedDict):

patient_id: str

symptoms: Optional\[str\]

hospital_id: Optional\[str\]

clinic_id: Optional\[str\]

doctor_id: Optional\[str\]

slot_id: Optional\[str\]

confirmed: bool

step: str

Each node performs one atomic action:

  1. collect_symptoms
  2. fetch_hospitals
  3. select_hospital
  4. fetch_clinics
  5. fetch_doctors
  6. select_slot
  7. confirm_booking
  8. send_notifications

Example node:

def collect_symptoms(state: BookingState):

if state\["symptoms"\]:

    return state

\# ask user for symptoms here

state\["step"\] = "awaiting_symptoms"

return state

Example conditional transition:

def route_after_symptoms(state: BookingState):

if not state\["symptoms"\]:

    return "collect_symptoms"

return "fetch_hospitals"

This guarantees that hospitals are never fetched before symptoms are present, etc. The graph enforces order instead of the LLM.

3. Hybrid Pattern (Recommended)

Use the LLM for:

  1. Intent classification
  2. Extracting structured fields from user messages
  3. Clarification questions

Use LangGraph for:

  1. Workflow control
  2. Mandatory step enforcement
  3. Tool execution
  4. State validation

Think of it as:

LLM = interpreter

Graph = controller

This pattern tends to be much more stable in production.

4. Enforcing Step Reliability

A few practical suggestions:

  1. Validate required fields before every transition.
  2. Keep tool calls idempotent (especially for booking/cancellation).
  3. Persist state in Redis or a database.
  4. Log every state transition for audit (important in healthcare).

Add guard nodes like:

def validate_required_fields(state: BookingState):

required = \["hospital_id", "doctor_id", "slot_id"\]

for field in required:

    if not state.get(field):

        return "collect_missing_info"

return "confirm_booking"

In healthcare systems, determinism and traceability matter more than agent cleverness.

5. Arabic + English Strategy

I would strongly avoid solving strict formatting purely in prompts. That becomes fragile and hard to maintain.

Instead:

  1. Have the LLM return structured JSON.
  2. Use a separate rendering layer for Arabic and English.

Example LLM output:

{

“hospitals”: [

{"id": "1", "name": "Al Noor Hospital", "distance_km": 3.2}

]

}

Then format in code:

def render_hospitals_ar(data):

return "\\n".join(

    \[f"{i+1}. {h\['name'\]} - {h\['distance_km'\]} كم"

     for i, h in enumerate(data\["hospitals"\])\]

)

This keeps:

  1. Prompts simpler
  2. Formatting deterministic
  3. Arabic structure fully controlled

The LLM should handle reasoning and extraction, not presentation rules.

6. Where Multi-Agent Still Makes Sense

Multi-agent is still useful for:

  1. Insurance Q&A
  2. General medical inquiries
  3. Doctor-submitted questions
  4. Knowledge retrieval (RAG)

But for strict booking pipelines, a graph-based workflow is usually safer.

7. High-Level Architecture Suggestion

Intent Classifier

→ Route to:

  1. Booking Graph
  2. Insurance Graph
  3. General Q&A Agent
  4. Escalation / Human Handoff

This prevents a supervisor from hallucinating control flow in critical paths.