Inspiration
This project was born from a simple but urgent question: How can we use LLMs to detect and explain harmful content across platforms—at scale, in real time, and with transparency? I set out to build a modular, async-powered content moderation system that could analyze text for toxicity, bias, misinformation, and sentiment using LLMs like OpenAI’s GPT-4o. The goal was to go beyond binary flags and deliver explainable, multi-dimensional insights with confidence scores, categories, and reasoning.
I’ve worked on systems where content safety was an afterthought—bolted on, opaque, and reactive. I wanted to flip that: Make moderation proactive, not reactive Make LLMs auditable, not mysterious Make the system modular and reproducible, not brittle or black-boxed The recent rise in AI-generated content and misinformation made this feel especially timely.
What it does
How we built it
Backend: Python + asyncio + OpenAI’s AsyncOpenAI client for concurrent LLM calls Frontend: Streamlit dashboard with tabs for single analysis, batch processing, analytics, and alerts LLM Prompts: Custom-crafted for each dimension (toxicity, bias, misinformation, sentiment), returning structured JSON Caching: Redis integration to avoid redundant LLM calls and reduce cost Visualization: Plotly for 3D scatter plots, category distributions, and sentiment trends Deployment: Daytona-ready with requirements.txt, .gitignore, and modular file structure I used asyncio.gather() to run all four LLM analyses in parallel, reducing latency. Each result includes a confidence score
Challenges we ran into
Challenges I Faced Streamlit’s event loop clashed with asyncio.run() — fixed with nest_asyncio.apply() st.set_page_config() had to be the first Streamlit call — easy to miss, hard to debug Prompt tuning was non-trivial: LLMs would sometimes hallucinate or return malformed JSON Managing batch processing without hitting rate limits or blowing up costs
Outcome
The final system is: Modular: Easy to extend with new models or moderation dimensions Explainable: Every score comes with reasoning and categories Demo-ready: Judges can run it instantly with their own API key Scalable: Async architecture supports batch analysis and caching
Accomplishments that we're proud of
What we learned
How to structure LLM prompts for consistent, parseable JSON output How to manage concurrent async workflows in Streamlit using nest_asyncio How to balance LLM cost, latency, and interpretability How to build a reproducible, judge-friendly demo with clear UX and modular code
Log in or sign up for Devpost to join the conversation.