Voice agent for lead management

Summary

Conversational workflows for a real-estate SaaS product.

Lead handling required repeated conversations, collection of structured details and updates to business records.

A voice pipeline combining speech recognition, dialogue control, retrieval, entity extraction and database updates inside a SaaS workflow.

Tech Stack

  • Python
  • OpenAI
  • Cohere
  • Anthropic
  • Deepgram
  • ElevenLabs
  • Twilio
  • Retrieval-Augmented Generation (RAG)
  • Milvus Vector Database
  • Prompt Engineering
  • AWS

Project workstreams

  1. 01

    2 weeks

    Solution Architecture Design

    Solution Architect

    Technology Stack Setup

    Solution Architect
  2. 02

    4 weeks

    LLM Integration & Configuration

    NLP Engineer

    Speech-To-Text Encorporation

    NLP Engineer

    Text-to-Speech Implementation

    NLP Engineer

    Application Interface Setup

    Python Engineer

    Environment Setup

    Python Engineer, DevOps
  3. 03

    4 weeks

    Integration with Twilio

    Python Engineer

    Enabling SMS & Chat Interactions

    Python Developer
  4. 04

    4 weeks

    Dialog Behavior Design

    NLP Engineer

    Conversation Flow Setup

    NLP Engineer, Python Engineer

    Latency Optimization

    NLP Engineer, Python Engineer, DevOps

    RAG Integration

    NLP Engineer
  5. 05

    2 weeks

    Documentation

    Solution Architect

    Integration, Testing, and Deployment

    QA Engineer, DevOps Engineer

Tech Challenge

  • Natural Voice Interaction. The AI Agent must talk with a natural, human-like voice to avoid sounding robotic, which is typically associated with spam calls.
  • Low Latency Communication. When handling the voice calls, the LLM-based agent must have an overall latency as speaking to a real person.
  • Dynamic Conversation Management. Providing clear and concise instructions to the assistant to manage conversations effectively, dynamically changing states based on client responses.
  • Information Gathering. Efficiently gather information about leads and their properties while maintaining conversational flow.

Solution

  • Used ElevenLabs for advanced text-to-speech synthesis, providing the assistant with a natural and friendly voice that reduces the likelihood of being perceived as spam.
  • For speech recognition, the solution includes a self-hosted version of a Deepgram to ensure low latency and high quality of a solution.
  • A special decision maker model such as OpenAI 4o-mini, is used in the system to adjust the flow of the conversation in real time. This model analyzes interactions and determines when to change dialogue strategies to ensure smooth transitions and appropriate responses.
  • Implemented LLM-based entity recognition to extract key information about leads and their properties during conversations, and automatically process and log data for follow-up interactions.
  • Enabled the agent to dynamically retrieve relevant information during conversations, enabling more accurate and contextually appropriate responses.

Impact

Outcome

A SaaS-integrated voice agent for lead conversations, information capture and updates to business systems.

Published

DRL Team