By the end of this lesson your bot will answer free-text questions with AI, using only the business's own FAQ, while code still controls orders and prices, a daily cap and a spend limit protect your money, and private details stay out of the AI.
You need: the online bot from lesson 4, an AllModelAPI account with a new API key, your coding agent · Time: 8 minutes
Customers don't always use buttons. They type "kal ka menu kya hai?", "do you deliver near the bus stand?" or "can I pay at month end?". Keywords from
faq.txtmiss many of these. A language model can understand the question and answer in the customer's own style.But a model also makes things up with confidence. So the bot gets a clear split:
- Buttons and commands go to code: menu, orders, prices, totals, cancellations, reminders. Code reads the database; nothing is guessed.
- Free text goes to the AI, which may only explain what is in the FAQ, and must send everything else to the owner.
Money and orders stay in code. The AI gets only free text, and only after the checks. Why?If the AI can say "yes, your order is confirmed" or "₹80 is fine", a customer will eventually get a promise the business never made. Keeping money and orders in code means the worst AI mistake is a clumsy sentence, not a lost tiffin.
Log in free to read the rest of this lesson
Every lesson is free. A free account unlocks all of them and saves your progress.
Still to come in this lesson:
- Ground the AI in the FAQ
- Put limits on usage and money
- Keep private details out of the AI
- Test it with tricky messages
- Recap