Inspiration
Every friend group manages their collective finances - but most of them use dedicated apps. These apps slowly clutter your phone since every friend group needs a different one.
Our project came from the radical thought of: Do not add another app!.
What it does
PaiBOY allows users to manage their finances through any messaging app — we used Telegram for our demo.
PaiBOY reads messages written in any chat it is part of. When users @tag it, it summarizes the given chat. This summary lists how much every member of the group chat is owed.
How we built it
We don't need a frontend, since PaiBOY is meant to be integrated into a messaging app.
Our backend is written in Python with the use of BAML, which interprets all messages and updates the debt statements. Persistent information (i.e. debt statements) is stored inside a MongoDB database.
To interact with the Telegram API, we used Flask and the requests libraries.
Challenges we ran into
It is well known that LLMs hallucinate and are not great at mental math/accounting. Because of this, we restricted the role AI was playing in the backend and used it only as a parser. With this restriction (both for us and the LLM), we built a lot of management code on top of an existing database to store/delete/read any debt.
Testing the correctness of a server-like bot takes a lot of time due to constant restarting and message sending. We should have automated this process, but we didn’t have enough experience in this area.
Accomplishments that we're proud of
The accomplishment we are most proud of is the first correct reading of a bill from our bot.
What we learned
Some of us were complete beginners in BAML - Basically A Made-Up Language, but luckily it is very simple. As it should be! An LLM function just takes input and returns structured output. You write the header and a prompt, and BAML does the rest.
We learned a lot about working with the Telegram API, with the help of their documentation.
What's next for PaiBOY
There is always room for improvement in preprocessing the message context we send to the model in the backend to make it more reliable.
Other quality of life changes would be:
- Periodic announcement of debts to create accountability
- Automatic and forced data deletion from the bot
- Support for voice message parsing
Log in or sign up for Devpost to join the conversation.