{"slug": "my-qwen-sales-agent-won-t-stay-on-script-sends-wrong-info-and-payment-details-do", "title": "My Qwen sales agent won't stay on script — sends wrong info and payment details too early. How do I enforce sales-flow adherence?", "summary": "A developer building an email-based AI sales agent on a Qwen model reported that the agent sends payment details to prospects before they confirm interest, duplicates documents, and deviates from the sales script, prompting community advice to move payment and document-sending decisions out of the model and into code. The recommended approach makes \"send payment details\" a tool call gated by a deal state machine (NEW > QUALIFIED > CONFIRMED > PAYMENT_SENT) where CONFIRMED is set by a rule or human approval rather than the model, tracks already-sent documents to block repeats, and adds human approval for high-stakes steps during the first few weeks. Fine-tuning should be reserved for tone and script wording, with an eval set of a few dozen real past threads re-run after every prompt or model change to measure script adherence.", "body_md": "Dear Hugging Face Community,\n\nHello. I really need your help.\n\nI am currently trying to build an AI Sales Manager that communicates with customers — for now, exclusively via email. It replies to emails, holds conversations with potential clients, and attempts to close deals.\n\nI am using a Qwen model. The problem arose when I put together a small dataset consisting of email conversations from a sales manager who successfully closed deals. I also wrote a system prompt. Essentially, the model operates only on the basis of a playbook, the system prompt, and a small RAG setup.\n\nHowever, the model still doesn’t communicate the way I need it to. It sometimes duplicates information, occasionally deviates from the sales script and provides slightly different information, may send the same documents multiple times, and — most critically — it sometimes sends payment details to the client for payment even though the client hasn’t confirmed yet or shown any real interest.\n\nHow can I fine-tune and refine the AI model specifically for our business’s sales scripts, so that it also learns from the best sales cases and works without the above-mentioned errors?\n\nI would greatly appreciate any advice, suggestions, or guidance on how to approach this properly — whether it involves better data preparation, prompt engineering, fine-tuning strategies, guardrails, or evaluation methods.\n\nThank you very much in advance for your help.\n\nBest regards\n\n \n \nHi Sophie, fine-tuning won’t fix the payment-details one. Even a well-tuned model gets it wrong some % of the time, and for payment details that % has to be zero. That decision needs to come out of the model’s hands.\n\nWhat I’d do:\n\n1. Make “send payment details” a tool, not text the model writes. The model can ask for it; your code decides.\n2. Keep a small deal state per conversation in your own code, e.g., NEW > QUALIFIED > CONFIRMED > PAYMENT_SENT. The payment tool only works in CONFIRMED, and CONFIRMED is set by a rule you control (customer explicitly said yes, or a person approves), not by the model. Anything else is denied by default.\n3. Same trick for duplicate documents. Track which docs were already sent in that thread and have the send-document tool refuse a repeat.\n4. For the high-stakes steps, add a human approval for the first few weeks. The agent drafts the payment email, and a person clicks approve. That also gives you real data on where it goes wrong.\n5. Then fine-tune, but for tone and script wording, not for rules. For script adherence, an eval set of a few dozen real past threads where you know the right next step, re-run after every prompt or model change, will tell you more than more training data.\n\nRules in code, style in the model. That split fixes most of what you listed.\n\n \n \nThanks a lot dear Sattyam. I will definitiely try to implement these approaches into my application and then I will get back with feedbacks.\n\nAppreciate it!", "url": "https://wpnews.pro/news/my-qwen-sales-agent-won-t-stay-on-script-sends-wrong-info-and-payment-details-do", "canonical_source": "https://discuss.huggingface.co/t/my-qwen-sales-agent-wont-stay-on-script-sends-wrong-info-and-payment-details-too-early-how-do-i-enforce-sales-flow-adherence/182188#post_3", "published_at": "2026-10-03 15:58:51+00:00", "updated_at": "2026-10-03 16:09:18.910609+00:00", "lang": "en", "topics": ["ai-agents", "large-language-models", "ai-tools", "ai-safety"], "entities": ["Qwen", "Hugging Face", "Sophie", "Sattyam"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/my-qwen-sales-agent-won-t-stay-on-script-sends-wrong-info-and-payment-details-do", "markdown": "https://wpnews.pro/news/my-qwen-sales-agent-won-t-stay-on-script-sends-wrong-info-and-payment-details-do.md", "text": "https://wpnews.pro/news/my-qwen-sales-agent-won-t-stay-on-script-sends-wrong-info-and-payment-details-do.txt", "jsonld": "https://wpnews.pro/news/my-qwen-sales-agent-won-t-stay-on-script-sends-wrong-info-and-payment-details-do.jsonld"}}