Josh on GitHub Josh on LinkedIn Josh on IG Josh on YT Josh on PDGA

AI Sales Agent - designing a Multi-Channel, AI Qualification Agent

purpose

I had an interesting prompt given to me and thought I would write about it on my blog. check it out! ↆ


the prompt:

PURPOSE: Architect a Multi-Channel, AI Qualification Agent

SITUATION:

When you land on a website for a sales-led company, you typically have two options:

Fill out a form and wait for someone to get back to you (usually takes at least 24 hours) Pro: Companies get better qualified leads from the form details. Con: Forms are cumbersome and reps don’t reach out right away.

Choose a time on a calendar booking link for a demo Pro: Faster “speed-to-lead” for people ready to book a meeting. Con: Unqualified leads make it onto sales teams calendars and take away their focus from higher quality prospects.

Your customer has hired you to build an AI agent that can engage and qualify prospects conversationally.

A qualified lead for this customer is a US-based Sales or Marketing Director at a B2B SaaS company with at least 4 people on their sales team that generates at least 10,000 website visitors each month and has intent to buy a solution in the next 90 days.

You can use:

  • Contact enrichment data from API providers.
  • RAG models from your customer’s documents.
  • Communication across email, text message, and on-site chat.

YOUR JOB:

Part 1:

Create a workflow / architectural diagram that explains how you would implement this solution. Be clear about the platforms you would deploy and host this on for a production environment.

Part 2:

A new customer would like to onboard to the product you created in Part 1.

Explain how you would build an AI-first approach to onboard and configure their lead criteria into your solution. You can draw inspiration from how OpenAI allows users to configure Custom GPTs or take a totally different approach.

Create a video where you walk through your decision and thought process for Parts 1 & 2.


My Solution

Part 1

... or skip to Part 2

I decided to leverage the following allowances:

  • Contact enrichment data from API providers.
  • RAG models from your customer’s documents.
  • Communication across email, text message, and on-site chat.

I've done a fair amount of R&D in the last year across all the major cloud providers, Azure, AWS, & GCP, but for the sake of this outline I will focus on GCP alone. Please keep in mind this is all very high-level, and I am prepared to speak at greater length if interested!

Google Cloud Platform

GCP's solution, centered around Dialogflow and Cloud Functions, offers a highly efficient and user-friendly approach to building conversational AI, and in my opinion is the most approachable for the prompt. I think we'll see the fastest time to value if we leverage the tools GCP offers.

Dialogflow is amazing at processing natural language, making it ideal for the conversational aspect of the application. Cloud Functions provide a scalable way to handle backend logic without managing servers, similar to AWS' Lambda but with the added benefit of Google's straightforward pricing (yay!) and native integrations with other Google services like BigQuery for analytics.

review

Conversation Flow Design

Regardless of which platform you choose to build on, there are key details to extract during the conversation in order to make this a meaningful interaction. Here's an example of how we can capture these fields using entity extraction and API calls to validate the individual:

Fields we want to capture as a part of the natural agent conversation may include:

name                     [string]
email                    [string]
company_name             [string]
company_website          [string]
linkedin_URL             [string]
buying_within_90_days    [boolean]

review

review

Once we have the information needed from the conversation, we can store the data in a staging table, where we fire off the async calls to the various APIs which will help us in our validation of the prospect. Once the API data is returned, we can perform additional processing to either toss the prospect or move them to the next phase of validation.

an interesting idea is to also add in OTP for the email just to make sure the person is properly identified too


Part 2

Now that we have this awesome ai-fueled lead generation product, we need a way to onboard clients which is smooth and consistent across implementations. Because we planned on leveraging things like Terraform for our infrastructure as code, implementation should be easy money.

review

Customer Onboarding Portal

We'll need a web-based onboarding portal hosted on Google App Engine, which allows for scalable customer access. This portal will serve as the entry point for new customers to configure their AI Qualification Agent. I would probably opt for a Node runtime and develop the front-end with React or Vue.

Features we'll need...

      ✅ Lead Criteria Configuration: input and adjust their lead qualification criteria.
      ✅ API Integration Settings: allow customers to BYO API keys or credentials.
      ✅ Documentation Upload: uploading proprietary documents for RAG model training.

Custom AI Model Configuration

Utilize Google Cloud Functions to automate the setup of custom Dialogflow agents based on the customer's provided lead criteria and documents. This includes training Dialogflow intents and entities to recognize and process user inputs related to the specific criteria.

↪ Automation Workflow

  • Dialogflow Agent Setup: Automatically create a new Dialogflow agent for the customer.
  • Intent and Entity Training: Use the provided lead criteria to generate custom intents and entities.
  • RAG Model Training: Integrate with Vertex AI to train custom models on the customer's uploaded documents for document understanding and information retrieval.

Data Validation and Enrichment Pipeline

Leverage Cloud Functions to set up pipelines for real-time data validation and enrichment using third-party APIs, tailored to the customer's specific criteria.

↪ Integration Steps:

  • Dynamic API Calls: Configure function triggers to call out to third-party APIs based on the lead information collected during interactions.
  • Custom Logic Implementation: Allow for custom validation logic (e.g., verifying web traffic through Google Analytics API, checking team size through LinkedIn API).

Deployment and Testing

Provide a staging environment for the customer to test the AI Qualification Agent. Use Google Kubernetes Engine (GKE) for deploying test instances of the solution, allowing customers to interact with their configured agent and make adjustments as needed.

↪ Deployment Features:

  • Real-time Feedback: Implement a feedback loop within the staging environment for customers to suggest changes or improvements to their AI agent configuration.
  • Performance Monitoring: Integrate with Google Cloud Monitoring to track the performance of the qualification agent, including response accuracy and conversation flow effectiveness.

Go-Live and Monitoring

Once the customer is satisfied with the staging tests, support the go-live process to make the AI Qualification Agent available across their chosen platforms (email, text message, on-site chat). Set up ongoing monitoring and optimization based on real-world interaction data.

↪ Monitoring and Optimization:

  • Usage Analytics: Use BigQuery to analyze interaction data for insights into lead qualification effectiveness and areas for improvement.
  • Continuous Learning: Implement a mechanism for the Dialogflow agent to learn from interactions, improving over time.