DOI: 10.6084/m9.figshare.29604668
title: <b>Data and Code from 'The Perfect and Legitimate Bribe': A Transparent Record of Human-AI Collaboration in Legal Scholarship</b>

description: # Data and code from 'the perfect and legitimate bribe': A transparent record of human-ai collaboration in legal scholarship## Description of the data and file structureThe dataset comprising this PDF documents the conversational record of a human-AI collaboration that produced the satirical legal manuscript, "The Perfect and Legitimate Bribe: A Constitutional Path to Eternal Presidency." The experimental effort was to capture and structure my drafting and brainstorming dialogues with the ChatGPT-4o large language model. This collection's purpose is to offer a granular view into the exploratory, generative, and recursive nature of creating a complex scholarly work with an AI partner.<br>### Files#### File: SupplementaryMaterial.pdf**Description:** End-to-end methods explanation. This PDF file contains four additional attached/embedded files, enumerated below. These four files should be accessible if you open this PDF using Adobe Acrobat Reader, and navigate to the Attachments panel (see screenshots, p 8). From the View menu, go to Show/Hide &gt; Side Panels &gt; Attachments. The Attachments panel should appear, showing four files; right-clicking each allows you to save to a new location in your filesystem. (The same four files are included outside of the PDF as well.)<br>#### File: sentence-ancestry-ipynb.txt**Description:** The Jupyter Notebook containing the Python script used to perform the sentence ancestry analysis, creating the `ancestry-anonymized.txt` file.<br>#### File: collator-ipynb.txt**Description:** The Jupyter Notebook containing the Python script used to process raw conversation data into the `collated-anonymized.txt` transcript.<br>#### File: ancestry-anonymized.txt**Description:** A "genealogy" for every sentence in the final manuscript. This file, generated by the `sentence-ancestry-ipynb.txt` script, traces the origin of each sentence backward through the conversational record. It uses semantic similarity (cosine similarity) to identify the most likely predecessor for each sentence at every stage of the dialogue, providing a granular view of how ideas and phrasings evolved over time.<br>#### File: collated-anonymized.txt**Description:** A chronologically-sorted transcript of the human-AI conversations. This file was generated by the `collator-ipynb.txt` script, which parses raw JSON exports from ChatGPT, preserves the non-linear, branching structure of the dialogues using indentation, and assigns a unique line number and type-code ([P] for Prompt, [C] for Completion, [N] for Neither/metadata) to every line.## Code/software<br>### **Viewing Data Files**The data files (`collated-anonymized.txt` and `ancestry-anonymized.txt`) are plain text (`.txt`) files and can be viewed using any standard text editor available on all major operating systems (e.g., Notepad on Windows, TextEdit on macOS, or cross-platform editors like VS Code, Sublime Text, or Notepad++).For optimal viewing of `collated-anonymized.txt`, a text editor that can handle long lines without word wrapping is recommended to preserve the indentation that represents the conversational branching structure.<br>### **Running Code/Software**The provided scripts (`collator-ipynb.txt` and `sentence-ancestry-ipynb.txt`) are Jupyter Notebooks and require a Python 3 environment to run. The code can be executed using free and open-source software such as **Jupyter Notebook**, **JupyterLab**, or a cloud-based service like **Google Colab**.Note that the ipynb files (if extracted from the PDF rather than downloaded from the figshare item) need to be renamed to use `ipynb` as the extension rather than `txt`. I used `txt` because Adobe Acrobat would not allow me to use `ipynb`.The following Python packages must be installed:* `torch`* `sentence-transformers`* `odfpy`<br>These can be installed via pip:`pip install torch sentence-transformers odfpy`<br>