# Data Dictionary

Data dictionary for `similarity_exp_replication/inputs/main_df_promptLvl_2026-03-17_PROD_HASHED.csv` (332 columns, prompt-iteration level).

**Logo experiment data** (`logo_exp_replication/inputs/main_df_logoExp_promptLvl_2026-03-17_PROD_HASHED.csv`) shares most columns with the main experiment, with two key differences:

- `referenceImageName` is replaced by `logoTaskSelection` — the logo design task selected by the user.
- Performance is not measured by image similarity. Instead, it uses Bradley-Terry strength estimates (`strength`) from pairwise image rankings, joined from `logo_experiment_mislabel_excluded_image_rankings_20_perc.csv` during analysis. That file contains: `image_id`, `num_wins`, `num_losses`, `strength`, `rank`, `logo_task`.

---

## Identifiers & Task Metadata

| Column | Description |
|--------|-------------|
| `userId` | Anonymized user ID (SHA-256 hashed). |
| `referenceImageName` | Image task name (the reference image the user is trying to replicate). |
| `referenceImageCategory` | Category of the reference image. |
| `imageLabel` | Human-readable label for the reference image. |
| `originalID` | Unique image ID per iteration within user. Scripts typically rename this to `image_id`. |
| `iteration` | Raw iteration number. |
| `originalOrder` | Original ordering of iterations before deduplication. |
| `userIdreferenceImage` | Composite key of `userId` + `referenceImageName`. |
| `dalle_version` | Recorded treatment arm. Does not imply the prompt was truly submitted verbatim. |
| `sampled_cnt` | Number of times this observation was sampled. |
| `unique_originalIDs` | Count of unique original IDs for this user-task combination. |
| `unique_versions` | Count of unique DALL-E versions encountered for this user-task combination. |

## Performance Scores (Original Generation)

Cosine similarity and DreamSim scores comparing the generated image to the reference image. Mean and SD are computed across replications.

| Column | Description |
|--------|-------------|
| `cosine_sim_mean` | Mean cosine similarity across replications. |
| `cosine_sim_sd` | Standard deviation of cosine similarity across replications. |
| `cosine_sim_observed` | Observed cosine similarity for the original generation. |
| `cosine_sim_observed_z` | Z-scored observed cosine similarity. |
| `dream_sim_mean` | Mean DreamSim score across replications. |
| `dream_sim_sd` | Standard deviation of DreamSim across replications. |
| `dream_sim_observed` | Observed DreamSim score for the original generation. |
| `dream_sim_observed_z` | Z-scored observed DreamSim score. |
| `og_dreamsim_score` | Original DreamSim score (not recast as 1 - DreamSim). |
| `originalReplication_sample_mean_dreamsim` | Sample mean of DreamSim across replications (not recast as 1 - DreamSim). |
| `originalReplication_sample_var_dreamsim` | Sample variance of DreamSim across replications. |
| `originalReplication_sample_count` | Number of replication samples. |

## Replay Scores

Scores from replaying prompts on different DALL-E versions to decompose model vs. prompt effects.

| Column | Description |
|--------|-------------|
| `dalle3verbatimReplay_mean_cosine_score` | Sample mean cosine score from replaying prompt on DALL-E 3 (verbatim). |
| `dalle2Replay_mean_cosine_score` | Sample mean cosine score from replaying prompt on DALL-E 2. |
| `dalle3verbatimReplay_mean_dreamsim_score` | Sample mean DreamSim from replaying prompt on DALL-E 3 (verbatim). |
| `dalle2Replay_mean_dreamsim_score` | Sample mean DreamSim from replaying prompt on DALL-E 2. |
| `dalle3verbatim_replayCount` | Number of successful replay samples on DALL-E 3 (verbatim). |
| `dalle2Replay_replayCount` | Number of successful replay samples on DALL-E 2. |
| `dalle3revisedReplay_mean_cosine_score` | Sample mean cosine score from replaying the revised prompt on DALL-E 3. |
| `dalle3revisedReplay_replayCount` | Number of successful replays of the revised prompt on DALL-E 3. |
| `dalle3revisedReplay_mean_dreamsim_score` | Sample mean DreamSim from replaying the revised prompt on DALL-E 3. |
| `replayCompleteness` | Replay status. Primary analysis uses rows where `replayCompleteness == 'both_arms_10_replays'`. |
| `flag_fewerThan10Replays_eitherArm` | Boolean flag for fewer than 10 replays on either arm. |
| `og_v_repl_z_score` | Z-score comparing original vs. replication performance. |

