AlignAI is a specialized tool designed to help developers and organizations evaluate AI-generated content against key ethical and regulatory standards. By analyzing text for potential issues across multiple dimensions, AlignAI provides actionable insights to improve AI system safety and compliance.
-
Multi-Dimensional Analysis: Comprehensive examination of prompts across three critical dimensions: bias detection, PII identification, and policy compliance
-
Risk Assessment: Dynamic risk scoring system that quantifies concerns with confidence levels to prioritize remediation efforts
-
Policy Compliance Verification: Mapping of input text against relevant EU AI Act regulations with specific article references
-
Visual Risk Indicators: Color-coded indicators and percentage scores to quickly identify areas of concern
-
Detailed Explanations: Context-specific explanations of detected issues to facilitate understanding and correction
-
Microservice: Easy to Manage dependencies and can run on its own infrastructure
-
Multi-Dimensional Analysis: Comprehensive examination of prompts across three critical dimensions: bias detection, PII identification, and policy compliance
-
Risk Assessment: Dynamic risk scoring system that quantifies concerns with confidence levels to prioritize remediation efforts
-
Policy Compliance Verification: Mapping of input text against relevant EU AI Act regulations with specific article references
-
Visual Risk Indicators: Color-coded indicators and percentage scores to quickly identify areas of concern
-
Detailed Explanations: Context-specific explanations of detected issues to facilitate understanding and correction
The bias detection model was fine-tuned on a carefully curated dataset containing:
- Balanced examples of biased and unbiased text across multiple domains and contexts
- Annotations for various bias types (gender, racial, age, socioeconomic, etc.)
- Confidence scoring to reflect the certainty of bias detection
Training approach:
- Base model: RoBERTa architecture with classification head
- Fine-tuning method: Supervised learning with bias/non-bias labels
- Validation method: Cross-validation with human review of edge cases
Built using a hybrid approach combining:
- Pattern matching with regular expressions for structured PII (emails, phone numbers, etc.)
- Named entity recognition for identifying names, locations, and organizations
- Contextual analysis to reduce false positives
Training data includes diverse examples of personal information formatted in various ways, with special attention to indirect identifiers that could lead to re-identification.
- Trained on the full text of the EU AI Act, broken down into semantic units
- Vectorized using sentence transformers to enable semantic similarity matching
- Includes mechanisms to map detected issues to specific articles and clauses
- Model: EU AI Act Policy Model on Hugging Face
- Dataset: EU AI Act Flagged Dataset on Hugging Face
- Frontend: Next.js with React for a responsive, modern user interface
- Backend: FastAPI for efficient, type-safe API endpoints
- Model Deployment: Optimized inference pipeline for rapid analysis
- Inter-component Communication: JSON-based API for flexibility and extensibility
- Node.js 18+ and npm
- Python 3.9+
# Clone the repository
git clone https://github.com/your-username/alignai.git
cd alignai
# Install frontend dependencies
cd frontend && npm install
# Install backend dependencies
cd ../backend && pip install -r requirements.txt# Start the frontend (from the frontend directory)
npm run dev
# Start the backend (from the backend directory)
python -m uvicorn main:app --reload --port 8000Visit http://localhost:3000 to access the frontend application.
AlignAI is organized into several key components:
backend/api/- FastAPI routes and endpointsbackend/core/- Core analysis models and logicbias_detection/- Bias identification modelspii_detection/- Personal data detection systemspolicy_detection/- EU AI Act compliance verification
backend/models/- Data models and schemasbackend/utils/- Helper functions and utilities
frontend/src/components/- React componentsanalyzer/- Text analysis interface componentsui/- Shared UI elements and design system
frontend/src/lib/- Frontend utilities and API clientfrontend/src/app/- Next.js application pages
models/bias_detection/- Training scripts and data for bias modelsmodels/pii_detection/- Training scripts for PII detectionmodels/policy_detection/- EU AI Act policy text processing
AlignAI currently implements:
- Text analysis capabilities across three dimensions (bias, PII, policy compliance)
- Backend endpoints for processing prompts and generating analysis
- Frontend interface for submitting text and viewing analysis results
- Color-coded risk indicators and detailed explanations
- Model deployment and integration pipeline
- Expanded model training with additional data sources
- User authentication and project management
- Batch analysis capabilities for multiple prompts
- Extended explanations with mitigation suggestions
- Additional policy frameworks beyond EU AI Act


