This repository contains the web app described in the paper “To Solicit or Not to Solicit? Impact of AI Assistance Delivery Mechanisms on Decision-Making”.
Using this experimental platform, we conducted a study with 232 subjects who were divided into three treatments: those receiving no AI assistance, those receiving AI assistance upon request ("solicited"), and those receiving automatic AI assistance ("unsolicited"). Subjects faced Cognitive Reflection Test (CRT) and mathematics questions while being subjected to intentionally misleading AI advice to gauge how different delivery mechanisms affected their decision-making process.
Despite retaining many of the original features, we have modified the web app to ensure maximum customizability and facilitate the implementation of new experimental designs.
- Question Set Customization: You can upload your own sets of questions tailored to your specific study needs. This flexibility supports a variety of quiz formats, including multiple-choice, true/false, and short-answer questions.
- AI Assistance Integration: The platform allows for the integration of AI assistance, which can be configured to provide suggestions, explanations, and other forms of help to participants.
- Comprehensive Data Logging: The platform logs all relevant data points, including but not limited to:
- Demographic Data: Information about the participants such as age, gender, educational background, etc.
- Quiz Interactions: Every answer selected by the participant, along with timestamps of when each action was taken (e.g., "prompt", "continue", "start").
- Timing Information: Detailed logs of the time spent on each question, which can be crucial for analyzing decision-making processes.
- Post-Quiz Surveys: After completing the quiz, participants can be directed to complete surveys. These surveys can gather additional data on participants' experiences, perceptions of the AI assistance, and other relevant subjective measures.
- Data Export and Analysis: You can easily export the collected data in various formats for further analysis. The platform ensures that data is well-organized and accessible, facilitating efficient and effective analysis.
- Python - The heart of our backend logic
- Django - A high-level Python web framework
- Django REST framework - Powerful toolkit for building Web APIs
- Docker & Docker Compose - For seamless containerization and orchestration
- Nginx - High-performance web server and reverse proxy
- SQLite - Lightweight, serverless database engine
- React - For building dynamic user interfaces (in associated frontend projects)
Before you begin, ensure you have the following:
- A server or VM running Ubuntu 22.04 LTS
- Docker and Docker Compose installed
- A domain name pointing to your server's IP address
- Git for version control
For optimal performance, we recommend:
- RAM: 2GB (minimum)
- CPU: 1 vCPU (minimum)
- Storage: 20GB
- Open ports: 80 (HTTP), 443 (HTTPS), 22 (SSH)
git clone https://github.com/lab105/HCI_Project.git
cd HCI_Project/hci_infra_codebaseSecure your server with SSL:
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d yourdomain.example.comAfter obtaining certificates, stop the global Nginx service:
sudo systemctl stop nginxCustomize the following files:
-
backend/hci_backend/hci_backend/settings.py:- Update
ALLOWED_HOSTSwith your domain - Modify
CORS_ORIGIN_WHITELISTandCSRF_TRUSTED_ORIGINSwith frontend domains
- Update
-
backend/nginx/nginx.conf:- Set
server_nameto your domain - Update SSL certificate paths
- Set
Launch your HCI infrastructure:
docker-compose up -d --build- Backend API:
https://yourdomain.example.com/api/ - Admin interface:
https://yourdomain.example.com/admin/
To stop the application:
docker-compose downFor a smooth frontend deployment experience, we recommend using SaaS platforms like Vercel or Netlify.
-
Update API URL: Remember to update the API URL in your frontend apps to point to your backend API server. You can find all the necessary environment variables in the
.envfile of each frontend app folder. If you're deploying through Vercel or Netlify, you can add these environment variables in their respective platforms. -
Secure Headers: Don't forget to update the
vercel.jsonornetlify.tomlfile to set up secure headers in the routing rules. Replace the sample domain name with the valid domain name mapped to your server.