Skip to content

Haresh-729/AdGuardAi

Repository files navigation

AdGuard AI

Instant Ad Compliance Checker: An AI-Powered Multimodal Tool for Fast, Policy-Safe Ad Approvals

AdGuard AI Overview

🚀 Overview

Digital advertising platforms face a major challenge in ensuring that ads comply with strict policy guidelines. Advertisers often submit creatives (text, images, videos, landing pages) that unintentionally violate rules, leading to delayed approvals, repeated rejections, and wasted time for both advertisers and internal review teams. Manual compliance checks are resource-intensive and slow, creating friction in the ad publishing pipeline.

Our product, the Instant Ad Compliance Checker, solves this problem by providing advertisers with an AI-powered tool that pre-screens ad content before submission. By detecting potential violations early, advertisers can make corrections instantly, reducing back-and-forth cycles and accelerating the approval process.

Final Presentation: Click to View

Greatest USP:

Accuracy Tested and Tried on All types of Advertisements especially False Positive, False Negative our entire project performs good in all scenarios…. And by reinforcement learning it will be more strong….

Video Demo: Click to View

Postman Link: Click to View APIs


## Example False Negative. Screenshot 2025-09-29 002703 image

Example. Complianced and had few doubts with 60% confidence of valid content but After reverification with the user on call final Verict from AI was Fail.

Reasons:

     User fumbuled during the call.
     User took too long to reply.
     User was not confident during the call.

Recording of the Call: fumbulled call.mp3

Some Snapshots: image image image image image image

✨ Key Features

The tool's value lies in its multimodal AI approach:

  • 📝 Text/Ad Copy Analysis: Fine-tuned LLMs flag prohibited language, exaggerated claims, and formatting violations using RAG-based policy compliance
  • 🖼️ Image Analysis: Qwen2.5 7B parameter model detects adult/violent imagery, trademark misuse, or misleading visual cues
  • 🎥 Video Analysis: Adaptive frame sampling with frames passed to image model for inappropriate visuals detection
  • 🌐 Landing Page Checks: Browser Use Agent crawls and validates that page content aligns with ad promises
  • 🎙️ Voice Analysis: Whisper integration for audio transcription and policy violation detection
  • 🤖 Interactive Clarification: AI-assisted calls with transcript analysis and compliance score updates

🎯 Unique Selling Point (USP)

What makes this product stand out is its explainable AI-driven reporting. Instead of just rejecting ads, it provides clear, actionable feedback with compliance scores, severity levels, and improvement suggestions. This transforms compliance from a bottleneck into a collaborative, AI-assisted process empowering advertisers and streamlining review operations.

🧠 AI/LLM Architecture

AI Use Case Architecture

Central Role of AI/LLMs:

  • AI and LLMs are the core engines driving compliance checks across all ad modalities (text, image, video, landing page)
  • They perform contextual reasoning, identify prohibited content, detect misleading claims, and generate explainable compliance reports

Models & Techniques Leveraged:

  1. Text Analysis:

    • Qwen2.5 7B parameter model for detecting prohibited or misleading ad copy and claims
    • RAG-based policy text model for contextual compliance checking
  2. Image Analysis:

    • Qwen2.5 7B parameter model for scene understanding and policy violation detection
    • YOLO for banned object detection
    • PaddleOCR for text overlay extraction
  3. Video Analysis:

    • Adaptive frame sampling technique for efficient processing
    • Frames passed to Qwen2.5 7B parameter model for scene understanding
    • YOLO for object detection in frames
    • Whisper for audio transcription
    • PaddleOCR for text overlays
    • Multi-modal fusion with Policy LLM for holistic compliance reasoning
  4. Landing Page Analysis:

    • Browser Use Agent for automated page visiting and content extraction
    • RAG system + LLM to match ad claims with page content
  5. Voice Processing:

    • Whisper integration for accurate speech-to-text conversion
    • Policy compliance checking on transcribed audio content
  6. Policy RAG System:

    • Retrieves relevant policy documents for LLM-guided reasoning
    • Context-aware policy violation detection

💻 User Interface

Dashboard

Dashboard

The main dashboard provides an overview of recent compliance checks, success rates, and quick access to all features.

Upload Page

Upload Page

