{"data":{"kind":"file","path":"README.md","version_id":"ja4hfwy5rsiyocanj033ij8z","entry":{"name":"README.md","path":"README.md","is_directory":false,"size":2731,"modified_at":"2026-06-11T23:05:41.486000","content_hash":"fa3a988bae3ff8ceeebeed03447587fc9dc76737cd32eef0fff5f40a2bc5dde9"},"entries":[],"content":"# redline-negotiate\n\n### Overview\n- **Environment ID**: `redline-negotiate`\n- **Short description**: Multi-turn contract negotiation where a model negotiates liability caps against an opposing-counsel AI, scored by a verifiable reward function.\n- **Tags**: multi-turn, negotiation, legal, train, eval\n\n### Datasets\n- **Primary dataset(s)**: Procedurally generated negotiation scenarios with varying vendor starting offers\n- **Source links**: Generated in-environment from scenario configurations\n- **Split sizes**: Train: 7 scenarios, Eval: 8 scenarios (different difficulty distributions)\n\n### Task\n- **Type**: multi-turn\n- **Output format expectations**: Dollar amount (e.g., \"$750,000\" or \"750000\")\n- **Rubric overview**:\n  - `negotiation_reward`: Main reward based on final agreed cap (0.0-1.0 linear scale)\n  - `agreed_cap_metric`: Tracks the final settlement amount\n  - `rounds_completed_metric`: Tracks negotiation duration\n\n### Reward Function (Verifiable)\n\nThe reward is calculated deterministically based on the final agreed price:\n\n| Outcome | Reward |\n|---------|--------|\n| No deal reached | -1.0 |\n| Cap ≤ $100,000 (walkaway) | 0.0 |\n| Cap ≥ $1,000,000 (ideal) | 1.0 |\n| Between walkaway and ideal | Linear interpolation (0.0 - 1.0) |\n\nSettlement = midpoint of final buyer and vendor offers.\n\n### Quickstart\n\nInstall the environment:\n```bash\nprime env install redline-negotiate\n```\n\nRun an evaluation with default settings:\n```bash\nprime eval run redline-negotiate\n```\n\nConfigure model and sampling:\n```bash\nprime eval run redline-negotiate \\\n  -m openai/gpt-4.1-mini \\\n  -n 8 -r 3 \\\n  -a '{\"total_rounds\": 3, \"opponent_model\": \"claude-haiku-4-5-20251001\"}'\n```\n\n### Environment Arguments\n\n| Arg | Type | Default | Description |\n| --- | ---- | ------- | ----------- |\n| `total_rounds` | int | `3` | Number of negotiation rounds |\n| `opponent_model` | str | `claude-haiku-4-5-20251001` | Model used for opposing counsel AI |\n| `scenarios` | list[int] | See below | Custom list of vendor starting offers |\n\nDefault training scenarios: `[50_000, 100_000, 150_000, 200_000, 300_000, 400_000, 500_000]`\n\n### Metrics\n\n| Metric | Meaning |\n| ------ | ------- |\n| `negotiation_reward` | Main scalar reward (0.0-1.0 based on final cap) |\n| `agreed_cap_metric` | Final agreed dollar amount |\n| `rounds_completed_metric` | Number of negotiation rounds completed |\n\n### How Negotiation Works\n\n```\nRound 1: Model counter-offers → Vendor AI responds with counter\nRound 2: Model counters → Vendor AI responds with counter\nRound 3: Model makes final offer → Settlement = midpoint\n```\n\n### Environment Variables\n\nThe opposing counsel AI uses the OpenAI-compatible API:\n- `OPENAI_API_KEY` - Required for opponent model calls\n","encoding":"utf-8","truncated":false,"total_bytes":2731},"status":null}