Keeping a human in the loop
Send unsure or high-stakes answers to a person.
AI is good at handling lots of routine questions, but some answers need a person: when the model is unsure, or when the topic is high-stakes like health, money or legal matters. A good design routes those cases to a review queue and tells the user someone will follow up. The bot handles the easy cases, and people handle the important ones.
REVIEW_TOPICS = {"medical", "legal", "money"}
review_queue = []
def route(question, result):
if result["confidence"] < 0.7 or result["topic"] in REVIEW_TOPICS:
review_queue.append(question)
return "Thanks! A person will check this and reply soon."
return result["answer"]The rules are simple and written in your code, so you can explain exactly why something went to review.
Models' own confidence scores are only rough. Combine them with rules about topics, and look at what lands in the queue to improve your rules.
Tell users when they're talking to an AI and how to reach a person.