ClarifAI is an intelligent requirement management system designed to help Product Managers (PMs) better formulate and refine product requirements, enabling researchers and data scientists to solve problems more efficiently.
- Support for multi-role login (PM/Researcher)
- Test accounts provided:
- PM account: pm@test.com / password123
- Researcher account: researcher@test.com / password123
- Business goal and data scope definition
- File upload support
- Expected output selection
- Timeline setting
- AI intelligent feedback based on Azure OpenAI (GPT-4o-mini)
- "Verify Requirement" feature for real-time AI analysis
- Requirement Scorecard including:
- Clarity
- Feasibility
- Completeness
- View requirement details
- Provide solutions
- Interactive discussion with PMs
- Backend: Flask
- Frontend: HTML + CSS + JavaScript
- Database: PostgreSQL
- AI Model: Azure OpenAI GPT-4o-mini for requirement analysis
ClarifAI/
├── app/
│ ├── __init__.py # Flask application initialization
│ ├── routes.py # Flask routes
│ ├── database.py # Database configuration
│ ├── ai_service.py # Azure OpenAI integration
│ ├── models/ # Data models
│ ├── static/ # Static files
│ └── templates/ # HTML templates
├── requirements.txt # Project dependencies
├── .env # Environment variables (not tracked by Git)
├── config.py # Application configuration
└── README.md # Project documentation
- Install dependencies:
pip install -r requirements.txt- Configure Azure OpenAI:
Create a
.envfile in the root directory with the following content:
# Azure OpenAI API Configuration
AZURE_OPENAI_ENDPOINT=your_azure_openai_endpoint
AZURE_OPENAI_API_KEY=your_api_key
AZURE_OPENAI_API_VERSION=2023-05-15
AZURE_OPENAI_DEPLOYMENT=gpt-4o-mini
# PostgreSQL Configuration
POSTGRES_SERVER=localhost
POSTGRES_USER=postgres
POSTGRES_PASSWORD=your_password
POSTGRES_DB=clarifai
- Initialize the database:
flask db init
flask db migrate
flask db upgrade
python init_db.py- Run the application locally:
flask run- Access the system: Open your browser and go to http://localhost:5000
-
Create a PostgreSQL database on Azure:
- Go to Azure Portal
- Create a new Azure Database for PostgreSQL server
- Configure firewall rules to allow your application
-
Configure Azure App Service:
- Create a new Web App service
- Set up deployment from Git repository or VS Code
- Configure environment variables in App Service Configuration
-
Deploy the application:
az login
az webapp up --name YourAppName --resource-group YourResourceGroup --location "East US" --sku B1-
Set environment variables in Azure:
- Go to your App Service in Azure Portal
- Navigate to Configuration > Application settings
- Add all the environment variables from your .env file
-
Access your deployed app:
- Open your browser and go to https://your-app-name.azurewebsites.net
- Fill out all fields in the requirement form
- Click the "Verify Requirement" button
- The system will analyze your requirement using Azure OpenAI and provide:
- Clarity Score
- Feasibility Score
- Completeness Score
- Detailed feedback with suggestions for improvement
- If the Clarity Score is at least 70%, the "Submit Requirement" button will be enabled
- Make any necessary improvements based on the AI feedback
- Submit the finalized requirement when ready