Skip to content

pratyaypandey/sure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Sure Logo Sure

An AI-augmented intelligence layer that transforms how you write and verify information online

"Where AI meets authenticity - because every word should be backed by truth"

Sure is the first AI-augmented intelligence layer that seamlessly integrates into your writing workflow, providing real-time fact-checking and comprehensive quality assessment as you type. Built with cutting-edge AI technology, Sure acts as your intelligent writing companion, automatically detecting factual claims, verifying their accuracy, and providing detailed quality insights to help you write with confidence and authority.

Think of Sure as your personal fact-checking assistant that never sleeps, never gets tired, and never misses a claim.

✨ Features

πŸ” Real-time Fact-Checking

  • Instant Analysis: Monitors text as you type in any editable field
  • Smart Detection: Uses advanced BERT models to identify factual claims
  • AI-Powered Verification: Leverages Grok-3 and web search for accurate fact-checking
  • Visual Feedback: Highlights claims with color-coded indicators based on accuracy

πŸ“Š Comprehensive Quality Assessment

  • Multi-Dimensional Scoring: Evaluates content across 5 key dimensions:
    • Factual Accuracy (40%): Truthfulness of claims
    • Source Quality (25%): Credibility of cited sources
    • Claim Density (15%): Appropriate balance of claims to content
    • Confidence Consistency (10%): Reliability of assessment methodology
    • Evidence Support (10%): Proportion of claims backed by sources

🎯 Intelligent Source Evaluation

  • Premium Sources: Reuters, AP, BBC, Nature, NEJM (+100 points)
  • Quality Sources: NYT, WSJ, CNN, Wikipedia (+80 points)
  • Standard Sources: Other verifiable sources (+60 points)
  • Smart Prioritization: Investigative journalism over opinion content

πŸš€ Advanced Technology Stack

  • Hybrid AI Approach: BERT for detection + Grok for assessment
  • Enhanced Vectorstore: Context-aware fact-checking with FAISS
  • Multi-Query Search: Investigative, news, and fact-checking strategies
  • Coreference Resolution: Better understanding of complex text

🎨 Visual Experience

  • Color-Coded Highlights:
    • 🟒 Green: Factual claims
    • 🟑 Yellow: Somewhat accurate claims
    • πŸ”΄ Red: False or unverified claims
  • Interactive Tooltips: Click highlighted claims for detailed information
  • Quality Widget: Real-time scoring and grade display
  • Loading Indicators: Smooth user experience with progress feedback

πŸ› οΈ Installation

Prerequisites

  • Node.js (v16 or higher)
  • Python (3.8 or higher)
  • Chrome Browser

Quick Start

  1. Clone the repository:

    git clone https://github.com/yourusername/sure.git
    cd sure
  2. Set up the server:

    cd server
    uv sync
    uv run fastapi dev main.py
  3. Build the extension:

    cd ../sure-extension
    npm install
    npm run build
  4. Load in Chrome:

    • Open chrome://extensions/
    • Enable "Developer mode"
    • Click "Load unpacked"
    • Select the sure-extension/dist folder

πŸ“ˆ How It Works

1. Text Monitoring

Sure continuously monitors editable fields (<input>, <textarea>, contenteditable) as you type, using intelligent debouncing to avoid unnecessary API calls.

2. Claim Detection

When you pause typing, Sure uses a custom BERT model (NeelKondapalli/claim-bert) to identify factual claims in your text.

3. Fact Verification

Each claim is analyzed using:

  • Grok-3 AI: Advanced reasoning and fact-checking
  • Web Search: DuckDuckGo integration with source prioritization
  • Vectorstore Context: Enhanced understanding from processed content

4. Quality Assessment

Your content receives a comprehensive score based on:

  • Factual accuracy of claims
  • Quality of sources used
  • Appropriate claim density
  • Consistency of confidence scores
  • Evidence support for claims

5. Visual Feedback

Results are displayed through:

  • Highlighted claims with accuracy indicators
  • Interactive tooltips with detailed information
  • Real-time quality scoring and grading
  • Actionable improvement suggestions

🎯 Use Cases

Content Creators

  • Journalists: Verify facts before publication
  • Bloggers: Improve credibility through better sourcing
  • Students: Enhance academic writing quality
  • Researchers: Ensure accuracy in documentation

Content Moderation

  • Social Media: Identify misleading content
  • News Platforms: Prioritize well-sourced articles
  • Educational: Grade factual accuracy in submissions

Professional Writing

  • Marketing: Ensure claims are verifiable
  • Technical Writing: Maintain accuracy in documentation
  • Legal: Verify factual statements in briefs

πŸ”§ Configuration

API Endpoints

  • /predict: Hybrid BERT + Grok fact-checking
  • /extract: Grok-only claim extraction
  • /vectorstore/add: Add URLs to knowledge base
  • /vectorstore/search: Search stored content

Customization Options

  • Debounce Timing: Adjust analysis delay (default: 1 second)
  • API Endpoints: Configure server URLs
  • Highlight Styles: Customize visual indicators
  • Source Priorities: Modify credibility scoring

πŸ“Š Performance

  • Response Time: < 2 seconds for typical content
  • Accuracy: 85%+ fact-checking accuracy with enhanced search
  • Memory Efficient: Smart caching and request deduplication
  • Non-Intrusive: Minimal impact on typing performance

πŸ§ͺ Testing

Try these example claims to test Sure's capabilities:

Mixed Accuracy:

"COVID-19 vaccines are effective. Water boils at 100Β°C. Earth is flat."

Political Claims:

"The unemployment rate is at a 50-year low and inflation is under control."

Scientific Claims:

"Photosynthesis converts sunlight into energy and the speed of light is 299,792,458 m/s."

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Browser       β”‚    β”‚   FastAPI        β”‚    β”‚   AI Services   β”‚
β”‚   Extension     │◄──►│   Server         │◄──►│   (Grok, BERT)  β”‚
β”‚                 β”‚    β”‚                  β”‚    β”‚                 β”‚
β”‚ β€’ Content Scriptβ”‚    β”‚ β€’ Claim Detectionβ”‚    β”‚ β€’ Fact Checking β”‚
β”‚ β€’ DOM Handler   β”‚    β”‚ β€’ Quality Assess β”‚    β”‚ β€’ Web Search    β”‚
β”‚ β€’ UI Components β”‚    β”‚ β€’ Vectorstore    β”‚    β”‚ β€’ Source Eval   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ”’ Privacy & Security

  • Local Processing: BERT models run locally for privacy
  • Secure API: HTTPS communication with server
  • No Data Storage: Text is processed in real-time only
  • Open Source: Transparent code for security auditing

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Setup

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • BERT Model: NeelKondapalli/claim-bert for claim detection
  • Grok AI: Advanced fact-checking capabilities
  • FastAPI: High-performance web framework
  • React: Modern UI development
  • Chrome Extensions API: Browser integration

πŸ“ž Support

πŸš€ Roadmap

  • Multi-language support (Spanish, French, German)
  • Mobile browser support
  • Real-time collaboration features
  • Advanced analytics dashboard
  • API for third-party integrations
  • Machine learning model improvements

Built with ❀️ for a more truthful web

Sure - Because accuracy matters.

About

🎯 An AI-augmented intelligence layer that transforms how you write and verify information online

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors