wordplaydev / wordplay

An accessible, language-inclusive programming language and IDE for creating interactive typography on the web.
Other
63 stars 44 forks source link

Chatbot example #380

Open amyjko opened 9 months ago

amyjko commented 9 months ago

What's the problem?

There are many features in Wordplay that would make it easy and fun to create a basic chat bot. For example, using the Chat input stream, and then checking the text entered, and providing a reply and a chat log, would all be a great demonstration of some of the text-based features of the platform.

What's the design idea?

How about recreating Eliza, the original chat therapist, but with a modern spin?

Who benefits?

Anyone wanting to learn design patterns for creating a simple chat bot.

Design specification

We propose to develop a sophisticated chatbot using the WordPlay platform that functions as an interactive recipe provider. This chatbot will allow users to input ingredients they have on hand and receive relevant recipe suggestions. To enhance user experience, a carousel with filter buttons will be integrated above the chatbot interface, enabling users to refine their searches by time, cuisine, dietary restrictions, and meal type (breakfast, lunch, dinner, snacks). The design will prioritize simplicity and ease of use, with a primarily text-based interface complemented by interactive filter buttons. We will adhere to key UI/UX and accessibility guidelines, including consistent navigation, keyboard accessibility, high color contrast, and descriptive alt text for screen readers.

The chatbot will offer an ingredient-based recipe search where users can input ingredients they have on hand, and the chatbot will suggest relevant recipes. To enhance the user experience, a carousel with buttons for additional filters will be implemented. These filters will include preparation and cooking time, type of cuisine (e.g., Italian, Chinese, Mexican), dietary restrictions (e.g., gluten-free, vegan, keto), and meal type (breakfast, lunch, dinner, snacks).

The user interface and experience (UI/UX) will focus on simplicity and accessibility. The chatbot will primarily operate through a text-based interface, ensuring ease of use. Above the chatbot interface, a carousel with filter buttons will provide a quick way for users to refine their search. Adherence to key UI/UX and accessibility guidelines will be prioritized. This includes consistent navigation with a clear layout, full keyboard navigation to support users with motor disabilities, high color contrast to aid users with visual impairments, and possibly descriptive alt text for all carousel buttons to support screen reader users.

patriciacindy commented 6 months ago

Hello @leisha5 @anushkamalpani @MadhumithaSridhar, I am interested to work on this project. Would you guys mind to work together?

MadhumithaSridhar commented 6 months ago

Hello @leisha5 @anushkamalpani @MadhumithaSridhar, I am interested to work on this project. Would you guys mind to work together?

Hi Patricia! Thank you for reaching out; we would love to have you work on this project with us! I am unfortunately unable to come to the meetings this quarter so I have been contributing to WordPlayPen asynch. My other teammates, Anushka and Leisha, do attend the meetings however. We also meet up at 2:30 pm every Friday to work together and we will officially be starting work on this issue this Friday. Let us know if this meeting time works for you or if we need to find another time that best works for us all!

patriciacindy commented 6 months ago

Hello @MadhumithaSridhar, it actually depends on where we are going to meet up. But in terms of time schedule, I am definitely available.

MadhumithaSridhar commented 6 months ago

We meet at Odegaard every Friday... let us know if this works for you and if not, we can try to come up with a solution where we can meet via Zoom.

patriciacindy commented 6 months ago

@MadhumithaSridhar I def can do that at 2.30 pm. Sorry your reply arrived late so I wasn't able to come to the meeting. We can continue to discuss about the progress in group. I usually use Discord for communication, but lmk what you guys prefer. My discord name is: patriciacindyisabell. Thanks!

anushkaamalpani commented 5 months ago

@amyjko our design proposal is ready for review

amyjko commented 5 months ago

@anushkaamalpani Thanks for your first draft! It's very ambitious, and seems like it would be very complex to build, as described. I have many questions:

anushkaamalpani commented 5 months ago

@amyjko Thank you so much for the feedback, Amy! These questions truly gave us a lot of clarity on how we should approach this project. Here are some clarifications:

What scripts will the chatbot be capable of following? The chatbot will follow predefined scripts and rule-based responses. These scripts will handle various user inputs regarding ingredients, cuisine types, dietary restrictions, and meal types. For instance: User Input: “I have chicken and rice.” Bot Response: “Great! Here are some recipes with chicken and rice. Would you like to filter by cuisine or dietary preferences?”

What languages will you support? The initial design will support only English to keep the scope manageable and focus on delivering a robust user experience. However, we would love to add more languages once we have at least the English version of it done.

How will it choose relevant recipes? The chatbot will use keyword matching to identify relevant recipes. User inputs will be parsed to extract key ingredients and preferences, which will then be matched against a database of recipes. Simple algorithms will rank recipes based on the number of matching ingredients and applied filters.

Where will all of this recipe data come from? Recipe data can be sourced from public domain databases, open-source recipe repositories, or user-submitted recipes. This data will be pre-processed and stored in a structured format that facilitates quick search and retrieval by the chatbot.

anushkaamalpani commented 5 months ago

Currently, this is what we have accomplished: Made an initial design proposal with specifications for a chatbot on the wordplay platform that suggests recipes to users based on ingredients and different filters like dietary restrictions, cuisine, etc. We planned on using buttons for filters and even typing-based communication. After receiving Amy's comment, we changed it to chatbot that uses only typing based communication where users have to type specific commands for any instructions, like italian cuisine, instead of filtering it using buttons. The chatbot will initially use only English language following predefined scripts. We did research on ELIZA and decided to use pattern matching technique for the chatbot to get keywords from sentences and suggest recipes from another public domain source. However, we still have to receive Amy's feedback and get the design proposal approved.

As the design proposal hasn't been approved, I will continue working on it throughout this summer until it is ready for development. Once this issue is tagged as buildable, I would like to work on this issue's code as well, if it is still open in fall quarter.

patriciacindy commented 5 months ago

Our progress: We initially designed a chatbot for the Wordplay platform that would recommend recipes based on user-provided ingredients and various filters like dietary preferences and cuisine types. Originally, our plan included both button-based filters and typed interactions. After considering Amy's feedback, we revised the design to rely solely on typed commands, requiring users to input specific instructions such as "Italian cuisine" instead of using buttons. The chatbot will launch in English to adhere predefined scripts. We explored ELIZA's pattern matching technique to extract keywords from user sentences and suggest recipes from public domain sources, but we still need Amy's feedback and approval on the design.

Since the proposal hasn’t approved yet, I would like to continue working on this issue so I still have a chance to design the interactive chatbot prototype if it’s open on Summer.

amyjko commented 5 months ago

Thank you @anushkaamalpani and @patriciacindy. I'll leave you on this issue, since you still want to work on it. @leisha5, @MadhumithaSridhar, will you also be working on it? If not, please unassign yourselves, so we know.

Re: "predefined scripts", your design proposal should say exactly what those are. (That's not an implementation detail, that's a design choice).

MadhumithaSridhar commented 5 months ago

I am still very much interested in being onboard for this issue and working along with Anushka and Patricia over the summer!

leisha5 commented 5 months ago

I would also like to continue working on it!

joonpiter commented 2 months ago

Hi @MadhumithaSridhar will you guys be going forward with this issue?

MadhumithaSridhar commented 2 months ago

Hi @MadhumithaSridhar will you guys be going forward with this issue?

Hi Isabel, I am still interested in going forward with this issue and look forward to working on it over the upcoming quarter!