## Prompts

| Column | Description |
|--------|-------------|
| `prompt` | User-submitted prompt. `NoneType` if flagged as junk. |
| `revisedPrompt` | If DALL-E 3 is used, the API-revised version of the prompt. Non-empty allows checking if the submission was truly verbatim. |
| `unfiltered_prompt` | Original prompt before any junk filtering. |
| `tsr_revised_original` | Token set ratio between original and revised prompts. Used to identify true verbatim submissions. |
| `user_repeated_prompts_FLAG` | Boolean flag for user repeating the same prompt across iterations. |
| `prompt_length_chars` | Prompt length in characters. |
| `prompt_length_words` | Prompt length in words. |

## Prompt Embeddings & Distances

Embeddings are generated using `text-embedding-3-small`.

| Column | Description |
|--------|-------------|
| `prompt_embedding_vector` | Embedding vector of the prompt. |
| `unfiltered_prompt_embedding_vector` | Embedding vector of the unfiltered prompt. |
| `cosine_dist_from_center` | Cosine distance from the centroid of all prompt embeddings. |
| `cosine_dist_from_center_quantile` | Quantile rank of cosine distance from center. |
| `euclid_dist_from_center` | Euclidean distance from the centroid of all prompt embeddings. |
| `euclid_dist_from_center_quantile` | Quantile rank of Euclidean distance from center. |
| `dist_to_user_centroid_junkFiltered` | Distance to user-level centroid (computed after filtering junk prompts). |
| `dist_to_task_centroid_junkFiltered` | Distance to task-level centroid (computed after filtering junk prompts). |
| `tsne_1` | t-SNE dimension 1 of prompt embedding. |
| `tsne_2` | t-SNE dimension 2 of prompt embedding. |

## Lagged / Shifted Variables

Variables prefixed with `shifted_` or `prev_` are lagged by one iteration. `shifted_` is the raw lag; `prev_` applies additional cleaning (e.g., empty at first iteration or if previous prompt is junk).

| Column | Description |
|--------|-------------|
| `shifted_prompt` | Previous iteration's prompt (raw lag). |
| `shifted_junk_flag` | Previous iteration's junk flag (raw lag). See paper for junk criteria. |
| `shifted_prompt_embedding_vector` | Previous iteration's prompt embedding (raw lag). |
| `prev_prompt` | Previous prompt, cleaned. Empty at first iteration and if previous prompt is junk. |
| `prev_prompt_embedding_vector` | Embedding of `prev_prompt`. |
| `tsr_prev_prompt` | Token set ratio between successive prompts. Missing if either prompt is missing. |
| `contains_prev_prompt` | Boolean: whether the current prompt contains the previous prompt. |
| `cosine_sim_prev_prompt` | Cosine similarity between successive prompts (1 = very similar, 0 = orthogonal, -1 = opposite). |
| `taskWide_prevCosineSimPctile` | Percentile rank of `cosine_sim_prev_prompt` computed across all prompts for a task. |

## Junk Flags & Outlier Detection

The paper describes the criteria for what constitutes "junk." These flags are critical for filtering the analysis sample.

| Column | Description |
|--------|-------------|
| `junk_flag` | Primary junk flag used in analysis. See paper for full criteria. |
| `isDuplicate` | Raw duplicate indicator. |
| `isDuplicate_bool` | Boolean version of `isDuplicate`. |
| `z_score_outlier` | Boolean: flagged as outlier by z-score method. |
| `euclid_dist_outlier` | Boolean: flagged as outlier by Euclidean distance method. |

## Topic Transition Variables

24 columns capturing how users shift topics across iterations. Each column follows the pattern `{variable}_{metric}_{scope}[_median]` where:

