Inspiration

LLMs are a great way to automatize tasks. I am overwhelmed by all the recent advances in this field, so I thought I could put it to good use. I often use public forums, such as Reddit, and thinking about all the work it takes to moderate all that is posted there I thought I could help make the process easier.

What it does

ModerAItor takes a post's URL (only Reddit is supported for now) and a set of rules. With this information, it automatically parses the comments of the post and determines whether the comments are safe or not by returning the labels "SAFE" or "FLAG".

How we built it

I have used the following tools:

  • LangChain: the framework I used to interact with the LLM.
  • OpenAssistant: oasst-sft-4-pythia-12b-epoch-3.5 model, which is completely open source.
  • FastAPI: to serve ModerAItor as a web application.
  • Docker: to build the application in a replicable way.

Challenges we ran into

  • Serving an LLM is not cheap: for some models, the instance where the model is deployed costs around a dollar per hour, which is quite expensive for an application that is available 24/7.
  • It is hard to make an LLM consistent: making the LLM output consistent was complicated, given that it had to return "SAFE" or "FLAG". Careful prompt engineering was needed to achieve the desired results.

Accomplishments that we're proud of

Deploying the application on the cloud so anyone can try it out is something I am proud of. Moreover, anyone can do the same thing given that the app is fully containerized via docker-compose.

What we learned

I learned that not all LLM models work the same: some need specific prompts, some are not "intelligent" enough for the task you are dealing with, etc.

What's next for ModerAItor

ModerAItor has great potential for improvement. For example, instead of returning just "SAFE" or "FLAG", it could explain to a human moderator why did it choose that specific flag. In addition, with a human in the loop assessing the results of the LLM, ModerAItor could be fine-tuned to make an even better job. Finally, ModerAItor could be expanded to other public forums other than Reddit.

Built With

Share this project:

Updates