Customer support · Production

Doctolib builds a multi-agent agentic RAG architecture for customer care

The problem

Doctolib's customer care relied on RAG with LLMs but hit limits requiring more powerful solutions, including handling complex multi-step tasks, accurately routing user queries, and making sense of unstructured data.

First attempt

The agentic system faced challenges including non-deterministic agent behavior causing incorrect tool invocations, oversized prompts degrading instruction-following, and difficulty extracting meaning from unstructured data consistently.

Workflow diagram · grounded in source
1
User submits natural language query
trigger
“The user wants to give his secretary access to his agenda”
2
Root assistant routes to specialist
routing
“Routing the user query to the correct specialized assistant (currently based on a ML classification model)”
3
Specialized agent fetches context
integration
“it uses a tool to fetch more context data”
4
FAQ RAG tool answers question
ai_action
“A FAQ search tool, which is actually the RAG described in the first paragraph”
5
Fact check validates tool arguments
validation
“It has a fact check step as a safety net, to make sure that the arguments of the tool are properly filled by the specialized assistant”
6
User validates sensitive action
human_review
“we ask for user validation to execute the action on its behalf”
7
Task complete or loop back
output
“A tool indicating that the task is complete or canceled to loop back to the root assistant”
Reported outcome

Doctolib produced a working POC of a multi-agent agentic RAG system for customer care, demonstrating correct routing, context fetching, and user-validated execution of a practitioner's agenda access request, though production deployment remains a challenge ahead.

Reported stack
LangGraphLangChaincrew.aiautogenLiteralLangsmith
Source
https://medium.com/doctolib/part-2-from-rag-to-agents-doctolibs-journey-to-revolutionize-customer-care-6b14da40f5ae
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

Doctolib produced a working POC of a multi-agent agentic RAG system for customer care, demonstrating correct routing, context fetching, and user-validated execution of a practitioner's agenda access request, though pr…

What tools did this team use?

LangGraph, LangChain, crew.ai, autogen, Literal, Langsmith.

What failed first in this deployment?

The agentic system faced challenges including non-deterministic agent behavior causing incorrect tool invocations, oversized prompts degrading instruction-following, and difficulty extracting meaning from unstructured…

How is this customer support AI workflow structured?

User submits natural language query → Root assistant routes to specialist → Specialized agent fetches context → FAQ RAG tool answers question → Fact check validates tool arguments → User validates sensitive action → Task complete or loop back.