个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证正在加载完整 README。 以下为已保存的摘录。
CAT is a web application developed by the Social Science Experimental Laboratory at
NYU Abu Dhabi for coding free-form communication with large language models (LLMs).
It is designed primarily for communication data from economic experiments, although
the workflow can support other structured content-analysis tasks.
The current release is CAT v1.2.0.查看完整 README ↗CAT is a web application developed by the Social Science Experimental Laboratory at NYU Abu Dhabi for coding free-form communication with large language models (LLMs). It is designed primarily for communication data from economic experiments, although the workflow can support other structured content-analysis tasks.
The current release is CAT v1.4.11. The site shows the major.minor version (v1.4);
the full patch-level log is in backend/app/releases.py and on the admin dashboard's
Version history.
1-50, 75, 90-100) without
preparing a separate smaller file. The selection carries through preprocessing,
coding, reruns, and generated packages.Researchers can upload a dataset, define communication episodes, create a coding manual, provide experimental context, run one or more LLMs, review validation results, and download coded data without writing application code.
The guided tour uses a small, constructed dataset; it does not contain participant data.
.csv, .xlsx, or .xls) source dataset.Message, Episode Identifier, Sender, Order,
and Context roles. CAT groups source rows into communication episodes while
retaining the link between every episode and its original rows.With one model call, the download is a CSV that preserves the order and columns of the uploaded source data and appends every coding variable. If several source rows form one communication episode, CAT assigns the episode-level codes to each of those rows.
With repeated calls or multiple models, the download is one ZIP archive. It contains
up to two overall CSV files: a source-row file with the final non-text aggregates and,
when the codebook contains text variables, a separate call-level file containing every
text response. Each LLM also has up to two corresponding CSV files containing its own
non-text aggregates and text responses. Finally, the archive contains one unchanged
call-level CSV for every individual run of every LLM. Categorical values are represented
in aggregate files as separate binary columns (for example, option_a, option_b, and
option_c), while their original labels remain unchanged in the individual-run files.
CAT reports two kinds of agreement for every non-text output column. Within a model,
the repeated runs of one model are compared with each other, a check on how consistently
it answers; with more than two runs, the pairwise results are averaged (the mean of
pairwise Cohen's kappa is Light's kappa). Between models, each model's runs are first
aggregated to one value per episode and the models are then compared pairwise. Each
comparison reports the exact agreement rate, unweighted Cohen's kappa, Gwet's AC1, and the
number of paired episodes. The tables appear in the Results panel and run-summary report,
and the ZIP contains the same statistics in inter_coder_agreement.csv. Each distinct
numeric result is treated as a nominal coded value, statistics use episodes for which both
coders have a value, and kappa is undefined when expected agreement is 100%. CAT reports
each variable separately and does not average coefficients across variables.
When a numeric mode has no unique winner, CAT uses the median; with an even number of
responses, this is the average of the two middle values.
dataset_coded_results.zip
├── inter_coder_agreement.csv # repeated runs or 2+ models, non-text outputs
├── overall/
│ ├── aggregated_results.csv # present when non-text variables exist
│ └── text_results.csv # present when text variables exist
└── models/
└── provider_model/
├── aggregated_results.csv # present when non-text variables exist
├── text_results.csv # present when text variables exist
└── runs/
├── run1.csv
└── run2.csv
| Layer | Technology |
|---|---|
| Frontend | Next.js App Router, React, TypeScript |
| Backend | Python 3.12, FastAPI, SQLAlchemy |
| Database | PostgreSQL through the asynchronous asyncpg driver |
| Data processing | pandas and openpyxl |
| Model integrations | OpenAI-compatible APIs, Google Gemini, and Anthropic |
| Styling | Project-specific CSS |
The public production service runs on a university-hosted Red Hat Enterprise Linux
server behind Nginx and HTTPS. The frontend and backend run as systemd-managed services,
and PostgreSQL provides the persistent metadata store. A systemd timer deploys the latest
commit on main once its CI checks have passed (see deploy/). Hostnames, credentials, internal
paths, and administrative details are intentionally excluded from public documentation.
LLM_TOOL/
├── requirements.txt # Root Python dependency entry point
├── backend/
│ ├── requirements.in # Direct Python dependencies
│ ├── requirements.txt # Fully pinned Python dependency lock
│ ├── app/
│ │ ├── main.py # FastAPI application and registered routes
│ │ ├── config.py # Environment-based application settings
│ │ ├── releases.py # Release history; the single source of the version
│ │ ├── jobs.py # Server-side coding runs and their access-key links
│ │ ├── usage.py # Server-side counting of runs and downloads
│ │ ├── estimate.py, prices.py # Pre-run time, call, token, and cost estimate
│ │ ├── gzip_request.py # Decodes encoded request bodies (firewall mitigation)
│ │ ├── admin_template.py # Admin dashboard page
│ │ ├── models/database.py # Database models
│ │ ├── routes/ # Coding, instructions, analytics, and contact APIs
│ │ └── services/ # LLM execution, aggregation, agreement, and results
│ └── tests/ # Backend test suite
├── frontend/
│ ├── src/app/ # Next.js interface and workflow components
│ ├── public/ # Logos, tour graphics, and demonstration video
│ ├── package.json
│ └── package-lock.json
├── deploy/ # Production auto-deploy script and systemd units
├── CLAUDE.md # Conventions for contributors and AI coding agents
└── .github/workflows/ci.yml # Automated backend and frontend checks
API keys are entered for individual runs. CAT does not write them to its database, browser storage, generated packages, or application logs.
From the repository root, create an isolated Python environment and install the backend dependencies:
python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
Install the frontend dependencies in a separate step:
cd frontend
npm ci
cd ..
CAT requires PostgreSQL and does not silently fall back to SQLite. Set a valid connection string before starting the backend:
export DATABASE_URL=postgresql://<user>:<password>@localhost:5432/<database>
cd backend
python -m uvicorn app.main:app --reload --port 8000
In another terminal, start the frontend:
cd frontend
npm run dev
The local interface is available at http://localhost:3000. By default, the frontend
forwards API requests to http://localhost:8000. Set NEXT_PUBLIC_API_URL before
starting the frontend if the backend uses a different address.
The database tables are created automatically when the backend starts with a valid PostgreSQL connection.
Server-side runs use two optional groups of environment settings (see
backend/app/config.py): PUBLIC_BASE_URL, the public site address used to build run
links in email, and the SMTP_* settings. Without SMTP_HOST, CAT sends no email;
server-side runs still work and their link and access key are shown on screen.
Run the backend tests from the repository root:
cd backend
python -m unittest discover -s tests -v
Check the frontend:
cd frontend
npm run lint
npm run build
The GitHub Actions workflow also compiles the backend, runs its tests, checks required application routes, audits production frontend dependencies, and builds the frontend.
To update Python dependencies deliberately, edit backend/requirements.in, regenerate
the lock with python -m pip install pip-tools==7.6.1 followed by
pip-compile --generate-hashes --strip-extras --output-file=backend/requirements.txt backend/requirements.in,
and run the complete test suite before committing the result.
See the complete privacy notice.
Researchers are responsible for determining whether sending their data to the selected LLM provider complies with participant consent, institutional requirements, data-use agreements, and applicable law or policy. Sensitive datasets should be de-identified or processed only through an institutionally approved provider.
CAT implements a coding procedure; it does not establish construct validity or ground truth. Researchers should validate a coding task against an appropriate human-coded sample, retain the coding manual and configuration, inspect individual and aggregate outputs, and report the models and settings used.
LLM outputs may vary between calls and may change when providers update their models. Repeated calls and agreement across models can describe stability, but they do not by themselves establish that a classification is correct.
If CAT is used in research, please cite the accompanying paper, CAT: An LLM-based Tool for Content Analysis in Experimental Economics, by Andrzej Baranski, David J. Cooper, and Jeong Kyu Lee. The DOI will be added when one is assigned.
Do not commit directly to main. Create a branch from the latest main, make one
focused change, and open a pull request describing what changed and how it was tested.
Before opening the pull request, run the backend tests and the frontend audit, lint, and
production build commands shown above. Every merge to main deploys, so each pull request
adds a new entry at the top of RELEASES in backend/app/releases.py and updates the
version in backend/tests/test_version.py and frontend/package.json; see CLAUDE.md. Pull requests can be merged only after the
required Backend and Frontend CI checks pass and all review conversations are resolved.
Do not include API keys, participant data, server credentials, local environment files, or generated build artifacts in a branch or pull request. Report suspected security problems privately using the procedure in SECURITY.md, rather than in a public issue.