DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to refine an agent harness on a small LAB legal set with Harness2

Run one Propose-Probe-Compose step on a single LAB legal domain, then judge and report the result.

Short answer: Create the environment with uv venv --python 3.12 .venv, activate it, and install with uv pip install -e '.[render]'; then run cp .env.example .env, edit .env with your Vertex AI project and model IDs, then run gcloud auth application-default login; install the LAB benchmark with harness2-setup lab and check it with harness2-check --bench lab. All steps.

Credentials. The setup uses gcloud application-default login and a .env file with Vertex AI settings, so keep those credentials out of shared logs and commits.

Who it is forA legal-tech or AI evaluation engineer who needs evidence on whether a harness refinement helps an agent on legal work before scaling up.

The problemJudging whether a harness change helps requires running real model-backed tasks, which is expensive and easy to misconfigure.

The outcomeA judged and reported LAB run for one domain with a small task count, showing whether the refined harness improved results.

What you need first

  • Linux, Python 3.12, and uv
  • For the local demo: nothing else, since it needs no model credentials
  • For model-backed runs: Node.js 20+, the Google Cloud CLI, a Vertex AI project with model IDs, and API budget
  • For LAB: Pandoc and Poppler. For WorkBuddy-Bench: Docker

Steps

  1. Create the environment with uv venv --python 3.12 .venv, activate it, and install with uv pip install -e '.[render]'
  2. Run cp .env.example .env, edit .env with your Vertex AI project and model IDs, then run gcloud auth application-default login
  3. Install the LAB benchmark with harness2-setup lab and check it with harness2-check --bench lab
  4. Run one task with harness2 --bench lab --k 1 --mode parallel --only-domains antitrust-competition --max-tasks 1; add --dry-run first to preview task selection without model calls (inferred, check the README)
  5. Judge the run with harness2-judge --bench lab --k 1 --mode parallel
  6. Generate the summary with harness2-report --bench lab --k 1 --mode parallel

Prompt for your agent

In the google-research/harness2 repo, set up the LAB benchmark, then run harness2 --bench lab --k 1 --mode parallel --only-domains <domain> --max-tasks 1, followed by harness2-judge and harness2-report with the same flags. Report the judged result for the task and the path of the saved results under runs/. Verify that the judge and report commands used the same benchmark, k, mode, and domain as the refinement run.

Caveat. Model-backed runs incur API costs, so start with the single task limit shown and keep the same flags across run, judge, and report.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for google-research/harness2 and "Refine an agent harness on a small LAB legal set"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer