Skip to content

feat: Add AI Assistant with duplicate detection and emergency announcements#139

Open
iamgerwin wants to merge 6 commits intobettergovph:mainfrom
iamgerwin:feature/ai-assistant-duplicate-detection
Open

feat: Add AI Assistant with duplicate detection and emergency announcements#139
iamgerwin wants to merge 6 commits intobettergovph:mainfrom
iamgerwin:feature/ai-assistant-duplicate-detection

Conversation

@iamgerwin
Copy link
Contributor

Summary

Implements the initial AI Assistant features as proposed in issue #82, focusing on duplicate detection for idea submissions and emergency announcement integration.

Key Features Implemented

1. Duplicate Detection Service

  • Implements similarity detection algorithm using Jaccard coefficient
  • Automatically checks for similar ideas when users submit new ones
  • Shows similarity scores and allows users to review existing ideas
  • Helps prevent duplicate submissions and encourages collaboration

2. Emergency Announcements Component

  • Displays critical alerts from government sources (PAGASA, PHIVOLCS, etc.)
  • Supports dismissible announcements with automatic expiration
  • Shows severity levels and timestamps for each announcement
  • Provides location-based context for emergency situations

3. AI-Powered Idea Submission Form

  • Integrates duplicate detection before submission
  • Provides real-time feedback with loading states
  • Category selection for better organization
  • User-friendly modal interface with clear CTAs

4. Ideas Page Integration

  • Added AI Assistant submission option alongside GitHub
  • Emergency announcements display at the top of the page
  • Updated UI to showcase AI capabilities
  • Mock data for demonstration purposes

Technical Details

  • Modular architecture with separate components and services
  • TypeScript for type safety
  • Responsive design that works on all devices
  • ESLint and Prettier compliant code

Testing

  • Components render correctly in development environment
  • Duplicate detection accurately identifies similar ideas
  • Emergency announcements display and dismiss properly
  • Form validation works as expected

Future Enhancements

As outlined in issue #82, future iterations can include:

  • Guidance bots for new participants
  • Moderation assistance
  • Summaries and insights generation
  • Voting insights
  • Integration with real government data feeds

Screenshots

The AI Assistant features are now integrated into the Ideas page with a clean, intuitive interface that maintains the existing design language of BetterGov.ph.

Closes #82

Implements similarity detection algorithm using Jaccard coefficient
to find similar ideas and prevent duplicate submissions. Includes
utility functions for calculating similarity scores and formatting.
Creates modal UI to display similar ideas when duplicates are detected.
Shows similarity scores and allows users to review existing ideas
or continue with their submission.
Implements form component with AI-powered duplicate checking.
Validates input before submission and shows loading state
during AI processing.
Creates component to display emergency alerts from government sources
like PAGASA and PHIVOLCS. Supports dismissing announcements and
automatic expiration.
- Add AI-powered idea submission with duplicate detection
- Display emergency announcements at the top of the page
- Update UI to show AI Assistant option alongside GitHub submission
- Handle new idea submissions with mock data storage
Document the new AI Assistant capabilities including duplicate detection,
emergency announcements integration, and smart guidance for contributors.
@aluminyoom
Copy link
Member

Is it really an "AI assistant" if we're just doing string comparison? I don't think we should be using AI assistant as a marketing term for this.

@angelofallars angelofallars added the stale Has not been worked on in a while label Oct 16, 2025
@github-actions
Copy link

Stale pull request message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-pr-activity stale Has not been worked on in a while

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[IDEA] AI Assistant for Duplicate Detection, Guidance, and Emergency Announcements

3 participants

Comments