🛡️HateShield 🛡️

Inspiration 💡

The internet connects us, but it’s also rife with hate speech, affecting 2 in 3 users . Existing tools struggle with multilingual and image-based content moderation. This inspired me to create HATESHIELD, an AI-powered solution to foster safer, more inclusive online spaces through real-time content moderation.


What it does 🤔

  1. Textual Analysis of Multilingual Posts: Performs sentiment analysis with confidence scores, severity levels, and extracts key phrases from posts in multiple languages.

  2. Moderates Image Content: Identifies and filters harmful or inappropriate visual content ( Hate, Self-harm, Sexual and Violence ).

  3. Generates Counter-Narratives: Provides constructive responses to mitigate the impact of harmful messages.

  4. Tracks Content Trends: Features an analytics dashboard to monitor trends and patterns in online content for better insights and decision-making.


Architecture Diagram 🔀

System


Github Copilot Utilization 🔩

These are some samples how Github Copilot was utilized -

1. Prompt Engineering with Inline Chat

Utilized Copilot's inline chat to craft precise prompts for the GPT-4-o-mini model, ensuring accurate and context-aware outputs tailored to project requirements. InlineChatPrompteng

2. Documenting the Code

Streamlined code documentation using Copilot, generating clear, concise, and detailed comments to enhance readability and maintainability. documenting

3. Code Completion and Suggestion

Leveraged Copilot’s auto-completion and intelligent suggestions to speed up development, reducing manual effort and ensuring high-quality code. complete

4. Quick Chat for Connecting the Modularized code

Used Copilot’s quick chat feature to efficiently connect modularized code blocks, enabling seamless integration and robust functionality.

quick

5. Quick Fix, Review, and Comment:

Used Copilot to identify potential bugs and inefficiencies, applying its suggestions for quick fixes and incorporating its comments to improve the quality and maintainability of the code. fix


Azure Services Utilized ⚙️

By seamlessly integrating Azure's suite of services, project achieved exceptional functionality, scalability, and cost efficiency, resulting in a robust and impactful solution:

1. Azure Language Service : Utilized to process and analyze text data by providing the sentiment in real-time along with the confidence, severity and the key-phrases.

2. Azure OpenAI : Integrated Azure OpenAI capabilities to refine the GPT-4-mini model's performance, ensuring accurate context-aware responses for counter-narrative generation.

3. Azure Content Safety : Leveraged Azure's content safety tools to filter and flag Hate, Self-harm, Sexual and Violence content, ensuring a safer and more user-friendly environment.

4. Azure Monitor : Deployed Azure Monitor to track system performance and log key metrics, enabling seamless debugging and proactive issue resolution.

5. Azure Cost Management : Managed and optimized project costs with Azure Cost Management, ensuring efficient allocation of resources without exceeding budget constraints as had limited credits.

6. Azure Data Table : Utilized Azure Data Table for structured data storage and retrieval, streamlining backend operations and ensuring data accessibility across services from the API outputs to the Visualizations for the Dashboard.


Interaction with the Web Application 🌐

1. Textual Posts

The below image shows the interaction with the textual component of the web app for providing in the input.

1

Later it gives out the expected outputs:

2

Similarly here's one interaction with the MULTILINGUAL INPUT i.e. Spanish -

3

2. Image Posts

The below shows the interaction with the image component of the web app for providing the output.

4

3. Dashboard

The below captured image shows various kinds of interactive graphs based on the multiple sessions interacted-

5

6


Challenges I ran into 🧗🏿‍♂️

  • Resource Optimization: Balancing the use of Azure services within the constraints of limited credits while maintaining high functionality and performance.

  • Seamless Integration: Combining various Azure services, GitHub Copilot features, and modularized code for a unified and efficient system


Accomplishments that I am proud of 🏆

  • Efficient Development Workflow: Leveraged GitHub Copilot to accelerate coding, debugging, and documentation, achieving a polished prototype within the hackathon timeframe.

  • Innovative Counter-Narratives: Successfully integrated counter-narrative generation, promoting constructive engagement and reducing the impact of hate speech.

  • Solo Achievements: Independently mastered prompt engineering, code documentation, and modularization, while optimizing Azure services—showcasing dedication and technical excellence.


What I learned ✍️

  • AI for Social Good: Gained valuable experience in harnessing AI and cloud services to create safer digital spaces.

  • Solo Problem-Solving and Resourcefulness: Sharpened skills in resource optimization and integrating complex technologies independently under tight deadlines enhancing my skills.

  • Enhanced Technical Expertise: Advanced proficiency in using GitHub Copilot, Azure services, and AI models for impactful, real-world applications.


What's next for HateShield 🚀

  • Social Media Integration: Connecting HateShield to major social platforms via APIs and plugins for real-time, cross-platform content moderation.

  • Global Deployment: Leveraging Azure Web App Service for seamless global scaling and 24/7 real-time moderation.

  • Enhanced Multimedia Moderation: Expanding HateShield to moderate video content with improved AI algorithms for harmful visual detection and safe interaction.


Built With

  • azure
  • azure-content-safety
  • azure-cost-management
  • azure-data-table
  • azure-language-service
  • azure-monitor
  • azure-openai
  • github-copilot
  • openai
  • python
  • streamlit
  • vscode
Share this project:

Updates