Inspiration
A source of inspiration for Gendright stems from the increasing role of social media in shaping public perceptions. Many people unintentionally use gender-biased language without realizing it, especially when expressing opinions online. I recognized that while people generally want to communicate respectfully, they may not always be aware of language that could be perceived as biased. Gendright aims to bridge this gap by providing real-time, non-intrusive feedback to help users write more inclusive and gender-neutral text. Grammarly, a popular grammar correction application, is another source of inspiration for Gendright. Gendright fills a gap left by such a popular grammar tool.
What it does
Gendright is an Android accessibility service that detects gender-biased language in real-time as users type. When it identifies potentially biased content, it unobtrusively provides alternative suggestions. Users can view and select rephrased options by tapping on our floating widget. This allows people to communicate more respectfully and inclusively without altering the flow of their writing.
How we built it
Gendright is an Android application built with Jetpack Compose and Android Views for the UI. It utilizes Google AI Client SDK with the Gemini 1.5 Flash model to provide real-time suggestions for when gender-unsafe elements are detected in any text the user types on their mobile device. The app was designed as an Android accessibility service, with extra features such as dynamic colors to give users a more personal feeling.
Challenges we ran into
One of the main challenges was prompt engineering to create suggestions that preserve the original text’s intent. As this was a novel experience with AI models for me, there was a bit of a challenge in creating a prompt that produced output with suggestions that removed all gender-unsafe elements and still maintained the core message of the original text. I also faced UI/UX challenges with the accessibility service. Initially, the floating widget never went away on the Android app. Aiming to provide a clean user experience I decided to dismiss the floating widget when there's no input field in focus. Relying on the accessibility events alone did not prove easy. I settled on instead relying on when the device's input method's window is no longer available (primarily meaning the user has closed the keyboard) to hide the floating widget so that I can avoid cluttering the user’s screen. Lastly, another prominent challenge was hitting the quota limit for the model. Typing could be a high-speed activity that results in numerous trips to Google's servers. Subsequent calls to the Gemini API lead to a resource-exhausted error. To mitigate this, I started with a one-second delay but still faced this problem. I finally settled on a three-second delay before making the request and added a retry mechanism.
Accomplishments that we're proud of
I am particularly proud of Gendright’s ability to deliver relevant, and real-time suggestions that encourage inclusive language. Achieving smooth integration with Google’s AI models was also a significant technical milestone. Gendright is such a simple app, but it sends a powerful message by filling a unique niche not covered by many popular tools. I am also glad I could provide a friendly UX for the app!
What we learned
Building Gendright taught us about prompt engineering, especially when tackling the nuances of retaining message clarity in rephrased suggestions. The project was an invaluable experience in working with Google’s AI tools and accessibility services on Android. Working with the different models and parameters to get an appropriate response was challenging but truly rewarding.
What's next for Gendright
Through this learning experience, I've learned so much and hope to improve Gendright in many ways:
- I will be adding more features to Gendright to help people also learn what elements of their sentences can be gender biased. Educating people on this would help them be more conscious of their words.
- To make Gendright production ready, I will be integrating Google’s Vertex AI in Firebase into Gendright for now to get a more secure experience
- I plan to expand to other platforms, enabling a broader user base to benefit from gender-neutral language suggestions. Expanding into web or iOS would allow Gendright to reach beyond Android and further support respectful, inclusive communication.
- I am exploring training a custom model using curated datasets to enhance the accuracy and nuance of suggestions.
- Although I will later transition to Vertex AI, I am also looking at on-device machine learning. Considering the experience for users, I know that Gendright must be fast, so ODML is a path I'll also explore. Additionally, in the quest of training a model, I would like to train a model small enough that it can be downloaded quickly because running tests with a Gemma model through MediaPipe, I had to download a file with a size of over 2GB! I also don't want to sacrifice too much accuracy. I want to train a Gendright model that genuinely understands how to provide suggestions that everyone is happy with!
Log in or sign up for Devpost to join the conversation.