Skip to content

docs(showcase): add docs/showcase/fact-dynamics.mdx for Fact Dynamics pr… #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 2, 2025

Conversation

vishnu32510
Copy link
Contributor

Description

Adding Fact Dynamics, a cross-platform Flutter application that leverages Perplexity's Sonar API to provide real-time fact-checking for spoken content and images. This hackathon-winning project demonstrates advanced integration with Perplexity's API for live debate analysis, speech transcription fact-checking, and image content verification.

Type of Contribution

  • Example Tutorial
  • Showcase Project
  • Article/Integration Guide
  • Documentation Update
  • Bug Fix
  • Other (please describe)

Checklist

  • My code follows the cookbook's style guidelines
  • I have included comprehensive documentation
  • I have tested my code and it works as expected
  • I have included all necessary dependencies and setup instructions
  • My MDX file includes proper frontmatter (title, description, keywords)
  • I have linked to any external repositories or live demos

Project Details

What problem does this solve?
Fact Dynamics addresses the critical challenge of misinformation in real-time communications by providing instant fact-checking capabilities during:

  • Live debates and political discussions
  • Educational presentations and lectures
  • Social media content verification
  • Image-based claim verification
  • On-the-fly information validation during conversations

The app democratizes fact-checking tools that were previously only available to journalists and professional fact-checkers, making them accessible to everyone.

What makes this contribution valuable to other developers?
This project showcases several advanced Perplexity API integration patterns:

  1. Real-time Speech Processing: Demonstrates streaming audio transcription combined with immediate API fact-checking
  2. Custom SDK Development: Includes two open-source packages (perplexity_dart and perplexity_flutter) that other developers can use
  3. Structured JSON Responses: Shows how to craft prompts for consistent, parseable API responses with claims, ratings, and sources
  4. Image Analysis Integration: Demonstrates multimodal capabilities for text extraction and verification from images
  5. Firebase + Perplexity Integration: Complete architecture showing how to persist API results with user authentication
  6. Cross-platform Implementation: Full Flutter app supporting iOS, Android, and Web platforms
  7. Production-ready Features: Includes proper error handling, state management, and user experience patterns

External Links:

Testing

The application has been thoroughly tested across multiple scenarios:

  • Speech Recognition: Tested with various accents, speaking speeds, and background noise levels
  • Fact-checking Accuracy: Validated against known true/false statements and current events
  • Image Analysis: Tested with screenshots, memes, infographics, and social media posts
  • Cross-platform Compatibility: Verified on iOS (iPhone/iPad), Android devices, and web browsers
  • Firebase Integration: Authentication flows and data persistence tested extensively
  • API Error Handling: Tested with rate limits, network failures, and malformed responses
  • Real-time Performance: Stress-tested during live debate scenarios with continuous speech input

Screenshots

The project includes comprehensive screenshots showing:

  • Login/authentication flow
  • Main dashboard interface
  • Real-time fact-checking in action
  • Historical fact-check results
  • User profile and settings
  • Speech analysis and image verification workflows

All screenshots are available in the repository at /assets/screenshots/ and integrated into the documentation.

Additional Notes

Hackathon Achievement

This project was developed for the Perplexity Hackathon and submitted in the "Information Tools" and "Deep Research & Education" categories. It represents a complete, production-ready application built in a compressed timeframe.

Open Source Contribution

As part of this project, I developed and published two reusable packages to help the broader Flutter/Dart community integrate with Perplexity's API:

  • perplexity_dart: Core Dart SDK with type-safe API client
  • perplexity_flutter: Flutter-specific widgets and utilities

Technical Innovation

The project demonstrates several innovative approaches:

  • Custom prompt engineering for structured JSON responses
  • Real-time audio chunking and processing
  • Efficient state management for continuous API calls
  • Cross-platform permission handling for microphone/camera access
  • Offline-capable data persistence with Firestore sync

Future Impact

This showcase provides a foundation that other developers can build upon for:

  • Educational technology applications
  • Newsroom and journalism tools
  • Social media verification systems
  • Accessibility tools for information validation
  • Research and academic fact-checking platforms

The comprehensive documentation and open-source SDKs lower the barrier for other developers to create similar applications or integrate fact-checking capabilities into existing projects.

Copy link
Collaborator

@kesku kesku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice project - realtime fact checking is a great Sonar use case! That said, this doc is too long for a showcase (~180 lines) and reads like a full setup README.

Please trim to:

  • What Fact Dynamics is
  • What it does
  • How it uses Perplexity
  • Key links (repo, demo, video)

You can use briefo.mdxas a reference - keep it at or under ~100 lines max.

@vishnu32510
Copy link
Contributor Author

Hi @kesku ! Thank you for the feedback. I've updated the docs as you suggested.

@kesku kesku merged commit 46ca124 into perplexityai:main Aug 2, 2025
5 checks passed
@kesku
Copy link
Collaborator

kesku commented Aug 2, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants