Ordering Hotpot with Structured Outputs
Demo: https://vit.xwm.mybluehost.me/samples-site?hotpot
This is how all the chatbot development started for me. I worked at a hotpot restaurant and it fell on me to explain to Americans that had never eaten hotpot before how to order. It was not easy. They were confused.
Later, it fell on me to train our servers how to explain to Americans that had never eaten hotpot before how to order. There was definitely a logical flow that needed to be followed. People would literally get too confused, give up, and decide to eat somewhere else.
This sequence of questions would definitely need some refinement were it to be put into use at the restaurant. But I’m actually quite surprised and pleased with how easy it was to capture most of the question flow using structured outputs.
I basically wrote this schema by hand. The schema generator was useless.
I used an array for the flavor option. This allows you to choose one, two, or more flavors. First time I’ve used an array in a schema and it worked just fine.
I’m not sure why the playground wants to scramble up the schema so they don’t go in the order I originally put them in. Surprisingly, it still pretty much worked.
This would actually be helpful to the restaurant. If the server just got this output and then entered it into the POS, it would save a lot of trouble. (The POS does not offer API integration.) Now diners can order off of a tablet but you really need to know what you’re doing on the tablet. It’s hopeless if you’ve never ordered hotpot before. This chatbot walks you through the order step by step.