What’s 2023 beginning of the year hottest topic? If you haven’t heard about OpenAI GPT-3, or ChatGPT, meaning you might not be the person who will be interested in what we are going to talk in a while.
OpenAI is the company which created several AI engine and model, GPT-3 is the latest engine, and ChatGPT is the web portal to showoff the power of the AI by using “chatting” method.
It is powerful and impressive
- It can understand the way you type
- It can continuously answering based on previous questions – just like conversation
- It can provide accurate (ok, I would say this is subjective) answer, or help you do code debugging, write letter, you named it…
OpenAI did released a paid version, which provide the API for integration with other system.
We created a simple contact form before at here, now is time to get smarter. As usual, we going to show you how we integrate AI into our simple form to make it look smart.
So we've got a problem
Time to get smart, we built a simple contact form before, with the help of AI, we can make them look smart. So the requirement is
- Get feedback from the contact form
- Send the feedback to the AI, and let AI tell us 2 things
- Is this comment a Spam, or an Angry customer, or a Happy customer
- Based on the comment from the visitor, suggest a response to the admin
How is this helpful in real life?
- AI help to categorize the comment, make it easier for admin to prioritize the comment
- AI help to suggest the response, help to reduce the time for the admin to write the response from zero.
The data structure:
The length is based your own local phone common phone length
For AI usage
For AI usage
The table is no different from the simple contact form, but with added 2 fields
- type – Identify if the comment from visitor is Spam, Angry, or Happy
- suggestion – Get the AI to suggest how shall the admin response
We removed “title” field… that’s due to, we simply lazy.
We have 3 sections here
- Contact form: Entry point where the process started
- AI: Engine behind the scene which analyze incoming feedback from contact form
- Admin: The real human being who read and process the feedback for further actions.
Below is a simple flow chart to help you understand better.
We will need some test data to start with, let’s us simulate the feedback form on the website of a Bakery shop
- Happy customer’s feedback: I’d like to compliment you on the excellent service rendered. I was looking for a simple birthday cake for my son. You took your time to understand more about my needs including what my son likes. Eventually you recommended customising the cake in his favourite colours with an edible car on top. You candidly shared it’d cost a little more but by then I was already won over by your service and attention to detail. Good job!
- Angry customer’s feedback: I’d like to draw your attention to my unpleasant experience at your bakery. I came in with the intention of getting a simple birthday cake and asked you for recommendations. You were totally uninterested even though there was no others in the shop at the moment. Eventually I made my own choice and wanted to make payment. However you claimed your POS was down and demanded cash. I didn’t have much with me and you rudely asked me to leave if I couldn’t pay. I won’t come again.
- Spam: Just get any spam SMS… email will do.
At lowcode101.com, our aim is to reduce the time to coding as much as possible, so that we have time for our video games instead of pathetic troubleshooting. To achieve this, some time we have to mix different tools together.
In this case, mixing different tools together is can’t avoidable.