Myth Buster: Unmasking Misinformation with AI-Powered Deep Research


Inspiration

In an age overflowing with information and pervasive misinformation, it's increasingly challenging to distinguish credible facts from cleverly disguised fiction. We're constantly bombarded with statements, claims, and "common knowledge" that often turn out to be myths. The inspiration for Myth Buster stemmed from a simple desire: to create an accessible, engaging, and reliable tool that empowers everyone to cut through the noise, verify information quickly, and, crucially, understand the truth behind the headlines and hearsay through deep, evidence-based investigation. We envisioned a platform where curiosity is rewarded with clarity and the tools to scrutinize information sources.

What it does

Myth Buster is your comprehensive AI-powered assistant for navigating the complex world of information and combating misinformation. Leveraging the power of the Perplexity Sonar API, it goes beyond simple true/false answers to enable multifaceted, user-guided investigations.

At its core, it helps you:

  • Verify Myths Instantly (/app): Got a statement you're unsure about? Just type it in! Our system uses the powerful Perplexity Sonar AI to analyze it, delivering a verdict (True, False, or Inconclusive) along with a detailed explanation, credible citations, the myth's likely origin, and even reasons why it might be commonly believed.
  • Conduct Deep Research (/app): This is where Myth Buster truly shines. After an initial verification, you can dive deeper by:
    • Exploring Multiple Angles: Analyze the myth from diverse perspectives like Historical, Scientific, Cultural, Psychological, Economic, or Political. You can even define your own Custom Lenses to investigate the myth from any angle you choose, guiding the AI's research.
    • Deconstructing Evidence: Don't just trust the citations. Select specific sources and prompt the AI to critically analyze their methodology, assess reliability, or find corroborating/contradicting evidence. You maintain agency by asking custom questions about the sources.
    • Synthesizing Insights: After exploring different angles and sources, combine all your findings. The AI helps identify overarching themes, connections, and contradictions across the various analyses, transforming disparate information into a cohesive understanding.
  • Play the Myth Busting Game (/game): Learning can be fun! Our interactive game challenges your knowledge. The AI generates statements, and you guess their veracity, indicating your confidence. You get immediate feedback, points for correct answers, and, of course, the full story with sources. Your scores and streaks are even saved for next time!
  • Engage with a Dynamic Landing Page (/): Our landing page isn't just a welcome mat. It features an interactive "Mini-Myth Quick Check" powered by a dedicated API endpoint, where you can immediately test your knowledge on a few random myths, getting a taste of the app's power right away.
  • Join a Growing Community (/community): See how many others have joined the quest for truth and sign up for updates on our community plans, including potential Discord server launches.
  • Manage Your Profile: With full user authentication (Sign Up, Sign In, Sign Out, Profile Updates), you can manage your account and, in future updates, track your personal myth-busting journey.

It's more than just a fact-checker; it's a platform for guided discovery and critical understanding.

How we built it

Myth Buster is a modern web application built with a focus on speed, interactivity, and a seamless user experience, designed for robust full-stack functionality.

  • SvelteKit & Svelte 5: We chose SvelteKit as our full-stack framework. This allowed us to write an application that is incredibly fast and efficient, handling everything from displaying pages to securely talking to external APIs on the server side. We fully embraced Svelte 5's new reactivity model for clean and predictable state management, making even complex UIs feel snappy.
  • TypeScript: To ensure our code is robust and maintainable, we used TypeScript throughout the project, enforcing type safety, especially for API responses and data structures.
  • Perplexity Sonar API: This is the brain behind our verification and deep research. We make targeted API calls from server-side SvelteKit actions to protect our API key and handle complex requests. A significant amount of effort went into advanced prompt engineering to get the AI to return detailed, structured analysis for different research angles, source analyses, and synthesis. We also implemented caching mechanisms.
  • Shadcn-Svelte & Tailwind CSS: For the look and feel, we used Shadcn-Svelte components, styled with Tailwind CSS. This combination allowed us to build an accessible, responsive, and visually appealing interface quickly. We used Lucide-Svelte for all icons, ensuring consistency.
  • Animations & Engagement: We sprinkled in animations using Svelte-Motion, Svelte-Magic-UI, and Lottie to make the experience more dynamic and engaging – from loading indicators for deep research steps to visual feedback for game answers.
  • State Persistence: We used the runed library's PersistedState module to save user game scores and settings locally in the browser, providing a persistent experience across sessions. In the future, most saving features (like history, bookmarks, and progress) will be moved to be associated with logged-in user accounts for a more seamless, cross-device experience.
  • Bun: For our development environment and package management, we used Bun, known for its incredible speed for installing dependencies and running scripts.

Structured Output with response_format

A key technical milestone was our adoption of the Perplexity API's response_format parameter, specifically the json_schema type, to request structured outputs for myth verification and deep research features. We defined robust TypeScript interfaces and corresponding JSON schemas, sending these in our API payloads to guide the AI toward returning well-structured, machine-parseable results.

However, we discovered that even with response_format enabled, the API's responses were not always perfectly structured—sometimes returning JSON as a string, sometimes as a markdown code block, and occasionally with minor schema deviations. To address this, we implemented robust server-side parsing and validation logic: extracting JSON from markdown, parsing strings, and validating the resulting objects against our expected interfaces. This ensured our app remained reliable and type-safe, even when the API's output wasn't flawless.

