Inspiration
Everytime I register for a site, I find myself pointlessly clicking the "Agree to terms and conditions" checkbox. I mean, who actually reads it all? Yet, buried within that legalese are crucial details about our data, our rights, and potential risks. The inspiration for TOSDenied came from a simple, legal lawsuit between a dad and "Roblox" that happened recently. I wanted to build a tool that empowers everyday users, giving them a fighting chance to quickly grasp what they're signing up for, before they click "I Agree." I believe everyone deserves to know what's in the fine print, without needing a law degree.
What it does
TOSDenied is a web application that uses the power of Perplexity Sonar's Deep Reasearch to demystify complex Terms of Service and Privacy Policies. Users can input a product name and company (or even a direct URL to the policy page), and TOSDenied gets to work. It:
- Finds and analyzes the relevant policy documents.
- Identifies key "red flags" – clauses that could be detrimental or unfair to the consumer.
- Explains these red flags in plain, simple English, using bolding to highlight the most critical points for at-a-glance understanding.
- Orders these concerns from most to least severe.
- Assigns an overall consumer-friendliness grade (S, A, B, or C) to the policy.
- Provides direct links to the original ToS and Privacy Policy documents for those who want to dig deeper.
- Saves and caches the analysis so that API requests aren't sent over and over.
The goal is to provide a quick, digestible, and actionable summary so users can make more informed decisions.
How we built it
I built TOSDenied as a web application using Next.js for a fast, modern frontend experience. The core intelligence comes from the Perplexity Sonar Deepresearch API.
A significant portion of our development time was dedicated to iterative prompt engineering. We started with a basic idea and progressively refined our prompts to the Sonar model to achieve the specific, structured JSON output we needed. This involved:
- Enforcing a strict JSON schema.
- Guiding the AI to extract specific information like policy URLs and icon URLs.
- Training it to identify red flags and then rephrase them into extremely simple, concise language with markdown bolding.
- Developing a more nuanced, relative grading system to avoid generic scores.
- Instructing the AI to order red flags by severity.
The frontend then takes this structured JSON and presents it in a clean, user-friendly interface.
Challenges we ran into
Working with a powerful LLM like Sonar was exciting, but it came with its own set of challenges:
- Prompt Adherence for Complex Outputs: Getting the AI to do exactly what we wanted to do required 4000 tokens by default.
- Nuanced Grading: Initially, the AI tended to default to a middle-ground grade (like "B"). Pushing it to use the full S-C spectrum based on the actual findings for a given policy, and to make that grading feel relative, was a significant prompt engineering effort.
- Balancing Detail with Brevity: We wanted to be thorough in flagging concerns but also keep the summaries incredibly short for quick user understanding. Finding this balance in the AI's output was key.
- Hosting: Hosting in Vercel or serverless platforms aren't possible due to the high time required for Deep Research to work.
Accomplishments that we're proud of
Despite the challenges, I'm incredibly proud of what we've managed to build in a short time:
- The structured and detailed JSON output: I successfully got Sonar to return precisely what we need, including URLs, icons, ordered red flags, and grades.
- Truly simplified red flag explanations: The AI now generates genuinely easy-to-understand summaries with helpful bolding, which is core to our mission.
- A functional relative grading system: While always improvable, the AI now attempts a more differentiated grading based on the severity and number of issues found.
- The user experience: I believe the Next.js frontend effectively presents this complex information in a clear and accessible way.
- Self-Hosting: I learnt to self-host and manage the website myself, in a separate server.
What we learned
This hackathon has been a fantastic learning experience:
- The Power of LLMs for Real-World Problems: Perplexity Sonar's ability to search and synthesize information is incredible, and it's a perfect fit for tackling the "unreadable fine print" problem. It also is the only AI currently, which can effectively remove the "knowledge" cutoff from LLMs by integrating it with Web Search, allowing users to find any company/product.
What's next for TOSDenied
We're excited about the potential for TOSDenied and have many ideas for its future:
- Browser Extension: Allow users to analyze policies directly on the page they're visiting with a single click.
- Expanding the Database & Caching: Store analyses of popular services for even faster results and to track changes in policies over time.
- Community Contributions: Allow users to submit policies for analysis, rate the accuracy of summaries, or even highlight new concerns they've found.
- Deeper Analysis Features: Potentially compare a policy against industry best practices or highlight how a specific policy has changed over time.
- Personalization: Allow users to specify areas of particular concern to them (e.g., data sharing, arbitration clauses) for a more tailored summary.
Built With
- nextjs
- perplexity
- sonar
Log in or sign up for Devpost to join the conversation.