Make an AI Receptionist Sound Human: A Practical Guide
A customer asks for a price. Your receptionist answers politely, gives an old number, then asks for a name the customer already supplied. The wording may be natural, but the conversation still feels broken. This is a de
A customer asks for a price. Your receptionist answers politely, gives an old number, then asks for a name the customer already supplied. The wording may be natural, but the conversation still feels broken.
This is a design problem for developers building a text-based receptionist. The example below uses Python 3.14 and its standard library to demonstrate one narrow boundary: a price can be rendered only when it exists and belongs to the current data version. It doesn't implement an LLM, calendar, booking system, or delivery channel. Those components need their own integration and tests.
Give the model a smaller job
In a clinic receptionist I built, the knowledge base covers about 114 price items and 48 services. The system draws prices and dates from clinic documents and a calendar. A second AI checks claims against those materials, and the owner confirms a booking. The system was tested on real questions and is ready to be switched on when the owner decides. That is the reported project status, not a claim about live conversion or production performance.
For a developer, the boundary is useful: the model can decide how to phrase a response, while the application retrieves facts and controls actions. A price is a record with a source and a version. An available time is a calendar result. A booking confirmation is an authorized action. Treating all three as text for the model to invent makes it difficult to establish what the customer was promised.
The article on making an AI receptionist sound human includes the humanizer skill for reviewing the wording. The rest of this post focuses on the data and control boundary around a reply.
A version check before a price leaves the system
The following is a small teaching example, not the clinic's production code. It takes a quote and the current version identifier, then either renders a price or returns a handoff marker. The caller is responsible for fetching both the quote and the authoritative current version. Test data and prices are fictional.
from dataclasses import dataclass
@dataclass(frozen=True)
class Quote:
service: str
amount: int | None
version: str
def respond(quote, current_version):
if quote.amount is None or quote.version != current_version:
return "HANDOFF"
return f"{quote.service}: {quote.amount} USD"
assert respond(Quote("Consultation", 90, "v2"), "v2") == "Consultation: 90 USD"
assert respond(Quote("Consultation", None, "v2"), "v2") == "HANDOFF"
assert respond(Quote("Consultation", 90, "v1"), "v2") == "HANDOFF"
print("3 checks passed")
Save it as quote_check.py and run python3 quote_check.py. With Python 3.14.9, those checks produced 3 checks passed. There are no external packages or API credentials. The int | None annotation requires Python 3.10 or newer.
The first assertion covers a present price at the expected version. The other two cover a missing price and a stale version. In a real application, HANDOFF should lead to a queue or another explicit staff workflow; it is not text to send to the customer. A customer-facing message can say that a staff member needs to check the price, provided your system actually creates the handoff.
The version test alone does not make a price safe. A malformed record, wrong service match, wrong currency, untrusted version identifier, or database update between checking and sending can still produce an incorrect answer. Production code needs validation, an authoritative source, and a consistency strategy for the moment the reply is sent. If a price has conditions, preserve them with the amount. Don't strip a range or an examination requirement just to produce a shorter sentence.
Keep the answer grounded through the whole turn
A practical turn can start with the incoming message and the conversation state. Resolve the requested service against the knowledge base, fetch its current price, and fetch calendar availability only when the question calls for it. Pass the model the facts it is allowed to use and the parts of the conversation relevant to the answer.
The model's draft is still untrusted. A checker can compare it with the retrieved facts and flag unsupported claims. In the clinic project, a second AI performs a check against clinic materials. A second model can also miss an error, so deterministic validation remains appropriate for exact prices and controlled actions. If the checker returns an error or times out, the application should choose a defined fallback rather than silently send an unchecked draft. Limit retries so a reply cannot bounce between models indefinitely.
For price-heavy replies, another option is to render the exact price from structured data outside the model and let the model handle surrounding language. Even then, check that the model hasn't added a contradictory price elsewhere. The illustrative function above only renders a fixed string; it does not scan free-form text or prove that a generated reply is safe.
Calendar availability has its own race: a slot seen during the conversation may no longer be free at confirmation. Recheck it before the booking action. In the documented clinic flow, the doctor confirms the request and the calendar is checked again. A suggested slot and a confirmed booking are different states, and the customer's wording should reflect that.
Use conversation state without turning it into an interrogation
If someone asks for a price, answer that question when the data is available. If they already provided their name, carry it into the next turn instead of asking again. Store the minimum state needed for the task, identify which facts came from the customer, and update those facts when the customer corrects them. A stored name is not evidence that the customer agreed to book.
Your prompt or conversation instructions can specify tone, message length, and examples of replies. Those instructions should not override missing data or authorize a booking. The implementation needs to preserve the distinction between customer-provided details, retrieved business facts, and decisions made by staff. Pass relevant history to the person taking over, subject to your privacy and retention rules, so the customer doesn't have to repeat the whole conversation.
Test the failure path as well as the wording
Start with the three local assertions above. Then, in your own integration environment, prepare a service with a known price and ask for it. Change the authoritative price, invalidate or refresh the stored version, and ask again. Check the actual customer-facing text and the source version recorded for that reply. The expected behavior is the new price or a handoff when current data cannot be established; the sample alone cannot test your data store.
Repeat with a service that has no price, an unavailable calendar, and a checker that times out. Verify that each situation reaches a visible staff workflow and that no booking is confirmed as a side effect. Also test a customer correcting their name and asking for a person midway through a conversation. These are suggested integration tests, not results from the clinic project.
Finally, inspect the handoff itself: what the employee receives, whether the customer's question is included, and whether the bot stops sending conflicting messages while a person handles it. A natural reply depends on the state behind it being correct, and on the next person in the conversation knowing what happened.
Tags: #ai #python #testing #automation
This article was created with the help of AI.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.

