-
-
Personalized Dashboard that shows individual task completion and progress
-
Blog where addicts can share their experience and empower each other
-
AI-Powered Chat for a place to ask all about online gambling addictions recovery, or just a place to vent and talk
-
Debt Analyzer where victims can log their progress on the repayment of their debt and have their repayment progress be analyzed
-
Auto-Generated Task to keep victims focused on overcoming their addictions
-
GambligGone : Helping Those in Need
Inspiration
Over 2.8 million Indonesians are drawn to online gambling, thus the government has made great efforts to combat this expanding problem, which has had a big influence on society. Nevertheless, a lot of people are still affected by gambling addiction, despite extensive regulatory measures. GambleGone seeks to close this gap by offering all-encompassing assistance and direction via sophisticated AI-generated tools and tailored resources. With a lifeline to recovery and a better, addiction-free future, GambleGone is committed to making a significant difference in the lives of people impacted by gambling addiction.
GambleGone strongly aligns with the 3rd and 11th Sustainable Development Goals, Good Health and Well-being and Sustainable Cities and Communities. By tackling the issue of gambling addiction, GambleGone contributes to the promotion of mental health and well-being, a key target of the 3rd SDG. Our platform provides crucial support and guidance for individuals struggling with gambling addiction, fostering healthier lifestyles and mental resilience. Furthermore, GambleGone's efforts support the 11th SDG by helping to build more sustainable communities. By reducing the prevalence of gambling addiction, we contribute to creating safer, more inclusive communities where individuals can thrive without the detrimental impacts of addiction. Through our comprehensive approach, GambleGone aims to not only address the immediate challenges of gambling addiction but also to promote long-term health and sustainability in communities across Indonesia.
What It Does
A whole range of resources is provided by GambleGone to assist those who are struggling with gambling addiction. We have a blog on our platform where users may post their ideas and experiences to foster a supportive community. Users are empowered on their recovery journeys by the AI-powered Chat, which offers nonjudgmental talks, coping tactics, and personalized resources. Daily auto-generated assignments provide users with specialized assignments to help them manage their everyday activities and overcome their addiction to gambling. Step-by-step plans for managing and reducing debt are provided via the Debt Manager tool, which eases financial stress. The Rehabilitation Center recommendation shares nearby centers that specialize in treating gambling addiction. Lastly, a thorough summary of the user's progress is provided via the Personalized Dashboard, which includes recommendations, status updates, and completed tasks.
How We Built It
The App
We used Next.JS for both the front-end and the back-end to expedite development. Prisma was our ORM of choice considering its versatility. For most of everything else, from request validation to UI component library, from asynchronous state management to rich text input, we utilized third-party library as much as possible to still be able to achieve the functionality that we aimed despite the time-constraint.
The AI Chat
The AI chat is not just a wrapper to API calls to an LLM (in this case, Anthropic Claude 3.5 Sonnet). We managed to make pseudo-agent with only using 2 LLM chains and a vector database retriever. We did that by injecting the chat history into the prompt of the LLM chains, to give it context and the illusion of being stateful. At its core, we aimed to utilize RAG (retrieval augmented generation) to improve the output of our AI chat (as well as to differentiate it from a simple API call). Here, the vector database retriever plays a critical role in giving the LLM domain-specific knowledge on the issue of online gambling addiction. The data that we fed into the LLM's augmented knowledge base can be seen in the training-data folder of our project. In it, we also stored the script that was used in upserting the data into the vector database. But, the use of RAG inhibits our LLM performance in cases where the user isn't trying to ask a question, such as when the user is venting about their gambling-induced divorce or just trying to make small talk. In such cases, an LLM chain designed solely to answer questions using knowledge provided by RAG would give inappropriate and strange responses. To solve this, we added an extra chain at the start that does sentiment analysis. This sentiment then gets passed on to the next chain (which is responsible to answer the user's question) to determine how it would answer the question. It would only utilize the knowledge from RAG when the user asked a question. It is also the case that sometimes the user asks a legitimate question, but the question requires context from the prior messages in the chat history. Passing the question directly into the vector database would yield bad results. To mitigate this, the first chain is also responsible for contextualizing the question based on the history. Thus, the processed question would yield more relevant result when used to query the vector database.
Challenges We Ran Into
The Limit of Serverless
Originally, we intended to implement streaming straight from the LLM chain in the AI debt analysis feature, akin to what ChatGPT does. However, it turns out that streaming (at least the way that we had tried it), didn't play well with Vercel's limited function invocation duration. Even after increasing the invocation time to the maximum time allowed (1 minute) for Vercel's free tier, we still got a 504 Gateway Error. Thus, we had to scrape this feature.
Limited Data
There were only a small amount of time at the start of the hackathon to gather the data that we are going to feed into the RAG that we had planned. Thus, the data that we ended up using was quite surface-level, and they mostly consists of blog posts and websites. Ideally, the data that are used should be much more niche and deeper within the subject matter. For example, we could have had a CSV filled with QnA that are authored by a handful of therapist and practitioner in the field. Additionally, more research journals on the matter would have also been great. Lastly, the data that we ended up using only consists of resources that are in English, simply because there were a lot more of it than those written in Bahasa Indonesia. Ideally, there should be a balance.
Limits of Our Vector Database Provider
The vector database provider that we decided to use, Upstash, has very generous free tier that goes far beyond what we needed for this project. Unfortunately, the free tier (or even all of its tiers) only has deployment in the US and the EU. This then become a bottleneck in the response time of our AI chat.
Limited Real-Life Location Data
Our initial idea was to provide the online gambling addicts with the nearest gambling rehabilitation center or gambling recovery community based on their location. Unfortunately, there are no such place in Indonesia. Most rehabilitation places are that currently exists here are for recovery from drug addiction or for physiotherapy. This only reminds us of the lack of care provided to the many victims of online gambling addiction.
Next.JS Excessive Abstractions
During the final push of our project, we discovered two strange issues with our app once it's deployed to Vercel. First, it was very slow in all of our pages. This was quite peculiar because by default, Next.JS should've rendered a page statically. Secondly, there was some strange authentication bug involving our navigation bar. The problem, it turns out, is the fact that we mistakenly used getServerSession in the RootLayour of our project. This causes all of the pages of our project to be rendered dynamically. In the place where it's appropriate, we swapped the use of that function to useSession, which doesn't cause the aforementioned issue. After doing so, our application became much less laggy and the strange authentication bug went away.
Time-Constraint
Self-explanatory.
Accomplishments that we're proud of
We are definitely proud of our all parts of our app: what it's trying to solve, the way that it aims to solve it, and lastly, its relative completeness and lack of any major bugs. Although what we have made is not perfect, it was definitely a great learning experience for us (as can be seen in the adjoining section) and we definitely think it is a great starting point that can be used for future attempts at solving the proliferation of online gambling addiction in our society.
What We Learned
What we learned mostly came from the challenges that we have mentioned in the prior section. The comparatively lacking training data that are available in the Indonesian language, as well as the lack of any rehabilitation center for online gambling addiction, made us realize the severe lack of care provided for this large and growing part of society.
What's Next For GambleGone : Paving For a Better Future
GambleGone is committed to continually evolving and expanding its services to better serve individuals impacted by gambling addiction. Our next steps include integrating more advanced AI capabilities to provide even more personalized and effective support.
Additionally, we aim to launch community outreach programs to raise awareness about the dangers of gambling addiction and the resources available through GambleGone. We are also exploring the integration of real-time data analytics to monitor user progress and adapt our interventions to better meet their needs.
Built With
- anthropic
- langchain
- langsmith
- neon
- next.js
- postgresql
- prisma
- react-query
- shadcn
- tailwind
- typescript
- upstash
- vercel
Log in or sign up for Devpost to join the conversation.