- **Variable type:** `cumsum_topics_` (running count of topic switches), `flag_topical_transition_` (boolean: did a switch happen here), `n_total_topics_` (total distinct topics)
- **Metric:** `tsr` (token set ratio) or `cosine` (cosine similarity) — two methods for detecting topic shifts
- **Scope:** `tasklvl` (threshold computed across all users for a task) or `userlvl` (threshold computed per-user)
- **Threshold variant:** plain or `_median` — two different cutoff methods for defining a transition

Example: `flag_topical_transition_tsr_tasklvl_median` = boolean flag for a topic transition at this iteration, detected via token set ratio, using a task-level threshold with the median cutoff method.

## Qualtrics Survey Metadata (cols 92-106)

Standard Qualtrics metadata fields (`StartDate`, `EndDate`, `Status`, `IPAddress`, `Progress`, `Duration (in seconds)`, `Finished`, `RecordedDate`, `ResponseId`, `RecipientLastName`, `RecipientFirstName`, `RecipientEmail`, `ExternalReference`, `DistributionChannel`, `UserLanguage`). Not used in analysis.

## Survey Responses

### Attention Checks & Task Intro

| Column | Description |
|--------|-------------|
| `serious_request` | Response to seriousness check. |
| `attn_check` | Attention check response. |
| `money_attn_check1` | Monetary attention check 1. |
| `money_attn_check2` | Monetary attention check 2. |
| `advice` | Free-text advice response. |

### Self-Reported Skills (Raw)

| Column | Description |
|--------|-------------|
| `GenAI_outlook` | Outlook on generative AI. |
| `write_instr_usage` | Frequency of writing instructions. |
| `program_frequency` | Programming frequency. |
| `write_image_use` | Frequency of using AI for image generation. |
| `GPT_usage` | Frequency of GPT usage. |
| `instruction_skill` | Self-reported instruction-giving skill. |
| `imagery_skill` | Self-reported imagery/visualization skill. |
| `gpt_skill` | Self-reported GPT skill. |
| `programming_skill` | Self-reported programming skill. |

### Work Skills Selection (cols 242-262)

O*NET-derived skill names selected by participants: `Reading Comprehension`, `Active Listening`, `Writing`, `Speaking`, `Critical Thinking`, `Social Perceptiveness`, `Coordination`, `Instructing`, `Programming`, `Judgment and Decision Making`, `Systems Evaluation`, `Science`, `Active Learning`, `Learning Strategies`, `Monitoring`, `Complex Problem Solving`, `Operations Analysis`, `Technology Design`, `Troubleshooting`, `Quality Control Analysis`, `Systems Analysis`.

### Demographics

| Column | Description |
|--------|-------------|
| `ethnicity` | Self-reported ethnicity. |
| `gender` | Self-reported gender. |
| `years_experience` | Years of work experience. |
| `income` | Income bracket. |
| `age` | Age. |
| `degree` | Highest degree attained. |
| `degree_9_TEXT` | Free-text for "other" degree. |

### Discretized Survey Variables

Recoded versions of raw survey responses, collapsed into fewer categories. The numeric suffix indicates the number of bins (e.g., `age5` = age collapsed into 5 categories).

| Column | Description |
|--------|-------------|
| `programming_skill3` | Programming skill (3 categories). |
| `program_frequency3` | Programming frequency (3 categories). |
| `GPT_usage4` | GPT usage frequency (4 categories). |
| `GenAI_outlook3` | GenAI outlook (3 categories). |
| `degree3` | Degree (3 categories). |
| `imagery_skill3` | Imagery skill (3 categories). |
| `write_image_use3` | Image generation usage (3 categories). |
| `write_instr_usage3` | Instruction writing usage (3 categories). |
| `instruction_skill3` | Instruction skill (3 categories). |
| `age5` | Age (5 categories). |

## Qualtrics Display Order & Timing Columns

Columns matching `*_DO_*` are Qualtrics display-order fields tracking randomization of answer choices. Columns matching `*_First Click`, `*_Last Click`, `*_Page Submit`, `*_Click Count` are Qualtrics page-timing fields. `FL_*` columns are Qualtrics survey flow indicators. These are retained from the raw survey export but are not used in analysis.
