-
Notifications
You must be signed in to change notification settings - Fork 0
Update documentation to reflect current implementation (6 trials, Iqra University context, Firebase storage) #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) 2026 [Your Name/Organization] | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,225 @@ | ||||||||||||||||||||||||||||||
| # UI Conformity Experiment | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| > **Beta UI Diagnostic Dashboard**: A behavioral research tool investigating AI authority bias in user interface design preferences | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [](https://opensource.org/licenses/MIT) | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ## Overview | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| This repository contains a web-based behavioral experiment designed to investigate whether "AI Recommended" labels influence users' UI design preferences. The study employs a randomized between-subjects design to measure conformity effects in human-computer interaction. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ### Research Question | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| **Does an "AI Recommended" label influence users' UI design preferences?** | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ## Quick Start | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||||
| # Clone the repository | ||||||||||||||||||||||||||||||
| git clone https://github.com/hashexplaindata/Conformity-experiment.git | ||||||||||||||||||||||||||||||
| cd Conformity-experiment | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Start a local server | ||||||||||||||||||||||||||||||
| python -m http.server 8000 | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Access the experiment | ||||||||||||||||||||||||||||||
| # Control condition: http://localhost:8000/code/index.html?condition=control | ||||||||||||||||||||||||||||||
| # AI label condition: http://localhost:8000/code/index.html?condition=ai | ||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ## Project Structure | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||
| Conformity-experiment/ | ||||||||||||||||||||||||||||||
| ├── code/ # Application files | ||||||||||||||||||||||||||||||
| │ ├── index.html # Main experiment page (147 lines) | ||||||||||||||||||||||||||||||
| │ ├── experiment.js # Core behavioral engine (489 lines) | ||||||||||||||||||||||||||||||
| │ └── style.css # Styling & animations (281 lines) | ||||||||||||||||||||||||||||||
|
Comment on lines
+35
to
+37
|
||||||||||||||||||||||||||||||
| │ ├── index.html # Main experiment page (147 lines) | |
| │ ├── experiment.js # Core behavioral engine (489 lines) | |
| │ └── style.css # Styling & animations (281 lines) | |
| │ ├── index.html # Main experiment page | |
| │ ├── experiment.js # Core behavioral engine | |
| │ └── style.css # Styling & animations |
Copilot
AI
Mar 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Client-side randomization - 50/50 condition assignment is not accurate: experiment.js derives CFG.CONDITION from the URL parameter and does not randomly assign participants to conditions. Update this bullet to match the implementation (e.g., URL-driven assignment) or implement the described randomization.
| - 🎯 **Client-side randomization** - 50/50 condition assignment | |
| - 🎯 **URL-driven condition assignment** - Experiment condition set via `?condition=control|ai` |
Copilot
AI
Mar 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The README lists Counterbalanced AI badge assignment and Randomized trial order, but the code uses a fixed trial.target per trial and iterates through TRIALS sequentially (only left/right position is randomized). Please update these research feature bullets to reflect what actually happens, or add the missing counterbalancing/shuffle logic.
| - Counterbalanced AI badge assignment | |
| - Randomized trial order | |
| - Fixed AI badge assignment per trial (consistent across participants) | |
| - Fixed trial order across participants |
Copilot
AI
Mar 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documented data schema doesn't match what experiment.js actually writes: participant_id is not a UUID, and ai_badge_position/user_selection are stored as strings like "Layout A"/"Layout B" (not just "A"/"B"). Please align the schema example and field comments with the real payload keys/values to avoid analysis mistakes.
| participant_id: "abc123xyz...", // Anonymous UUID | |
| experimental_condition: "ai_labeled", // "control" or "ai_labeled" | |
| ai_familiarity_covariate: 3, // 1-5 Likert scale | |
| trial_sequence: 1, // 1-6 | |
| ui_domain: "Information Density...", // Trial category | |
| ai_badge_position: "B", // "A", "B", or "none" | |
| user_selection: "B", // "A" or "B" | |
| participant_id: "abc123xyz...", // Anonymous participant ID (non-UUID string) | |
| experimental_condition: "ai_labeled", // "control" or "ai_labeled" | |
| ai_familiarity_covariate: 3, // 1-5 Likert scale | |
| trial_sequence: 1, // 1-6 | |
| ui_domain: "Information Density...", // Trial category | |
| ai_badge_position: "Layout B", // "Layout A", "Layout B", or "none" | |
| user_selection: "Layout B", // "Layout A" or "Layout B" |
Copilot
AI
Mar 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The README mentions a localStorage fallback, but the current Firebase error path only logs a TODO comment and does not persist results to localStorage when sync fails. Please remove/qualify the fallback claim or implement an actual local persistence + retry/export mechanism.
| 4. Configure Firebase credentials (or use localStorage fallback) | |
| 4. Configure Firebase credentials (primary data store; no automatic localStorage fallback is currently implemented) |
Copilot
AI
Mar 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The For Developers snippet uses TypeScript-style union types inside a JavaScript object ('ai_labeled' | 'control', 'A' | 'B'), which is not valid JavaScript and may confuse readers copying it. Consider rewriting as plain JS comments/examples or explicitly marking the block as TypeScript/pseudocode.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -11,12 +11,12 @@ | |||||
| | 5 | Minimal risk | YES | Task involves viewing UI mockups and clicking | | ||||||
| | 6 | Deception disclosed | YES | Debrief explains AI label manipulation | | ||||||
| | 7 | Debrief provided | YES | Available at study completion and as DEBRIEF.txt | | ||||||
| | 8 | Data security | YES | Data stored locally on participant devices | | ||||||
| | 8 | Data security | YES | Data synced to Firebase Firestore with secure access rules | | ||||||
|
||||||
| | 8 | Data security | YES | Data synced to Firebase Firestore with secure access rules | | |
| | 8 | Data security | YES | Data synced to Firebase Firestore; study operator must configure appropriate security rules in Firebase Console before deployment | |
Copilot
AI
Mar 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Firebase cloud storage with configurable retention is presented as already satisfied, but the repo doesn’t document/implement any retention configuration (e.g., TTL policy, deletion job, or documented manual process). Please clarify what mechanism enforces retention, or change the status/notes to reflect that this must be configured operationally.
| | 13 | Data retention policy | YES | Firebase cloud storage with configurable retention | | |
| | 13 | Data retention policy | OPERATIONAL CONFIG REQUIRED | Firebase cloud storage; retention to be configured operationally (e.g., TTL, deletion job, or documented manual process) | |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -18,58 +18,51 @@ Participants were recruited from [classroom / online panel]. Inclusion criteria: | |||||||||
|
|
||||||||||
| A between-subjects experimental design with two conditions: | ||||||||||
|
|
||||||||||
| - **Control condition:** Participants viewed 8 pairs of UI mockups with neutral labels ("Option A" / "Option B") and selected their preferred design. | ||||||||||
| - **AI Label condition:** Participants viewed the same 8 pairs, but one option in each pair displayed a "★ AI Recommended" badge. | ||||||||||
| - **Control condition:** Participants viewed 6 pairs of UI mockups with neutral labels ("Option A" / "Option B") and selected their preferred design. | ||||||||||
| - **AI Label condition:** Participants viewed the same 6 pairs, but one option in each pair displayed a "✨ AI Recommended" badge. | ||||||||||
|
|
||||||||||
| Assignment to conditions was randomized (50/50) using client-side JavaScript random number generation at the point of entry. | ||||||||||
|
||||||||||
| Assignment to conditions was randomized (50/50) using client-side JavaScript random number generation at the point of entry. | |
| Assignment to conditions was determined via the experiment URL query parameter (`?condition=control` or `?condition=ai`), which mapped participants to the control and AI label conditions, respectively. |
Copilot
AI
Mar 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Methods states trials were presented in randomized order, but experiment.js advances sequentially through the TRIALS array (no shuffle). Please either update the document to describe a fixed trial order, or implement trial-order randomization and record the resulting order in the saved data.
Copilot
AI
Mar 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The listed metadata values for AI badge position and User selection are documented as "A"/"B", but the actual telemetry stores strings like Layout A/Layout B (and none for control). Please align the documented value format to the current payload so downstream analysis doesn't miscode these fields.
| - AI badge position (which option had the badge: "A", "B", or "none" for control) | |
| - User selection ("A" or "B") | |
| - AI badge position (which option had the badge: "Layout A", "Layout B", or "none" for control) | |
| - User selection ("Layout A" or "Layout B") |
Copilot
AI
Mar 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ethics section claims there is a localStorage fallback for offline participants, but the code currently does not implement any local persistence on Firebase failure (it only logs a TODO comment). Please remove/qualify this statement or add the fallback behavior described.
| - Data was synced to Firebase Firestore (`conformity_telemetry` collection) with fallback to localStorage for offline participants. | |
| - Data was synced to Firebase Firestore (`conformity_telemetry` collection); offline submissions made without a stable connection might not be recorded. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The LICENSE file still contains a
[Your Name/Organization]placeholder. Please replace it with the actual copyright holder (and year range if applicable) so the licensing terms are unambiguous.