en
Choose your language

Developing an AI Assistant Prototype for Automated Lead Discovery and Qualification

(If you prefer video content, please watch the concise video summary of this article below)

Key Takeaways

  • Combining structured conversation scripts with LLM adaptability enables scalable, natural lead qualification without sounding robotic.
  • An AI assistant can accurately assess ICP fit by extracting and validating key business data from free-form conversations.
  • Respecting user intent and recognizing disengagement is critical for ethical, effective AI-driven outreach.
  • Production-ready AI lead generation requires not just models, but careful prompt design, validation logic, and cost control.

Finding potential clients for software development services is rarely a straightforward task. In practice, it often means manually monitoring chats, forums, and social networks, identifying promising conversations, and then reaching out to people one by one with similar introductory messages. This process is time-consuming, repetitive, and difficult to scale.

In this article, I explain how I built a working prototype of an AI-powered assistant SaMio that automates early-stage lead discovery and qualification for software development providers, while keeping conversations natural, respectful, and context-aware.

Need expert guidance on designing and implementing AI solutions for your business?

The Challenge: Manual Lead Discovery Doesn’t Scale

The starting point was a very common real-life workflow.

A company’s employee continuously monitors chats and social platforms to identify people who might be interested in software development services. Once such a person is found, the next step resembles cold outreach, only via modern messengers instead of phone calls. The outreach typically follows a script: greeting, a few qualifying questions, and then a proposal or a polite exit.

The problems with this approach were obvious:

  • The same introductory messages had to be written manually again and again.
  • Conversations rarely followed a perfectly linear script.
  • People could refuse, ignore messages, or shift the topic at any moment.
  • It was difficult to consistently evaluate whether a person actually fit the ideal customer profile (ICP).

The goal was to automate this process without turning it into a robotic spam machine and without annoying people.

The Core Idea: Scripted Flow and LLM Adaptability

Instead of trying to fully improvise conversations, I started with a structured script approach.

At the core of SaMio lies a conversation flow definition, consisting of:

  • Initial greeting messages
  • A sequence of qualifying questions
  • Final success or failure messages

Each question step has a specific validation goal, for example, identifying the industry, company size, or the person’s role in the organization.

The number of questions is flexible and can be extended depending on business needs.

However, a static script alone would never feel natural. Real conversations are messy. People answer indirectly, ask unrelated questions, or clarify earlier statements. This is where AI becomes essential.

Making the Conversation Feel Human

To make dialogues feel natural, I connected a large language model (LLM) that adapts to the interlocutor’s communication style and context.

SaMio does not simply send predefined messages. Instead, it:

  • Selects appropriate variants from the script
  • Interprets free-form user responses
  • Extracts relevant information from those responses
  • Adjusts tone and pacing to match the conversation

If someone suddenly asks about the weather or shifts the topic, the assistant can respond naturally and then gently steer the conversation back when appropriate.

At the same time, the assistant must recognize hard stops. If a person refuses to continue or clearly disengages, the assistant must respect that decision and end the dialogue without pushing further.

This balance — being adaptive without being intrusive — was one of the most important design goals.

Qualification and Validation Logic

As the conversation progresses, SaMio collects answers to the qualifying questions. Importantly:

  • Answers are stored separately and can be updated if the user adds something later.
  • The system avoids asking the same question multiple times.
  • Each answer contributes to an overall assessment of how well the person fits the target ICP.

Once all relevant data is collected or the conversation naturally reaches a conclusion the assistant evaluates the result.

If the potential client matches the ICP, the assistant selects one of several success messages. These are soft, non-pushy proposals, such as offering a short demo, sharing a guide, or showing real examples.

If the person is not a fit or declines further discussion, the assistant selects a failure message, always polite, appreciative, and respectful.

Post-Conversation Automation

SaMio does not stop at messaging.

After the conversation ends:

  • A summary email with the results of the dialogue is automatically sent.
  • The full conversation history is stored in the database for later review.
  • Relevant data is synchronized with Google Sheets, keeping lead tracking up to date without manual input.

This ensures transparency, traceability, and easy handover to sales or marketing teams.

Summary table example

NameUser namePositionCompanySizeIndustryDateLast update
Yena PolrixYpolrix_poUser is a product ownerN/AApproximately 300 peopleThe user works in the composable commerce sector2025-11-222025-11-22
Luma Qentarilqentari_77User is a tech strategy leadN/AThe company has nearly a thousand workersCloud automation2025-10-192026-01-10
Nira Solvennsolven_vpUser is a director of the companyN/AOver 1200 peopleEnterprise platform services2025-12-102025-12-10

Technical Decisions and Architecture

Initially, I experimented with a local LLM (Gemma). While this approach seemed attractive from a cost and privacy perspective, it quickly revealed limitations.

The model struggled to correctly interpret ambiguous responses. If a user replied off-topic but without rejecting the conversation the model often failed to adapt and continue meaningfully.

As a result, I switched to GPT-4o-mini, hosted on Azure. This model provided significantly better conversational robustness and context handling.

Another key challenge was controlling conversational drift. Since cloud-based models consume paid tokens, letting the assistant engage in long, irrelevant discussions was not an option. We had to carefully balance:

  • Allowing natural small talk
  • Gently redirecting the conversation
  • Preventing unnecessary token consumption
  • Avoiding obvious “bot-like” behavior

Prompt engineering played a major role here, defining boundaries while preserving flexibility.

Technology stack

The prototype was built using:

  • Azure
  • Docker
  • .NET
  • PostgreSQL

The Result: A Working, Production-Ready Prototype

SaMio is a fully functional prototype that:

  • Conducts natural, adaptive conversations
  • Qualifies leads based on real responses
  • Respects user boundaries
  • Automates follow-ups and reporting
  • Stores and synchronizes data reliably

Most importantly, it demonstrates how LLM-based assistants can move beyond simple chatbots and become practical tools for real business workflows when combined with structured logic, validation rules, and thoughtful constraints.

Final Thoughts

This project was a strong reminder that successful AI systems are rarely “pure AI.” The real value emerges at the intersection of scripted business logic, human communication patterns, and carefully controlled language models.

For software development providers, this approach opens new possibilities for scalable, respectful lead generation without sacrificing authenticity or trust.

If you’re exploring similar automation challenges, the key takeaway is simple: start with real human workflows, then let AI enhance them — not replace them blindly.

Consulting on LLM deployment project
Need to tackle a similar challenge?

For organizations facing challenges in lead generation, AI-powered assistants offer a scalable way to automate outreach, assess ICP fit, and generate qualified leads, while keeping conversations natural, respectful, and efficient.

Andrey Kopanev, Senior .NET Developer, AI Enthusiast

Editorial Guidelines
Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>