Inspiration

I chose customer service as my problem statement because it's something many of us can easily relate to. My idea is to build a smart, autonomous assistant that can handle customer queries, such as answering FAQs, and intelligently respond to questions about past orders without the need for long waits or multiple transfers. A key focus was ensuring this assistant could verify users and provide personalized information securely.

Imagine a customer needing to check the status of their last order. With our assistant, they could simply input their query, receive an OTP on their phone, and verify their identity securely. The assistant would then fetch the details from the database and provide the information instantly. No more waiting on hold, no more frustration.

What it does

DTDL-Customercare is an autonomous customer care assistant designed to support Deutsche Telekom's services. It answers frequently asked questions (FAQs) and product-related queries, verifies users through OTP authentication, and retrieves information about past orders. By utilizing LangChain agents and function calling, DTDL-Customercare delivers quick and accurate responses to customer inquiries, significantly reducing wait times and the need for human intervention.

I wanted to tackle this challenge by leveraging LangChain Agent to build an autonomous solution with minimal human intervention. The core idea behind agents is to use a language model to determine a sequence of actions to take, unlike traditional chains where the sequence is hardcoded. LangChain Agents act as reasoning engines, deciding which actions to take and in what order, making the system both flexible and intelligent. For instance, if a customer asks about their last order, the agent can simultaneously initiate OTP authentication, query the database for order details, and handle any additional requests in the proper sequence. This ensures that each task is executed efficiently and accurately.

"In the movie "The Matrix," Agent Smith famously says, "Human beings are a disease, a cancer of this planet. You are a plague, and we are the cure."
I believe that is where we are heading these days with multi agents taking over"

Bringing this idea to life was not an easy task. It required seamlessly integrating various technologies. We used OTP authentication for secure user verification, Twilio API to send OTPs, and Azure Cosmos DB to store and verify customer information. The challenge was to make this process smooth and autonomous, ensuring customers received quick and accurate responses without compromising security. We utilized Azure Cosmos DB for MongoDB vCore's vector search capability to retrieve relevant documents when a customer asks a query.

We set up two vector indexes: one for retrieving relevant product information from our product collection and another based on FAQs. Using Azure Document Intelligence Service, we retrieved information from existing FAQ PDFs, created a data ingestor to chunk the data, and generated embeddings in our database.

This approach transforms customer service by creating a smart, autonomous assistant that operates with high efficiency and minimal delay. The integration of LangChain Agent with Azure Cosmos DB, Twilio API, and Azure Document Intelligence Service ensures a robust, secure, and intelligent solution for handling customer queries.

Through the DTDL-CustomerCare series, we will explore the architecture and components that make this innovative solution possible. From data ingestion and AI integration to secure authentication and function calling, we’ll delve into each aspect in detail. Our goal is to share insights and knowledge that can help others build similar solutions, ultimately enhancing the customer service experience for everyone.

How we built it

We built DTDL-Customercare using the following key components:

  • Azure OpenAI and LangChain Agents: To create a reasoning engine capable of determining the sequence of actions to take based on customer queries.
  • Azure Document Intelligence Service: For data ingestion and document analysis.
  • Azure CosmosDB for Mongo vCore: To store and manage customer and FAQ data, utilizing vector search capabilities to retrieve relevant documents.
  • Twilio SMS API: For sending OTPs to customers for verification.

What's next for DTDL-Customercare

  • Integration with Azure Communication Services: Incorporating Azure Communication Services to enable live agent calls and continuing conversations, with job routing to select agents based on customer preferences efficiently.
  • Monitoring and Evaluation of LLMs: Building systems for the continuous monitoring and evaluation of LLMs to ensure they provide accurate and helpful responses.
  • Enhancing Capabilities: Adding more features such as voice recognition and multi-language support to improve accessibility.

Live URL

https://dghx6mmczrmj4mk-web.azurewebsites.net/

I'm not planning to expose an endpoint to add customers to the database, as it might lead to a high volume of requests to my free Twilio account. If you need access, please reach out to me personally on LinkedIn

Built With

Share this project:

Updates