Intuitive upload interface supporting multiple content types:

  • Text/Ad copy input
  • Image file upload
  • Video file upload
  • Landing page URL input
  • Batch processing capabilities

Compliance Report

Report Page

Detailed compliance analysis with:

  • Overall compliance score
  • Violation breakdown by category
  • Risk assessment levels
  • Actionable recommendations

Compliance Analysis

Compliance Page

In-depth analysis view showing:

  • Policy section violations
  • Evidence highlighting
  • Confidence scores
  • Suggested fixes

Policy Management

Policy Page

Centralized policy document management with:

  • Policy document viewer
  • Version control
  • Custom policy uploads
  • RAG system configuration

User Profile

User Profile

User management interface featuring:

  • Account settings
  • Usage statistics
  • API key management
  • Notification preferences

Detailed Overview

Detailed Overview

Comprehensive project overview with metrics and analytics.

Key Technical Features:

  • Adaptive Frame Sampling: Intelligent video frame extraction for optimal processing
  • RAG-based Policy Matching: Semantic search through policy documents
  • Multi-language Support: Automatic language detection and culturally-aware analysis
  • Browser Automation: Automated landing page content extraction
  • Real-time Processing: Fast compliance checking for immediate feedback

🎯 Minimum Viable Product (MVP)

MVP Features

Core Functionalities:

  • ✅ Web App Interface for multi-modal content upload
  • ✅ Text Compliance Checks using Qwen2.5 7B + RAG system
  • ✅ Image Compliance Checks with Qwen2.5 7B model
  • ✅ Video Compliance Checks with adaptive frame sampling
  • ✅ Landing Page Analysis using Browser Use Agent
  • ✅ Voice Analysis with Whisper integration
  • ✅ Compliance Scoring Engine with explainable results
  • ✅ AI-Assisted Clarification system

Extended Features:

  • 🔄 Multilingual Compliance Checks
  • 📊 Risk-Level Prediction (low/medium/high severity)
  • 🔧 Generative Ad Fix Suggestions
  • 💬 Conversational AI Reviewer

🚀 Installation & Setup

Prerequisites

pip install -r requirements.txt

Required Dependencies

  • transformers - For Qwen2.5 7B model
  • whisper - For voice transcription
  • llama-index - For RAG implementation
  • groq - For LLM API access
  • google-generativeai - For Gemini integration
  • selenium - For Browser Use Agent
  • opencv-python - For video frame processing

Environment Variables

export GROQ_API_KEY="your_groq_api_key"
export GEMINI_API_KEY="your_gemini_api_key"

Quick Start

# Initialize the compliance checker
checker = PolicyComplianceChecker()
checker.initialize()

# Analyze ad content
result = checker.check_compliance("Your ad text here")
print(result)

🔄 Workflow

  1. Content Upload: Users upload text, images, videos, or landing page URLs
  2. Multi-modal Analysis:
    • Text processed by Qwen2.5 7B + RAG
    • Images analyzed by Qwen2.5 7B vision model
    • Videos processed with adaptive frame sampling
    • Landing pages crawled by Browser Use Agent
    • Audio transcribed by Whisper
  3. Policy Matching: RAG system retrieves relevant policy sections
  4. Compliance Scoring: AI generates detailed compliance reports
  5. Interactive Feedback: Users receive actionable recommendations

🎯 Why AI is Essential

  • Nuanced Violation Detection: Goes beyond simple keyword matching
  • Multimodal Analysis: Combines visual, audio, and text inputs intelligently
  • Scalable Decision Making: Handles large volumes with consistent quality
  • Explainable Results: Provides clear reasoning for compliance decisions
  • Cultural Awareness: Adapts analysis based on language and cultural context

📈 Benefits

  • Faster Ad Approvals: Pre-screening reduces review cycles
  • Cost Reduction: Automated compliance checking saves manual review time
  • Better Advertiser Experience: Clear, actionable feedback improves satisfaction
  • Scalability: Handles increasing ad volumes without proportional staff increases
  • Consistency: Standardized policy application across all content types

🤝 Contributing

We welcome contributions! Please read our contributing guidelines and submit pull requests for any improvements.


AdGuard AI - Transforming ad compliance from a bottleneck into a collaborative, AI-assisted process that empowers advertisers and streamlines operations.