Essentially, SvelteKit's server actions (+page.server.ts) are central to handling user submissions (myth verification, research queries, authentication) and securely interacting with the Perplexity API, while Svelte 5 and the UI libraries manage the dynamic frontend presentation.

Challenges we ran into

Every project has its hurdles, and Myth Buster was no exception! Building a tool that goes beyond simple verification into deep, user-guided research presented unique challenges:

  • Advanced AI Prompting & Consistency: Getting the Perplexity Sonar API to consistently provide structured data (like JSON objects for analysis results or lists of citations) across various, sometimes open-ended, user prompts for deep research was a significant challenge. Even with the new response_format parameter, responses were not always perfectly structured, requiring us to build extra parsing and validation layers to handle inconsistencies.
  • Managing Complex State & Data Flow: The deep research features introduce multiple layers of asynchronous operations and interconnected data (initial result -> lenses -> source analyses -> synthesis). Managing this complex state on the client-side using Svelte 5 runes while maintaining a clear data flow between the server actions and the UI required careful architectural design and refactoring.
  • Designing for Progressive Disclosure: Presenting complex deep research capabilities (/app) without overwhelming users who just want a quick answer required a thoughtful UX design that progressively reveals advanced options after the initial result.
  • Performance & API Usage: Balancing the depth of AI analysis (which can involve multiple API calls for different lenses or sources) with perceived performance and managing API usage efficiently required implementing strategic server-side caching where appropriate (though currently limited for real-time results) and providing clear loading indicators.

Accomplishments that we're proud of

Despite the challenges, we're thrilled with what we've built and the deep research capabilities we've implemented:

  • Implemented Core Deep Research Pillars: We successfully integrated the three key deep research features planned for the hackathon:
    • Multi-Angle Investigation: Users can truly explore myths from numerous predefined and custom-defined perspectives.
    • Evidence Deconstruction: Users can select and analyze individual sources with targeted AI queries.
    • Dynamic Insight Mapping: The system synthesizes findings across different lenses to provide a coherent overview.
  • Empowering User Agency: We are proud that our implementation allows users to actively guide the research process by selecting lenses, defining custom queries, and choosing sources for deeper analysis, transforming them from passive recipients of information into active investigators.
  • Seamless AI Integration: The Perplexity Sonar API is integrated smoothly via server actions, providing rich, contextual information that forms the heart of our application's deep research power.
  • Engaging User Experience: From the interactive mini-myth checker on the landing page to the immediate feedback in the game and the guided flow of the deep research section, we've focused on making learning and investigation fun and accessible.
  • Solid Technical Foundation: Built with SvelteKit, Svelte 5, TypeScript, and robust server-side logic, Myth Buster has a strong foundation for future growth.

What we learned

This journey has been a fantastic learning experience, particularly in pushing the boundaries of AI-assisted research:

  • The Art of Prompt Engineering: We gained a deep appreciation for how precise and structured prompts are essential for getting usable, consistent outputs from large language models, especially when the desired output format is specific (like JSON).
  • Designing for AI Capabilities: Building features that truly leverage an AI's strengths (like synthesis, source analysis, generating varied perspectives) requires designing the user flow and UI around those capabilities, making the AI feel like a partner in the research process.
  • The Importance of Server-Side: Using SvelteKit's server actions was crucial not only for security (API keys) but also for orchestrating complex, multi-step AI interactions and processing large responses before sending them to the client.
  • SvelteKit & Svelte 5 for Complex Apps: This project validated SvelteKit's suitability for building full-stack applications with complex interactive states, and Svelte 5's reactivity model significantly improved the clarity and maintainability of our reactive logic.
  • User Agency in Research: We learned that giving users control over how information is explored and analyzed can significantly enhance their engagement and critical thinking compared to simply presenting them with a final answer.

What's next for Myth Buster

The quest for truth never ends, and neither does the development of Myth Buster! We have an exciting roadmap ahead to further enhance its deep research and community features:

  • Expanding Deep Research: Implement features like Longitudinal Information Trace (tracking myth evolution over time) and Comparative Myth Analysis (comparing variations or similar myths across cultures).
  • Refining Analysis & Explanation: Add Source Credibility/Type Indicators based on AI analysis, implement an "Explain Like I'm 5" (ELI5) mode for simpler explanations, and potentially a "Why This Myth Spreads" analysis.
  • Enhanced Gamification & Learning: Introduce Gamified Learning Tracks where users complete themed myth challenges generated with AI logic (partially implemented in plan).
  • Community & Collaboration: Build out Community Myth Submissions and Voting, allowing users to suggest myths and help prioritize verifications.
  • Technical Excellence & Polish: Implement more comprehensive error handling, refine caching strategies, improve accessibility, and potentially add features like a myth history/bookmarking system.

Our vision is for Myth Buster to become the go-to platform for anyone looking to understand the world a little better, fostering a community of curious minds dedicated to uncovering and sharing the truth through empowered, AI-assisted deep research. Stay tuned!

Built With

  • bun.
  • lottie
  • lucide-svelte
  • perplexity-sonar-api
  • shadcn-svelte
  • svelte-5
  • svelte-magic-ui
  • svelte-motion
  • sveltekit
  • tailwind-css
  • typescript
Share this project:

Updates