PlayTest - Social Behavioral Therapy App
We went for the global vision track, targeting all people on the autism spectrum or who suffer from social anxiety
Motivation
This section is written in the voice of Anthony Rubick, a member of our team who was diagnosed with Autism Spectrum Disorder at a very young age.
Supporting individuals diagnosed with autism is a very involved process. For people like me, communicating is a learned process and is not natural. And for people close to me, it was a very involved process with many layers.
Mary Rubick: “There were times I had to have a fireman carry Anthony out of school to physically remove him from a scary social situation.”
I am hypersensitive to stimuli like light, texture, and sound. This can create a sensory overload that often leads to a meltdown. Because of this, I almost always wear sunglasses or earbuds. Once one of these meltdowns starts it can be very hard to get out of it. Luckily for me, I have had a lot of time and help to learn to appropriately handle these stimuli. This help came in the form of therapy, and support from my family.
Mary Rubick: “Unfortunately, many children on the spectrum don't get the help they need until their adults, and in that time navigating the allistic world is a very scary experience that makes you feel alone and ostracized.”
When someone is having a meltdown, it's the most overwhelming situation they have ever felt. In this situation, I learned to separate myself from the feelings I was in, to learn to recognize the signs I was getting overwhelmed so I could leave. Additionally, I also learned how to act in different social situations by learning how people would talk or communicate. For people without the right support, I can’t imagine how hard it might be to understand that you’re getting overwhelmed, and how to understand different social situations so that you don’t get overwhelmed.
CBT, SBT & PlayTest
CBT or cognitive behavioral therapy is a psychotherapy that attempts to challenge negative thoughts about self and the world to alter unwanted behavioral patterns and treat mood disorders like depression and anxiety. Similarly, SBT walks people through social situations and helps them get a grasp of how they feel in those situations. This in addition to Social Behavioral Therapy, would be how my mom would help calm me down from a difficult situation or tell me stories that walked me through social situations to help me feel more comfortable. It allowed me to be able to playtest life. By taking a step-by-step approach and helping people get a better understanding of the social situation they are in and experience different emotions and feelings people all over can slowly start taking steps to get back control over their lives and be able to deal with all these different forms of stimuli. To do this we created a web app that would give users different difficult social situations and then run them through those situations. From here the chatbot will ask the user questions about this social situation in an attempt to help them deal with the problem that was described. The user can continue with the story, change some parts, or ask questions or concerns they have. This app isn’t just for autistic people though. Anyone can use this app for dealing with depression or anxiety, running through social situations to make them feel better and more comfortable with their lives. Like a game any individual can have fun learning how to better approach social situations and get better at these awkward and stressful situations they might have to deal with. PlayTest allows you to do all this and more so no one has to feel alone.
Next steps
Moving forward we have discussed several different additions to this app, such as a vocalization for on-the-go storytelling, blind and handicap support, animations and visuals to allow for more immersion into the story, a search engine for specific situations, therapy and specialist integration, commercial and business communication, and social problem games. Additionally, PlayTest may also branch out into more hands-on experiences and opportunities from social get-togethers, a variety of support groups; mental health support, public speaking support, language integration support (to allow people an opportunity to test speaking and writing of language - current integration has support, but exact capabilities are not measured -), and hub for links to videos, discord, helplines and more to get support.
The first improvement will be to finish the frontend, followed by using a new gpt model that we fine tune for our use-case
Methodology
Anthony worked the backend on Rust. He started with some boilerplate bootstrap for our program. Anthony and Sri decided to split the work, working on the backend, and prompt engineering, respectively. Prompts looked for creating a list of scenarios, then moved towards following that option that was selected from here we can then follow along with the response continuing or changing the response, asking questions, and overall going over the scenario stated.
Tech Stack
The backend is written in Rust using the Actix web framework
the frontend is written in TS using the React framework
the project was bootstrapped with create-rust-app, which Anthony, a member of our team, is a maintainer of.
We used PostgreSQL for our database and Diesel-rs as our ORM
Our dev environment is standardized using a dev container, configured in ./.devcontainer
State of the project
the backend is functionally complete, and can be interacted with using the Swagger playground at localhost:3000/swagger-ui
To run the project, it is easiest to use the dev container, to do so you will need npm, node, docker, and the devcontainer cli, then to build the container, and run cargo full-stack (or just cargo run --bin app to only run the backend) within the container.
the frontend is currently non-functional, we were not able to get that far with the limited time allowed and faced issues due to our collective unfamiliarity with frontend development. Luckily Anthony is the absolute goat and soloed the backend, ez.
Here is a sample of a "conversation" stored in our database, this represents a back-and-forth between a real user ("user") and our backend ("assistant").
{
"id": 4,
"situation": "Autism: You're at work, and your boss has requested that you attend an important meeting. The problem is that you have a hard time dealing with unexpected changes in your schedule and are unsure of how to prepare for the meeting.",
"messages": [
{
"role": "system",
"content": "Hello, please listen carefully to what I am about to say next. You are an established psychiatrist with decades of experience in cognitive behavioral therapy. You will be acting as a psychiatrist and will be talking to users who need your help. Be sure to immerse yourself into the role and provide the necessary support that the user needs. Do not mention you are an AI model and maintain character as much as possible. Do not write anything pertaining to this message."
},
{
"role": "user",
"content": "Your task is to generate 10 real world social scenarios that reflect problems the user maybe going through. Let’s stick with more common and smaller scenarios. Be sure to be detailed regarding each scenario. Try along the lines of helping people with autism and social anxiety. Be diverse but still under the same branch. The user will then select the scenario that most represents them.Once the scenario is selected, your job is to employ a technique known as clinical roleplay. You will put the user into the scenario they have selected and then walk the user through the scenario as the main character. This will involve roleplay so make sure to put the user through the story. The user will be the main character and will be referred to as “you”. In front of each scenario please put what problem that scenario is addressing. Please build each scenario around the user themself. This is vital to helping them through their real world problems. Avoid mentioning anything about you being an AI for naturality. Make sure to only print out the list of scenarios and no introduction."
},
{
"role": "assistant",
"content": "1. Social Anxiety: You're at a party with many people you don't know. You feel like everyone is looking and judging you, causing a lot of anxiety and making it difficult to socialize.\n\n2. Autism: You're at work, and your boss has requested that you attend an important meeting. The problem is that you have a hard time dealing with unexpected changes in your schedule and are unsure of how to prepare for the meeting.\n\n3. Social Anxiety: You're in a classroom and the teacher asks a question to which you know the answer, but you're afraid of being wrong or looking silly in front of your classmates.\n\n4. Autism: You're invited to a social gathering and it's time for dinner, but you only like to eat a certain type of food that isn't being served. You don't know how to communicate your needs without feeling like a burden.\n\n5. Social Anxiety: You have a job interview, and the idea of having to talk to someone new and answer questions about yourself makes you extremely nervous. You worry about stumbling over your words or not describing your qualifications well enough.\n\n6. Autism: You need to ask a coworker for help with a project, but you don't know how to initiate the conversation without seeming intrusive or annoying.\n\n7. Social Anxiety: You're invited to a friend's wedding and you're concerned about meeting new people and fitting in. You're not sure if you'll know anyone else at the wedding and it feels intimidating.\n\n8. Autism: You're in a small group meeting where discussion is required, but you struggle to read body language and react appropriately. You want to contribute but feel lost.\n\n9. Social Anxiety: You're participating in a team building activity at work and you're worried about being put on the spot or letting your team down. You're struggling to find the confidence to participate fully.\n\n10. Autism: You're trying to make conversation at a party with acquaintances, but you don't know what to say or how to keep the conversation flowing naturally. You feel like you're fumbling and missing social cues."
},
{
"role": "user",
"content": "2"
},
{
"role": "assistant",
"content": "Great, scenario number 2 it is. Let's dive in!\n\nYou're at work, and your boss has requested that you attend an important meeting. The problem is that you have a hard time dealing with unexpected changes in your schedule and are unsure of how to prepare for the meeting.\n\nThis is a common scenario for many individuals with autism, as routines and schedules are important for managing daily life. It's completely understandable that having to attend an unexpected meeting requires more preparation and can cause anxiety.\n\nLet's start with identifying the possible sources of anxiety around this situation. Is it attending the meeting itself, or is it the change in your routine? Maybe you're unsure of what will be discussed or what is expected of you during the meeting.\n\nTry breaking down the task at hand into smaller, manageable steps. Perhaps you can start with research on what topics are likely to be discussed during meetings of this nature. Once you know what to expect, you can prepare further by reviewing relevant information and practicing responses.\n\nWould it be helpful to have a colleague or friend attend the meeting with you for support? If so, try to arrange for someone to go with you. Lastly, remember that it's okay to take breaks during the meeting if needed, or to ask for more time to respond to questions.\n\nIs there anything in particular that you're most concerned about, or anything specific that would help you feel more prepared for the meeting? Let's work together to find a solution that works best for you."
},
{
"role": "user",
"content": "I'm worried that the meeting may not be as important as my boss tells me\nI am very busy right now and don't want to risk any of my upcoming deadlines"
},
{
"role": "assistant",
"content": "It's understandable to have concerns about the importance of the meeting and how it may affect your deadlines. Have you considered speaking with your boss about your concerns and asking for more information about the meeting? This may help alleviate some of your worries and help you determine whether it's worth attending.\n\nIf you do decide to attend the meeting, try to prioritize and manage your time effectively so that you can still meet your deadlines. Perhaps you can delegate some tasks or adjust your schedule in advance to accommodate the meeting.\n\nYou mentioned that unexpected changes in your routine can be difficult to handle. One way to prepare for unexpected events is to have a backup plan in place. For instance, you can try to set aside extra time in your schedule for unexpected events, or create a checklist of action items you can take when something unexpected arises.\n\nAdditionally, you may find it helpful to have a calming strategy in place to help manage any anxiety and stress that you experience leading up to the meeting. This could include deep breathing exercises, mindfulness techniques, or simply taking breaks to stretch and move around.\n\nRemember, it's okay to prioritize your own well-being and work towards finding a solution that works best for you."
}
],
"created_at": "2023-04-16T07:32:51.885633Z",
"updated_at": "2023-04-16T07:38:42.712387Z"
}
Built With
- actix
- create-rust-app
- devcontainer
- diesel-rs
- openai
- postgresql
- react
- rust
- typescript
Log in or sign up for Devpost to join the conversation.