Update dataset
Browse files- README.md +2 -2
- data/test-00000-of-00001.json +1 -0
README.md
CHANGED
|
@@ -25,10 +25,10 @@ A benchmark dataset for evaluating AI systems on challenging computer science pr
|
|
| 25 |
|
| 26 |
## Dataset Description
|
| 27 |
|
| 28 |
-
This dataset contains
|
| 29 |
- **Algorithmic**: 188 competitive programming problems with automated judging
|
| 30 |
- **Research**: 66 open-ended research problems
|
| 31 |
-
- **2.0**:
|
| 32 |
|
| 33 |
## Dataset Structure
|
| 34 |
|
|
|
|
| 25 |
|
| 26 |
## Dataset Description
|
| 27 |
|
| 28 |
+
This dataset contains 264 problems across three categories:
|
| 29 |
- **Algorithmic**: 188 competitive programming problems with automated judging
|
| 30 |
- **Research**: 66 open-ended research problems
|
| 31 |
+
- **2.0**: 10 next-generation open-ended optimization problems
|
| 32 |
|
| 33 |
## Dataset Structure
|
| 34 |
|
data/test-00000-of-00001.json
CHANGED
|
@@ -259,5 +259,6 @@
|
|
| 259 |
{"problem_id": "duckdb_e2e_query_optimization", "category": "2.0", "statement": "# DuckDB E2E Query Optimization\n\n## Problem\n\nThis is an experimental systems task. You are given a pinned DuckDB checkout in\nthe Harbor workspace and may modify DuckDB itself. Your goal is to improve\nend-to-end TPC-H style analytical query performance while preserving the\ncorrectness and generality of DuckDB's SQL execution.\n\nThe intended optimization area is end-to-end analytical query optimization:\njoin ordering, predicate transfer, join-side filtering, cardinality robustness,\nand closely related optimizer/execution wiring. Strong submissions should\nimprove TPC-H geometric mean runtime without hard-coding TPC-H tables, queries,\nbenchmark paths, or judge details.\n\n## Workload\n\nThe public workload family is DuckDB's built-in TPC-H query set. The public\nscale factor is 1, and the experimental judge evaluates q1 through q22 with\nDuckDB's TPC-H extension, for example by generating data with `CALL dbgen(...)`\nand running queries through `PRAGMA tpch(n)`. DuckDB also exposes its TPC-H\nquery text through the extension in normal DuckDB development workflows.\n\nTreat those queries as a representative analytical workload, not as strings to\nrecognize. The judge may include additional non-public scale-factor groups, and\nit may vary query order, repetitions, and correctness coverage. Submissions\nshould implement general optimizer and execution improvements rather than\nTPC-H-specific special cases.\n\n## Submission\n\nThe submitted artifact is a patch file:\n\n```text\n/app/solution.patch\n```\n\nThe agent workspace is expected to contain a DuckDB checkout at:\n\n```text\n/app/duckdb\n```\n\nAfter modifying DuckDB, generate and submit a patch:\n\n```bash\nbash /app/make_submission.sh\nbash /app/submit.sh\n```\n\nSubmissions are asynchronous. For this task, submit an initial small, plausible\npatch as soon as it is generated, then continue local review or compilation\nwhile the judge works. A full local DuckDB build in the agent container can\nconsume most of the agent budget and is not required before the first\nsubmission; the judge builds the submitted patch from a clean prebuilt source\ntree with fixed resource settings.\n\nThe judge applies the patch to a clean pinned DuckDB source tree, builds DuckDB\nwith the TPC-H extension enabled, and times the evaluated TPC-H queries from\nthe judge side. Submitted binaries, build artifacts, generated benchmark files,\nand local timing logs are ignored.\n\n## Correctness\n\nCorrectness is a gate. Patched DuckDB must produce the same SQL results as\nvanilla DuckDB on the evaluated workload. Build failures, patch failures,\nincorrect query results, crashes, timeouts, and out-of-memory failures are\npenalized before performance is considered.\n\nThe experimental evaluator currently encodes the patch policy, timing\norchestration, and vanilla-vs-patched TPC-H result comparison inside the custom\njudge image. During iterative asynchronous submissions, the judge keeps feedback\nfocused on the public scale-factor TPC-H gate so agents can submit early and\ncontinue working while evaluation runs. During final verification, the judge\nuses the broader hidden scale-factor set and also runs a small DuckDB\nSQLLogicTest smoke set covering join, filter, and aggregate behavior before\ntiming is considered.\n\n## Scoring\n\nValid submissions are scored by speedup relative to vanilla DuckDB on the same\nhardware, same benchmark list, same clean environment, and same resource limits.\nFor each benchmark query:\n\n```text\nspeedup = vanilla_time / patched_time\n```\n\nThe primary objective is the geometric mean of per-query speedups. The bounded\nscore is derived from that geometric mean so that a 1.0x result earns 0 points,\nregressions also earn 0 points, and broad speedups are preferred over a single\nlarge outlier. The raw geometric mean speedup is reported in evaluator metrics.\n\n## Patch Policy\n\nThe evaluator validates the patch before building. The policy is intentionally\nstricter than normal DuckDB development because this task is graded by hidden\nbenchmarks.\n\nAllowed optimizer and execution areas:\n\n```text\nsrc/optimizer/**\nsrc/include/duckdb/optimizer/**\nsrc/execution/operator/join/**\nsrc/include/duckdb/execution/operator/join/**\nsrc/execution/operator/filter/**\nsrc/include/duckdb/execution/operator/filter/**\nsrc/planner/operator/logical_join.cpp\nsrc/planner/operator/logical_comparison_join.cpp\nsrc/include/duckdb/planner/operator/logical_join.hpp\nsrc/include/duckdb/planner/operator/logical_comparison_join.hpp\n```\n\nConditionally allowed narrow wiring areas:\n\n```text\nsrc/planner/**\nsrc/include/duckdb/planner/**\nsrc/execution/physical_plan/**\nsrc/include/duckdb/execution/physical_plan/**\nsrc/common/**\nsrc/include/duckdb/common/**\n```\n\nNew C++ and header files are allowed in these areas. Build-system edits are\nallowed only to add newly introduced `.cpp` files to existing DuckDB build\ntargets. Build changes that alter compiler flags, link flags, targets,\ngenerated code, install paths, external dependencies, benchmark behavior, or\nruntime paths are invalid.\n\nAllowed build-system files:\n\n```text\nCMakeLists.txt\nsrc/CMakeLists.txt\nsrc/optimizer/CMakeLists.txt\nsrc/optimizer/**/CMakeLists.txt\nsrc/planner/CMakeLists.txt\nsrc/planner/**/CMakeLists.txt\nsrc/planner/operator/CMakeLists.txt\nsrc/common/CMakeLists.txt\nsrc/common/**/CMakeLists.txt\nsrc/execution/CMakeLists.txt\nsrc/execution/operator/CMakeLists.txt\nsrc/execution/operator/join/CMakeLists.txt\nsrc/execution/operator/join/**/CMakeLists.txt\nsrc/execution/operator/filter/CMakeLists.txt\nsrc/execution/operator/filter/**/CMakeLists.txt\nsrc/execution/physical_plan/CMakeLists.txt\nsrc/execution/physical_plan/**/CMakeLists.txt\nextension_config.cmake\n```\n\nForbidden areas include benchmark files, tests, scripts, TPC-H extension code,\nthird-party code, parser/catalog/storage internals, DuckDB main/client context,\ndocumentation, examples, CI files, package manifests, and timing/scoring code.\n\nPatches may not add environment-variable reads or writes. The judge builds and\nruns both vanilla and patched DuckDB under a minimal fixed environment with no\nFrontier, Harbor, judge, secret, or submission-specific environment variables\ninherited by benchmark subprocesses.\n\nPatches also may not hard-code TPC-H table names, query numbers, benchmark\nnames, or benchmark paths in optimizer/execution code.\n\n## Resource Budget\n\nThe experimental Harbor budget is:\n\n```text\nvCPUs: 8\nmemory: 16 GiB\nstorage: 32 GiB\nbuild timeout: 7200 seconds\nquery timeout: 300 seconds\nDuckDB child process address-space limit: 12288 MiB\n```\n\nThe judge runs each build and benchmark step in a subprocess with a clean\nenvironment. DuckDB benchmark runs are configured with fixed thread, memory,\nand temporary-directory limits in the judge image to reduce the chance that a\nbad plan crashes the judge service.\n\nThe evaluator runs both vanilla and patched DuckDB with the same SQL runtime\nsettings before data generation, correctness checks, and timing:\n\n```sql\nSET threads = 1;\nSET memory_limit = '6GB';\nSET max_temp_directory_size = '2GB';\nSET temp_directory = '<judge temp directory>';\nSET preserve_insertion_order = false;\n```\n\nSubprocesses receive a minimal fixed environment with only basic execution\npaths, locale settings, an isolated home directory, an isolated temp directory,\nand an isolated ccache directory.\n", "config": "tag: systems\nruntime:\n language: cpp\n timeout_seconds: 10800\n environment: \"DuckDB source patch; TPC-H shell timing; experimental judge\"\n apt_packages:\n - bash\n - build-essential\n - ca-certificates\n - ccache\n - cmake\n - git\n - ninja-build\n - pkg-config\n - python3\n judge_apt_packages:\n - bash\n - build-essential\n - ca-certificates\n - ccache\n - cmake\n - git\n - ninja-build\n - pkg-config\n - python3\n docker:\n # Experimental local images. Build them with\n # 2.0/problems/duckdb_e2e_query_optimization/docker/build_images.sh before running a\n # local Harbor trial.\n image: frontiercs/duckdb-e2e-query-optimization-agent:experimental-v1.5.3\n judge_image: frontiercs/duckdb-e2e-query-optimization-judge:experimental-v1.5.3\nenvironment:\n cpus: 8\n memory_mb: 16384\n storage_mb: 32768\n build_timeout_seconds: 7200\nevaluation:\n scale_factor: 1\n agent_scale_factors:\n - 1\n benchmark_repetitions: 3\n build_timeout_seconds: 7200\n query_timeout_seconds: 300\n sqllogictest_timeout_seconds: 600\n duckdb_memory_limit: \"6GB\"\n duckdb_temp_limit: \"2GB\"\n child_memory_mb: 12288\nsubmission:\n kind: file\n path: /app/solution.patch\n"}
|
| 260 |
{"problem_id": "erdos_demo", "category": "2.0", "statement": "# Erdos Unit Distance Demo\n\n## Problem\n\nPlace exactly `N = 10` distinct points in the Euclidean plane so that the\nnumber of point pairs at Euclidean distance exactly `1` is as large as possible.\n\nThis is a tiny, visually inspectable demo version of the planar unit distance\nproblem. If your construction naturally has a different common distance, scale\nthe coordinates before returning them.\n\n## Program Interface\n\nSubmit a Python file defining one of the following:\n\n```python\ndef solve(n: int) -> list[tuple[float, float]]:\n ...\n```\n\nor:\n\n```python\ndef generate_points(n: int) -> list[tuple[float, float]]:\n ...\n```\n\nor:\n\n```python\nPOINTS = [(0.0, 0.0), (1.0, 0.0), ...]\n```\n\nThe returned value must contain exactly 10 two-dimensional points. No stdin is\nused.\n\n## Validity Constraints\n\nA solution is valid if:\n\n1. It returns exactly 10 points.\n2. Every coordinate is a finite real number.\n3. No two points are closer than `1e-6`.\n\nThe objective is translation-invariant. Very large coordinates are allowed as\nlong as pairwise squared distances remain finite.\n\n## Objective\n\nFor all unordered point pairs, count those whose squared Euclidean distance is\nequal to `1` within a small floating-point tolerance. Let `M` be that count.\n\nMaximize `M`.\n\n## Scoring\n\nThe score is naturally scaled to `[0, 100)`, without clipping against a fixed\ntarget. Let:\n\n```text\nbaseline = N\nX = M\n```\n\nIf the point set is invalid, or if `X <= baseline`, the score is `0`. Otherwise:\n\n```text\nscore = 100 * (X - baseline) / X\n```\n\nThis makes the simple `N`-pair baseline worth `0`. With only 10 points, the\nproblem is intended as a quick sanity check and visual demo for agent workflows.\n", "config": "tag: geometry\nruntime:\n language: python\n timeout_seconds: 300\n environment: \"Python 3.11; no external packages required\"\n docker:\n image: ubuntu:24.04\n"}
|
| 261 |
{"problem_id": "erdos_unit_distance", "category": "2.0", "statement": "# Erdos Unit Distance\n\n## Problem\n\nPlace exactly `N = 65536` distinct points in the Euclidean plane so that the\nnumber of point pairs at Euclidean distance exactly `1` is as large as possible.\n\nThis is a finite, executable version of the planar unit distance problem:\ngiven `n` points, maximize the number of pairs at distance exactly `1`. If your\nconstruction naturally has a different common distance, scale the coordinates\nbefore returning them.\n\n## Program Interface\n\nSubmit a Python file defining one of the following:\n\n```python\ndef solve(n: int) -> list[tuple[float, float]]:\n ...\n```\n\nor:\n\n```python\ndef generate_points(n: int) -> list[tuple[float, float]]:\n ...\n```\n\nor:\n\n```python\nPOINTS = [(0.0, 0.0), (1.0, 0.0), ...]\n```\n\nThe returned value must contain exactly 65536 two-dimensional points. No stdin\nis used.\n\n## Validity Constraints\n\nA solution is valid if:\n\n1. It returns exactly 65536 points.\n2. Every coordinate is a finite real number.\n3. No two points are closer than `1e-3`.\n\nThe objective is translation-invariant. Very large coordinates are allowed as\nlong as pairwise squared distances remain finite.\n\n## Objective\n\nFor all unordered point pairs, count those whose squared Euclidean distance is\nequal to `1` within a strict floating-point tolerance. Let `M` be that count.\n\nMaximize `M`.\n\n## Scoring\n\nThe score is naturally scaled to `[0, 100)`, without clipping against a fixed\ntarget. Let:\n\n```text\nbaseline = N\nX = M\n```\n\nIf the point set is invalid, or if `X <= baseline`, the score is `0`. Otherwise\nthe raw score is:\n\n```text\nraw_score = 100 * (X - baseline) / X\n```\n\nThe reported score applies a cubic scale:\n\n```text\nscore = 100 * (raw_score / 100)^3\n```\n\nThis makes the simple `N`-pair baseline worth `0`, rewards every improvement\nabove the baseline, and keeps high-scoring constructions from saturating the\nbenchmark too quickly. The bounded and unbounded score fields both report this\ncubic-scaled score; evaluator messages also include `raw_score` for reference.\n", "config": "tag: geometry\nruntime:\n language: python\n timeout_seconds: 10800\n environment: \"Python 3.11; no external packages required\"\n docker:\n image: ubuntu:24.04\n"}
|
|
|
|
| 262 |
{"problem_id": "vector_db_ann", "category": "2.0", "statement": "# Vector DB ANN\n\n## Problem\n\nBuild a fast approximate nearest-neighbor vector search engine for a\nSIFT1M-scale benchmark.\n\nThe hidden benchmark contains exactly `1,000,000` base vectors with dimension\n`128`. Queries use the same dimension, distance is squared Euclidean distance,\nand each query asks for the top `10` nearest vector ids.\n\nYour objective is to maximize serving throughput while preserving search\nquality: submissions must reach `recall@10 >= 0.95`, and valid submissions are\nranked by an effective QPS that includes query time plus a small load/index-build\npenalty.\n\nThe Harbor agent container starts with a small Rust skeleton project in\n`/app`. You may use it, modify it, or replace it entirely. You may also use any\nRust crates, internal harness, data structures, and build layout you want, as\nlong as the final project satisfies the judge contract below.\n\nThe judge builds and runs your service with:\n\n```bash\ncargo build --release\nPORT=<port> cargo run --release --quiet\n```\n\nThe Harbor environment uses the Ubuntu `apt` Rust toolchain:\n\n```text\nrustc 1.75\ncargo 1.75\n```\n\nIf you add crates, choose versions compatible with this toolchain or pin\ntransitive dependencies accordingly.\n\nThe service and judge run with the task resource limits below. Design your\nparallel search and indexing strategy for this budget:\n\n```text\nvCPUs: 8\nmemory: 16 GiB\nquery concurrency: 8\ntimed queries per worker: 64\n```\n\nThe service must listen on `PORT` and implement these endpoints:\n\n```text\nPOST /insert\nPOST /bulk_insert\nPOST /search\n```\n\n`/bulk_insert` receives:\n\n```json\n{\"vectors\":[{\"id\":0,\"vector\":[0.1,0.2,...]}]}\n```\n\nand returns:\n\n```json\n{\"status\":\"ok\",\"inserted\":1}\n```\n\n`/search` receives:\n\n```json\n{\"vector\":[0.1,0.2,...],\"top_k\":10}\n```\n\nand returns:\n\n```json\n{\"results\":[{\"id\":0,\"distance\":0.0}]}\n```\n\n## Local Harness\n\nThe official evaluator uses hidden data and a black-box judge. You may call:\n\n```bash\nbash /app/submit.sh\n```\n\nat any time to submit the current `/app` project to the official judge and get\nscore feedback.\n\n## Validity\n\nA submission is valid if:\n\n1. It builds successfully with `cargo build --release`.\n2. `cargo run --release --quiet` starts the service and implements the required HTTP\n endpoints.\n3. Every returned id is in `[0, 1_000_000)`.\n4. Its `recall@10` is at least `0.95` against the hidden exact top-10 ground\n truth.\n\n## Scoring\n\nAt trial startup, the Harbor judge sidecar prepares the hidden benchmark and\nruns an exact-search reference HTTP service through the same `/bulk_insert`\nand `/search` client harnesses to produce ground-truth nearest neighbors and\nthe trial-local scoring baseline:\n\n```text\nbaseline_qps\nbaseline_effective_qps\nbaseline_load_seconds\n```\n\nInteractive submissions and the final verifier both score through this same\njudge sidecar, so the baseline and runtime environment are shared within a\ntrial while still letting different machines measure their own local baseline.\n\nEach submission is then timed independently. The load phase includes all\n`/bulk_insert` calls and any index construction performed by the service before\nqueries begin. The query phase uses 8 concurrent workers, each issuing 64\nqueries, and measures only `/search` throughput:\n\n```text\ncandidate_qps\ncandidate_load_seconds\n```\n\nThe reported `qps` is the raw query-only QPS. Scoring uses an effective QPS\nthat includes a small index-build/load penalty:\n\n```text\neffective_qps = Q / (query_seconds + 0.01 * load_seconds)\n```\n\nThe load phase has a default `900s` timeout. This keeps the benchmark focused\non serving performance while still making very expensive offline indexing pay a\nbounded, explicit cost.\n\nDuring evaluation, the load and query phases may stop early and return `0` once\nthe elapsed time plus the load penalty makes it impossible for the final\neffective QPS to beat the baseline. During load, this assumes a best-case query\ntime of zero.\n\nIf the submission is invalid, if `recall@10 < 0.95`, or if\n`candidate_effective_qps <= baseline_effective_qps`, the score is `0`.\nOtherwise:\n\n```text\nscore = 100 * (1 - sqrt(baseline_effective_qps) / sqrt(candidate_effective_qps))\n```\n\nThe bounded and unbounded score fields both report this score. Harbor JSON\nresults include the measured `qps`, `effective_qps`, `baseline_qps`,\n`baseline_effective_qps`, `recall_at_10`, load time, and runtime metrics under\nthe `metrics` field.\n", "config": "tag: systems\nruntime:\n language: rust\n timeout_seconds: 10800\n environment: \"Rust project; hidden ANN benchmark; Python/NumPy judge\"\n apt_packages:\n - build-essential\n - cargo\n - git\n - rustc\n judge_apt_packages:\n - build-essential\n - cargo\n - rustc\n - python3-pip\n - python3-numpy\n judge_pip_packages:\n - faiss-cpu\n docker:\n image: ubuntu:24.04\nenvironment:\n # If these resource limits change, also update the resource budget text in\n # readme and harbor/app/README.md so agents can design parallel algorithms\n # for the actual CPU and memory budget.\n cpus: 8\n memory_mb: 16384\n storage_mb: 8192\n build_timeout_seconds: 3600\nevaluation:\n # The judge drives the search service with this many concurrent workers.\n # Keep this aligned with the CPU budget unless the task is intentionally\n # changed into a higher-concurrency service benchmark.\n query_concurrency: 8\n queries_per_worker: 64\nsubmission:\n kind: directory\n path: /app\n exclude:\n - target\n - .git\n - .frontier-cs\n"}
|
| 263 |
{"problem_id": "vector_db_ann_relaxed", "category": "2.0", "statement": "# Vector DB ANN Relaxed\n\n## Problem\n\nBuild a fast approximate nearest-neighbor vector search engine for a\nSIFT1M-scale benchmark. This relaxed variant uses the same data, API, resource\nbudget, and recall target as Vector DB ANN, but penalizes load/index-build time\n10x less heavily.\n\nThe hidden benchmark contains exactly `1,000,000` base vectors with dimension\n`128`. Queries use the same dimension, distance is squared Euclidean distance,\nand each query asks for the top `10` nearest vector ids.\n\nYour objective is to maximize serving throughput while preserving search\nquality: submissions must reach `recall@10 >= 0.95`, and valid submissions are\nranked by an effective QPS that includes query time plus a small\nload/index-build penalty.\n\nThe Harbor agent container starts with a small Rust skeleton project in\n`/app`. You may use it, modify it, or replace it entirely. You may also use any\nRust crates, internal harness, data structures, and build layout you want, as\nlong as the final project satisfies the judge contract below.\n\nThe judge builds and runs your service with:\n\n```bash\ncargo build --release\nPORT=<port> cargo run --release --quiet\n```\n\nThe Harbor environment uses the Ubuntu `apt` Rust toolchain:\n\n```text\nrustc 1.75\ncargo 1.75\n```\n\nIf you add crates, choose versions compatible with this toolchain or pin\ntransitive dependencies accordingly.\n\nThe service and judge run with the task resource limits below. Design your\nparallel search and indexing strategy for this budget:\n\n```text\nvCPUs: 8\nmemory: 16 GiB\nquery concurrency: 8\ntimed queries per worker: 64\n```\n\nThe service must listen on `PORT` and implement these endpoints:\n\n```text\nPOST /insert\nPOST /bulk_insert\nPOST /search\n```\n\n`/bulk_insert` receives:\n\n```json\n{\"vectors\":[{\"id\":0,\"vector\":[0.1,0.2,...]}]}\n```\n\nand returns:\n\n```json\n{\"status\":\"ok\",\"inserted\":1}\n```\n\n`/search` receives:\n\n```json\n{\"vector\":[0.1,0.2,...],\"top_k\":10}\n```\n\nand returns:\n\n```json\n{\"results\":[{\"id\":0,\"distance\":0.0}]}\n```\n\n## Local Harness\n\nThe official evaluator uses hidden data and a black-box judge. You may call:\n\n```bash\nbash /app/submit.sh\n```\n\nat any time to submit the current `/app` project to the official judge and get\nscore feedback.\n\n## Validity\n\nA submission is valid if:\n\n1. It builds successfully with `cargo build --release`.\n2. `cargo run --release --quiet` starts the service and implements the required HTTP\n endpoints.\n3. Every returned id is in `[0, 1_000_000)`.\n4. Its `recall@10` is at least `0.95` against the hidden exact top-10 ground\n truth.\n\n## Scoring\n\nAt trial startup, the Harbor judge sidecar prepares the hidden benchmark and\nruns an exact-search reference HTTP service through the same `/bulk_insert`\nand `/search` client harnesses to produce ground-truth nearest neighbors and\nthe trial-local scoring baseline:\n\n```text\nbaseline_qps\nbaseline_effective_qps\nbaseline_load_seconds\n```\n\nInteractive submissions and the final verifier both score through this same\njudge sidecar, so the baseline and runtime environment are shared within a\ntrial while still letting different machines measure their own local baseline.\n\nEach submission is then timed independently. The load phase includes all\n`/bulk_insert` calls and any index construction performed by the service before\nqueries begin. The query phase uses 8 concurrent workers, each issuing 64\nqueries, and measures only `/search` throughput:\n\n```text\ncandidate_qps\ncandidate_load_seconds\n```\n\nThe reported `qps` is the raw query-only QPS. Scoring uses an effective QPS\nthat includes a small index-build/load penalty:\n\n```text\neffective_qps = Q / (query_seconds + 0.001 * load_seconds)\n```\n\nThe load phase has a default `900s` timeout. This keeps the benchmark focused\non serving performance while still making very expensive offline indexing pay a\nbounded, explicit cost. This relaxed variant makes the load/index-build penalty\nsmall enough that spending additional time on a stronger index can be worthwhile\nwhen it materially improves query throughput or recall.\n\nDuring evaluation, the load and query phases may stop early and return `0` once\nthe elapsed time plus the load penalty makes it impossible for the final\neffective QPS to beat the baseline. During load, this assumes a best-case query\ntime of zero.\n\nIf the submission is invalid, if `recall@10 < 0.95`, or if\n`candidate_effective_qps <= baseline_effective_qps`, the score is `0`.\nOtherwise:\n\n```text\nscore = 100 * (1 - sqrt(baseline_effective_qps) / sqrt(candidate_effective_qps))\n```\n\nThe bounded and unbounded score fields both report this score. Harbor JSON\nresults include the measured `qps`, `effective_qps`, `baseline_qps`,\n`baseline_effective_qps`, `recall_at_10`, load time, and runtime metrics under\nthe `metrics` field.\n", "config": "tag: systems\nruntime:\n language: rust\n timeout_seconds: 10800\n environment: \"Rust project; hidden ANN benchmark; Python/NumPy judge\"\n apt_packages:\n - build-essential\n - cargo\n - git\n - rustc\n judge_apt_packages:\n - build-essential\n - cargo\n - rustc\n - python3-pip\n - python3-numpy\n judge_pip_packages:\n - faiss-cpu\n docker:\n image: ubuntu:24.04\nenvironment:\n # If these resource limits change, also update the resource budget text in\n # readme and harbor/app/README.md so agents can design parallel algorithms\n # for the actual CPU and memory budget.\n cpus: 8\n memory_mb: 16384\n storage_mb: 8192\n build_timeout_seconds: 3600\nevaluation:\n # The judge drives the search service with this many concurrent workers.\n # Keep this aligned with the CPU budget unless the task is intentionally\n # changed into a higher-concurrency service benchmark.\n query_concurrency: 8\n queries_per_worker: 64\n # Weight applied to load/index-build time when computing effective QPS.\n # This relaxed variant rewards stronger indexes by penalizing build time\n # 10x less than the standard Vector DB ANN task.\n load_penalty_weight: 0.001\nsubmission:\n kind: directory\n path: /app\n exclude:\n - target\n - .git\n - .frontier-cs\n"}
|
|
|
|
| 259 |
{"problem_id": "duckdb_e2e_query_optimization", "category": "2.0", "statement": "# DuckDB E2E Query Optimization\n\n## Problem\n\nThis is an experimental systems task. You are given a pinned DuckDB checkout in\nthe Harbor workspace and may modify DuckDB itself. Your goal is to improve\nend-to-end TPC-H style analytical query performance while preserving the\ncorrectness and generality of DuckDB's SQL execution.\n\nThe intended optimization area is end-to-end analytical query optimization:\njoin ordering, predicate transfer, join-side filtering, cardinality robustness,\nand closely related optimizer/execution wiring. Strong submissions should\nimprove TPC-H geometric mean runtime without hard-coding TPC-H tables, queries,\nbenchmark paths, or judge details.\n\n## Workload\n\nThe public workload family is DuckDB's built-in TPC-H query set. The public\nscale factor is 1, and the experimental judge evaluates q1 through q22 with\nDuckDB's TPC-H extension, for example by generating data with `CALL dbgen(...)`\nand running queries through `PRAGMA tpch(n)`. DuckDB also exposes its TPC-H\nquery text through the extension in normal DuckDB development workflows.\n\nTreat those queries as a representative analytical workload, not as strings to\nrecognize. The judge may include additional non-public scale-factor groups, and\nit may vary query order, repetitions, and correctness coverage. Submissions\nshould implement general optimizer and execution improvements rather than\nTPC-H-specific special cases.\n\n## Submission\n\nThe submitted artifact is a patch file:\n\n```text\n/app/solution.patch\n```\n\nThe agent workspace is expected to contain a DuckDB checkout at:\n\n```text\n/app/duckdb\n```\n\nAfter modifying DuckDB, generate and submit a patch:\n\n```bash\nbash /app/make_submission.sh\nbash /app/submit.sh\n```\n\nSubmissions are asynchronous. For this task, submit an initial small, plausible\npatch as soon as it is generated, then continue local review or compilation\nwhile the judge works. A full local DuckDB build in the agent container can\nconsume most of the agent budget and is not required before the first\nsubmission; the judge builds the submitted patch from a clean prebuilt source\ntree with fixed resource settings.\n\nThe judge applies the patch to a clean pinned DuckDB source tree, builds DuckDB\nwith the TPC-H extension enabled, and times the evaluated TPC-H queries from\nthe judge side. Submitted binaries, build artifacts, generated benchmark files,\nand local timing logs are ignored.\n\n## Correctness\n\nCorrectness is a gate. Patched DuckDB must produce the same SQL results as\nvanilla DuckDB on the evaluated workload. Build failures, patch failures,\nincorrect query results, crashes, timeouts, and out-of-memory failures are\npenalized before performance is considered.\n\nThe experimental evaluator currently encodes the patch policy, timing\norchestration, and vanilla-vs-patched TPC-H result comparison inside the custom\njudge image. During iterative asynchronous submissions, the judge keeps feedback\nfocused on the public scale-factor TPC-H gate so agents can submit early and\ncontinue working while evaluation runs. During final verification, the judge\nuses the broader hidden scale-factor set and also runs a small DuckDB\nSQLLogicTest smoke set covering join, filter, and aggregate behavior before\ntiming is considered.\n\n## Scoring\n\nValid submissions are scored by speedup relative to vanilla DuckDB on the same\nhardware, same benchmark list, same clean environment, and same resource limits.\nFor each benchmark query:\n\n```text\nspeedup = vanilla_time / patched_time\n```\n\nThe primary objective is the geometric mean of per-query speedups. The bounded\nscore is derived from that geometric mean so that a 1.0x result earns 0 points,\nregressions also earn 0 points, and broad speedups are preferred over a single\nlarge outlier. The raw geometric mean speedup is reported in evaluator metrics.\n\n## Patch Policy\n\nThe evaluator validates the patch before building. The policy is intentionally\nstricter than normal DuckDB development because this task is graded by hidden\nbenchmarks.\n\nAllowed optimizer and execution areas:\n\n```text\nsrc/optimizer/**\nsrc/include/duckdb/optimizer/**\nsrc/execution/operator/join/**\nsrc/include/duckdb/execution/operator/join/**\nsrc/execution/operator/filter/**\nsrc/include/duckdb/execution/operator/filter/**\nsrc/planner/operator/logical_join.cpp\nsrc/planner/operator/logical_comparison_join.cpp\nsrc/include/duckdb/planner/operator/logical_join.hpp\nsrc/include/duckdb/planner/operator/logical_comparison_join.hpp\n```\n\nConditionally allowed narrow wiring areas:\n\n```text\nsrc/planner/**\nsrc/include/duckdb/planner/**\nsrc/execution/physical_plan/**\nsrc/include/duckdb/execution/physical_plan/**\nsrc/common/**\nsrc/include/duckdb/common/**\n```\n\nNew C++ and header files are allowed in these areas. Build-system edits are\nallowed only to add newly introduced `.cpp` files to existing DuckDB build\ntargets. Build changes that alter compiler flags, link flags, targets,\ngenerated code, install paths, external dependencies, benchmark behavior, or\nruntime paths are invalid.\n\nAllowed build-system files:\n\n```text\nCMakeLists.txt\nsrc/CMakeLists.txt\nsrc/optimizer/CMakeLists.txt\nsrc/optimizer/**/CMakeLists.txt\nsrc/planner/CMakeLists.txt\nsrc/planner/**/CMakeLists.txt\nsrc/planner/operator/CMakeLists.txt\nsrc/common/CMakeLists.txt\nsrc/common/**/CMakeLists.txt\nsrc/execution/CMakeLists.txt\nsrc/execution/operator/CMakeLists.txt\nsrc/execution/operator/join/CMakeLists.txt\nsrc/execution/operator/join/**/CMakeLists.txt\nsrc/execution/operator/filter/CMakeLists.txt\nsrc/execution/operator/filter/**/CMakeLists.txt\nsrc/execution/physical_plan/CMakeLists.txt\nsrc/execution/physical_plan/**/CMakeLists.txt\nextension_config.cmake\n```\n\nForbidden areas include benchmark files, tests, scripts, TPC-H extension code,\nthird-party code, parser/catalog/storage internals, DuckDB main/client context,\ndocumentation, examples, CI files, package manifests, and timing/scoring code.\n\nPatches may not add environment-variable reads or writes. The judge builds and\nruns both vanilla and patched DuckDB under a minimal fixed environment with no\nFrontier, Harbor, judge, secret, or submission-specific environment variables\ninherited by benchmark subprocesses.\n\nPatches also may not hard-code TPC-H table names, query numbers, benchmark\nnames, or benchmark paths in optimizer/execution code.\n\n## Resource Budget\n\nThe experimental Harbor budget is:\n\n```text\nvCPUs: 8\nmemory: 16 GiB\nstorage: 32 GiB\nbuild timeout: 7200 seconds\nquery timeout: 300 seconds\nDuckDB child process address-space limit: 12288 MiB\n```\n\nThe judge runs each build and benchmark step in a subprocess with a clean\nenvironment. DuckDB benchmark runs are configured with fixed thread, memory,\nand temporary-directory limits in the judge image to reduce the chance that a\nbad plan crashes the judge service.\n\nThe evaluator runs both vanilla and patched DuckDB with the same SQL runtime\nsettings before data generation, correctness checks, and timing:\n\n```sql\nSET threads = 1;\nSET memory_limit = '6GB';\nSET max_temp_directory_size = '2GB';\nSET temp_directory = '<judge temp directory>';\nSET preserve_insertion_order = false;\n```\n\nSubprocesses receive a minimal fixed environment with only basic execution\npaths, locale settings, an isolated home directory, an isolated temp directory,\nand an isolated ccache directory.\n", "config": "tag: systems\nruntime:\n language: cpp\n timeout_seconds: 10800\n environment: \"DuckDB source patch; TPC-H shell timing; experimental judge\"\n apt_packages:\n - bash\n - build-essential\n - ca-certificates\n - ccache\n - cmake\n - git\n - ninja-build\n - pkg-config\n - python3\n judge_apt_packages:\n - bash\n - build-essential\n - ca-certificates\n - ccache\n - cmake\n - git\n - ninja-build\n - pkg-config\n - python3\n docker:\n # Experimental local images. Build them with\n # 2.0/problems/duckdb_e2e_query_optimization/docker/build_images.sh before running a\n # local Harbor trial.\n image: frontiercs/duckdb-e2e-query-optimization-agent:experimental-v1.5.3\n judge_image: frontiercs/duckdb-e2e-query-optimization-judge:experimental-v1.5.3\nenvironment:\n cpus: 8\n memory_mb: 16384\n storage_mb: 32768\n build_timeout_seconds: 7200\nevaluation:\n scale_factor: 1\n agent_scale_factors:\n - 1\n benchmark_repetitions: 3\n build_timeout_seconds: 7200\n query_timeout_seconds: 300\n sqllogictest_timeout_seconds: 600\n duckdb_memory_limit: \"6GB\"\n duckdb_temp_limit: \"2GB\"\n child_memory_mb: 12288\nsubmission:\n kind: file\n path: /app/solution.patch\n"}
|
| 260 |
{"problem_id": "erdos_demo", "category": "2.0", "statement": "# Erdos Unit Distance Demo\n\n## Problem\n\nPlace exactly `N = 10` distinct points in the Euclidean plane so that the\nnumber of point pairs at Euclidean distance exactly `1` is as large as possible.\n\nThis is a tiny, visually inspectable demo version of the planar unit distance\nproblem. If your construction naturally has a different common distance, scale\nthe coordinates before returning them.\n\n## Program Interface\n\nSubmit a Python file defining one of the following:\n\n```python\ndef solve(n: int) -> list[tuple[float, float]]:\n ...\n```\n\nor:\n\n```python\ndef generate_points(n: int) -> list[tuple[float, float]]:\n ...\n```\n\nor:\n\n```python\nPOINTS = [(0.0, 0.0), (1.0, 0.0), ...]\n```\n\nThe returned value must contain exactly 10 two-dimensional points. No stdin is\nused.\n\n## Validity Constraints\n\nA solution is valid if:\n\n1. It returns exactly 10 points.\n2. Every coordinate is a finite real number.\n3. No two points are closer than `1e-6`.\n\nThe objective is translation-invariant. Very large coordinates are allowed as\nlong as pairwise squared distances remain finite.\n\n## Objective\n\nFor all unordered point pairs, count those whose squared Euclidean distance is\nequal to `1` within a small floating-point tolerance. Let `M` be that count.\n\nMaximize `M`.\n\n## Scoring\n\nThe score is naturally scaled to `[0, 100)`, without clipping against a fixed\ntarget. Let:\n\n```text\nbaseline = N\nX = M\n```\n\nIf the point set is invalid, or if `X <= baseline`, the score is `0`. Otherwise:\n\n```text\nscore = 100 * (X - baseline) / X\n```\n\nThis makes the simple `N`-pair baseline worth `0`. With only 10 points, the\nproblem is intended as a quick sanity check and visual demo for agent workflows.\n", "config": "tag: geometry\nruntime:\n language: python\n timeout_seconds: 300\n environment: \"Python 3.11; no external packages required\"\n docker:\n image: ubuntu:24.04\n"}
|
| 261 |
{"problem_id": "erdos_unit_distance", "category": "2.0", "statement": "# Erdos Unit Distance\n\n## Problem\n\nPlace exactly `N = 65536` distinct points in the Euclidean plane so that the\nnumber of point pairs at Euclidean distance exactly `1` is as large as possible.\n\nThis is a finite, executable version of the planar unit distance problem:\ngiven `n` points, maximize the number of pairs at distance exactly `1`. If your\nconstruction naturally has a different common distance, scale the coordinates\nbefore returning them.\n\n## Program Interface\n\nSubmit a Python file defining one of the following:\n\n```python\ndef solve(n: int) -> list[tuple[float, float]]:\n ...\n```\n\nor:\n\n```python\ndef generate_points(n: int) -> list[tuple[float, float]]:\n ...\n```\n\nor:\n\n```python\nPOINTS = [(0.0, 0.0), (1.0, 0.0), ...]\n```\n\nThe returned value must contain exactly 65536 two-dimensional points. No stdin\nis used.\n\n## Validity Constraints\n\nA solution is valid if:\n\n1. It returns exactly 65536 points.\n2. Every coordinate is a finite real number.\n3. No two points are closer than `1e-3`.\n\nThe objective is translation-invariant. Very large coordinates are allowed as\nlong as pairwise squared distances remain finite.\n\n## Objective\n\nFor all unordered point pairs, count those whose squared Euclidean distance is\nequal to `1` within a strict floating-point tolerance. Let `M` be that count.\n\nMaximize `M`.\n\n## Scoring\n\nThe score is naturally scaled to `[0, 100)`, without clipping against a fixed\ntarget. Let:\n\n```text\nbaseline = N\nX = M\n```\n\nIf the point set is invalid, or if `X <= baseline`, the score is `0`. Otherwise\nthe raw score is:\n\n```text\nraw_score = 100 * (X - baseline) / X\n```\n\nThe reported score applies a cubic scale:\n\n```text\nscore = 100 * (raw_score / 100)^3\n```\n\nThis makes the simple `N`-pair baseline worth `0`, rewards every improvement\nabove the baseline, and keeps high-scoring constructions from saturating the\nbenchmark too quickly. The bounded and unbounded score fields both report this\ncubic-scaled score; evaluator messages also include `raw_score` for reference.\n", "config": "tag: geometry\nruntime:\n language: python\n timeout_seconds: 10800\n environment: \"Python 3.11; no external packages required\"\n docker:\n image: ubuntu:24.04\n"}
|
| 262 |
+
{"problem_id": "generals_io_bot", "category": "2.0", "statement": "# Generals.io Bot Arena\n\n## Problem\n\nImplement a bot for a local Generals.io-style arena. Your bot plays repeated\ntwo-player games against fixed baseline bots in the `generals-bots` simulator.\n\nEach game is played on a square grid with fog of war. A player wins by capturing\nthe opponent's general. If no general is captured before the truncation limit,\nthe game is scored as a draw for win-rate purposes.\n\nThe environment is the local `generals-bots` simulator, not the online\ngenerals.io service. Each turn your bot receives an observation containing:\n\n```text\narmies, generals, cities, mountains, neutral_cells, owned_cells,\nopponent_cells, fog_cells, structures_in_fog, owned/opponent land and army\ncounts, and timestep\n```\n\nFog hides cells outside the visibility radius around your territory. Mountains\nare impassable. Cities and generals produce armies over time. A valid move sends\narmy from one owned cell to an adjacent passable cell; moving into enemy or\nneutral territory captures it only when the moving army is larger than the\ndefending army.\n\n## Submission\n\nSubmit a patch against the public `generals_agent` skeleton. In Harbor, edit the\nrepository under:\n\n```text\n/app/generals_agent\n```\n\nThen run:\n\n```bash\nbash /app/make_submission.sh\nbash /app/submit.sh\n```\n\nStart by submitting the baseline skeleton once before running long local\nexperiments. This establishes black-box feedback early; later submissions can\nreplace it as you improve the bot.\n\nThe patch must produce a Python module with:\n\n```python\nclass FrontierAgent:\n def act(self, observation, key):\n ...\n```\n\n`act` must return a `generals-bots` action array:\n\n```text\n[pass, row, col, direction, split]\n```\n\nwhere `direction` is `0=up`, `1=down`, `2=left`, `3=right`, and `split`\nselects whether to move half the army instead of all-but-one.\n\nPatches may modify only these files:\n\n```text\nbot.py\nstrategy.py\nutils.py\n```\n\nThe judge rejects binary patches, oversized patches, path traversal, and common\nfile/network/process access tokens. This is a bot-policy benchmark, not an\nenvironment inspection task.\n\nThe agent workspace intentionally does not include a Frontier-CS match runner,\nbaseline ensemble, hidden seeds, or evaluator implementation. Use the black-box\nsubmission interface for scoring feedback.\n\n## Scoring\n\nEvery submission is evaluated against the same baseline families used by final\nverification. These include random, expansion, hunting/pathing, and\nstrategy-inspired rule-based opponents, so exploiting only one weak bot is not\nenough for a high score. Faster wins also matter: the score gives substantial\ncredit for capturing the enemy general in fewer turns.\n\nThe default Harbor configuration is intentionally lightweight so agents can\niterate quickly: it uses one game per matchup and an internal evaluator time\nbudget. Increase `games_per_matchup`, `grid_sizes`, `truncation`, `pool_size`,\nand `max_eval_seconds` together in `config.yaml` for a heavier run. Adjust\n`speed_weight` if you want fast wins to matter more or less relative to raw win\nrate.\n\nPractical tip: the simulator is JAX-based. Simple array programs compile and\nrun much faster than large Python control-flow policies, so keep `act` compact\nand vectorized when possible.\n\nThe reported score is scaled to `[0, 100]`:\n\n```text\nscore = 100 * ((1 - speed_weight) * mean_baseline_win_rate + speed_weight * mean_baseline_speed_tiebreak)\n```\n\nThe default `speed_weight` is `0.25`. The speed credit is only earned on games\nthat your bot wins and is larger for earlier captures.\n\n## Notes\n\n- The online generals.io service is not used.\n- The hidden evaluator and hidden seeds are not visible in the agent workspace.\n- The task uses `strakam/generals-bots` at pinned commit\n `c2b77bf72812ec91fb2024d80d90112b961dfa7e` under the MIT license.\n", "config": "tag: games\nruntime:\n language: patch\n timeout_seconds: 10800\n environment: \"Generals.io bot patch; local generals-bots simulator arena\"\n apt_packages:\n - bash\n - ca-certificates\n - git\n - python3\n - python3-pip\n judge_apt_packages:\n - bash\n - ca-certificates\n - git\n - python3\n - python3-pip\n docker:\n image: frontiercs/generals-io-bot-agent:experimental-c2b77bf\n judge_image: frontiercs/generals-io-bot-judge:experimental-c2b77bf\nenvironment:\n cpus: 4\n memory_mb: 8192\n storage_mb: 8192\n build_timeout_seconds: 1800\nevaluation:\n generals_bots_commit: \"c2b77bf72812ec91fb2024d80d90112b961dfa7e\"\n arena_seed: 20260608\n games_per_matchup: 1\n async_start_method: spawn\n max_eval_seconds: 240\n truncation: 180\n pool_size: 2\n speed_weight: 0.25\n grid_sizes:\n - 10\n baselines:\n - random_low_split\n - expander\n - strongest_frontier\n - hunter\n - fast_pathing\n - flobot_fast\nsubmission:\n kind: file\n path: /app/solution.patch\n allow_empty: true\n"}
|
| 263 |
{"problem_id": "vector_db_ann", "category": "2.0", "statement": "# Vector DB ANN\n\n## Problem\n\nBuild a fast approximate nearest-neighbor vector search engine for a\nSIFT1M-scale benchmark.\n\nThe hidden benchmark contains exactly `1,000,000` base vectors with dimension\n`128`. Queries use the same dimension, distance is squared Euclidean distance,\nand each query asks for the top `10` nearest vector ids.\n\nYour objective is to maximize serving throughput while preserving search\nquality: submissions must reach `recall@10 >= 0.95`, and valid submissions are\nranked by an effective QPS that includes query time plus a small load/index-build\npenalty.\n\nThe Harbor agent container starts with a small Rust skeleton project in\n`/app`. You may use it, modify it, or replace it entirely. You may also use any\nRust crates, internal harness, data structures, and build layout you want, as\nlong as the final project satisfies the judge contract below.\n\nThe judge builds and runs your service with:\n\n```bash\ncargo build --release\nPORT=<port> cargo run --release --quiet\n```\n\nThe Harbor environment uses the Ubuntu `apt` Rust toolchain:\n\n```text\nrustc 1.75\ncargo 1.75\n```\n\nIf you add crates, choose versions compatible with this toolchain or pin\ntransitive dependencies accordingly.\n\nThe service and judge run with the task resource limits below. Design your\nparallel search and indexing strategy for this budget:\n\n```text\nvCPUs: 8\nmemory: 16 GiB\nquery concurrency: 8\ntimed queries per worker: 64\n```\n\nThe service must listen on `PORT` and implement these endpoints:\n\n```text\nPOST /insert\nPOST /bulk_insert\nPOST /search\n```\n\n`/bulk_insert` receives:\n\n```json\n{\"vectors\":[{\"id\":0,\"vector\":[0.1,0.2,...]}]}\n```\n\nand returns:\n\n```json\n{\"status\":\"ok\",\"inserted\":1}\n```\n\n`/search` receives:\n\n```json\n{\"vector\":[0.1,0.2,...],\"top_k\":10}\n```\n\nand returns:\n\n```json\n{\"results\":[{\"id\":0,\"distance\":0.0}]}\n```\n\n## Local Harness\n\nThe official evaluator uses hidden data and a black-box judge. You may call:\n\n```bash\nbash /app/submit.sh\n```\n\nat any time to submit the current `/app` project to the official judge and get\nscore feedback.\n\n## Validity\n\nA submission is valid if:\n\n1. It builds successfully with `cargo build --release`.\n2. `cargo run --release --quiet` starts the service and implements the required HTTP\n endpoints.\n3. Every returned id is in `[0, 1_000_000)`.\n4. Its `recall@10` is at least `0.95` against the hidden exact top-10 ground\n truth.\n\n## Scoring\n\nAt trial startup, the Harbor judge sidecar prepares the hidden benchmark and\nruns an exact-search reference HTTP service through the same `/bulk_insert`\nand `/search` client harnesses to produce ground-truth nearest neighbors and\nthe trial-local scoring baseline:\n\n```text\nbaseline_qps\nbaseline_effective_qps\nbaseline_load_seconds\n```\n\nInteractive submissions and the final verifier both score through this same\njudge sidecar, so the baseline and runtime environment are shared within a\ntrial while still letting different machines measure their own local baseline.\n\nEach submission is then timed independently. The load phase includes all\n`/bulk_insert` calls and any index construction performed by the service before\nqueries begin. The query phase uses 8 concurrent workers, each issuing 64\nqueries, and measures only `/search` throughput:\n\n```text\ncandidate_qps\ncandidate_load_seconds\n```\n\nThe reported `qps` is the raw query-only QPS. Scoring uses an effective QPS\nthat includes a small index-build/load penalty:\n\n```text\neffective_qps = Q / (query_seconds + 0.01 * load_seconds)\n```\n\nThe load phase has a default `900s` timeout. This keeps the benchmark focused\non serving performance while still making very expensive offline indexing pay a\nbounded, explicit cost.\n\nDuring evaluation, the load and query phases may stop early and return `0` once\nthe elapsed time plus the load penalty makes it impossible for the final\neffective QPS to beat the baseline. During load, this assumes a best-case query\ntime of zero.\n\nIf the submission is invalid, if `recall@10 < 0.95`, or if\n`candidate_effective_qps <= baseline_effective_qps`, the score is `0`.\nOtherwise:\n\n```text\nscore = 100 * (1 - sqrt(baseline_effective_qps) / sqrt(candidate_effective_qps))\n```\n\nThe bounded and unbounded score fields both report this score. Harbor JSON\nresults include the measured `qps`, `effective_qps`, `baseline_qps`,\n`baseline_effective_qps`, `recall_at_10`, load time, and runtime metrics under\nthe `metrics` field.\n", "config": "tag: systems\nruntime:\n language: rust\n timeout_seconds: 10800\n environment: \"Rust project; hidden ANN benchmark; Python/NumPy judge\"\n apt_packages:\n - build-essential\n - cargo\n - git\n - rustc\n judge_apt_packages:\n - build-essential\n - cargo\n - rustc\n - python3-pip\n - python3-numpy\n judge_pip_packages:\n - faiss-cpu\n docker:\n image: ubuntu:24.04\nenvironment:\n # If these resource limits change, also update the resource budget text in\n # readme and harbor/app/README.md so agents can design parallel algorithms\n # for the actual CPU and memory budget.\n cpus: 8\n memory_mb: 16384\n storage_mb: 8192\n build_timeout_seconds: 3600\nevaluation:\n # The judge drives the search service with this many concurrent workers.\n # Keep this aligned with the CPU budget unless the task is intentionally\n # changed into a higher-concurrency service benchmark.\n query_concurrency: 8\n queries_per_worker: 64\nsubmission:\n kind: directory\n path: /app\n exclude:\n - target\n - .git\n - .frontier-cs\n"}
|
| 264 |
{"problem_id": "vector_db_ann_relaxed", "category": "2.0", "statement": "# Vector DB ANN Relaxed\n\n## Problem\n\nBuild a fast approximate nearest-neighbor vector search engine for a\nSIFT1M-scale benchmark. This relaxed variant uses the same data, API, resource\nbudget, and recall target as Vector DB ANN, but penalizes load/index-build time\n10x less heavily.\n\nThe hidden benchmark contains exactly `1,000,000` base vectors with dimension\n`128`. Queries use the same dimension, distance is squared Euclidean distance,\nand each query asks for the top `10` nearest vector ids.\n\nYour objective is to maximize serving throughput while preserving search\nquality: submissions must reach `recall@10 >= 0.95`, and valid submissions are\nranked by an effective QPS that includes query time plus a small\nload/index-build penalty.\n\nThe Harbor agent container starts with a small Rust skeleton project in\n`/app`. You may use it, modify it, or replace it entirely. You may also use any\nRust crates, internal harness, data structures, and build layout you want, as\nlong as the final project satisfies the judge contract below.\n\nThe judge builds and runs your service with:\n\n```bash\ncargo build --release\nPORT=<port> cargo run --release --quiet\n```\n\nThe Harbor environment uses the Ubuntu `apt` Rust toolchain:\n\n```text\nrustc 1.75\ncargo 1.75\n```\n\nIf you add crates, choose versions compatible with this toolchain or pin\ntransitive dependencies accordingly.\n\nThe service and judge run with the task resource limits below. Design your\nparallel search and indexing strategy for this budget:\n\n```text\nvCPUs: 8\nmemory: 16 GiB\nquery concurrency: 8\ntimed queries per worker: 64\n```\n\nThe service must listen on `PORT` and implement these endpoints:\n\n```text\nPOST /insert\nPOST /bulk_insert\nPOST /search\n```\n\n`/bulk_insert` receives:\n\n```json\n{\"vectors\":[{\"id\":0,\"vector\":[0.1,0.2,...]}]}\n```\n\nand returns:\n\n```json\n{\"status\":\"ok\",\"inserted\":1}\n```\n\n`/search` receives:\n\n```json\n{\"vector\":[0.1,0.2,...],\"top_k\":10}\n```\n\nand returns:\n\n```json\n{\"results\":[{\"id\":0,\"distance\":0.0}]}\n```\n\n## Local Harness\n\nThe official evaluator uses hidden data and a black-box judge. You may call:\n\n```bash\nbash /app/submit.sh\n```\n\nat any time to submit the current `/app` project to the official judge and get\nscore feedback.\n\n## Validity\n\nA submission is valid if:\n\n1. It builds successfully with `cargo build --release`.\n2. `cargo run --release --quiet` starts the service and implements the required HTTP\n endpoints.\n3. Every returned id is in `[0, 1_000_000)`.\n4. Its `recall@10` is at least `0.95` against the hidden exact top-10 ground\n truth.\n\n## Scoring\n\nAt trial startup, the Harbor judge sidecar prepares the hidden benchmark and\nruns an exact-search reference HTTP service through the same `/bulk_insert`\nand `/search` client harnesses to produce ground-truth nearest neighbors and\nthe trial-local scoring baseline:\n\n```text\nbaseline_qps\nbaseline_effective_qps\nbaseline_load_seconds\n```\n\nInteractive submissions and the final verifier both score through this same\njudge sidecar, so the baseline and runtime environment are shared within a\ntrial while still letting different machines measure their own local baseline.\n\nEach submission is then timed independently. The load phase includes all\n`/bulk_insert` calls and any index construction performed by the service before\nqueries begin. The query phase uses 8 concurrent workers, each issuing 64\nqueries, and measures only `/search` throughput:\n\n```text\ncandidate_qps\ncandidate_load_seconds\n```\n\nThe reported `qps` is the raw query-only QPS. Scoring uses an effective QPS\nthat includes a small index-build/load penalty:\n\n```text\neffective_qps = Q / (query_seconds + 0.001 * load_seconds)\n```\n\nThe load phase has a default `900s` timeout. This keeps the benchmark focused\non serving performance while still making very expensive offline indexing pay a\nbounded, explicit cost. This relaxed variant makes the load/index-build penalty\nsmall enough that spending additional time on a stronger index can be worthwhile\nwhen it materially improves query throughput or recall.\n\nDuring evaluation, the load and query phases may stop early and return `0` once\nthe elapsed time plus the load penalty makes it impossible for the final\neffective QPS to beat the baseline. During load, this assumes a best-case query\ntime of zero.\n\nIf the submission is invalid, if `recall@10 < 0.95`, or if\n`candidate_effective_qps <= baseline_effective_qps`, the score is `0`.\nOtherwise:\n\n```text\nscore = 100 * (1 - sqrt(baseline_effective_qps) / sqrt(candidate_effective_qps))\n```\n\nThe bounded and unbounded score fields both report this score. Harbor JSON\nresults include the measured `qps`, `effective_qps`, `baseline_qps`,\n`baseline_effective_qps`, `recall_at_10`, load time, and runtime metrics under\nthe `metrics` field.\n", "config": "tag: systems\nruntime:\n language: rust\n timeout_seconds: 10800\n environment: \"Rust project; hidden ANN benchmark; Python/NumPy judge\"\n apt_packages:\n - build-essential\n - cargo\n - git\n - rustc\n judge_apt_packages:\n - build-essential\n - cargo\n - rustc\n - python3-pip\n - python3-numpy\n judge_pip_packages:\n - faiss-cpu\n docker:\n image: ubuntu:24.04\nenvironment:\n # If these resource limits change, also update the resource budget text in\n # readme and harbor/app/README.md so agents can design parallel algorithms\n # for the actual CPU and memory budget.\n cpus: 8\n memory_mb: 16384\n storage_mb: 8192\n build_timeout_seconds: 3600\nevaluation:\n # The judge drives the search service with this many concurrent workers.\n # Keep this aligned with the CPU budget unless the task is intentionally\n # changed into a higher-concurrency service benchmark.\n query_concurrency: 8\n queries_per_worker: 64\n # Weight applied to load/index-build time when computing effective QPS.\n # This relaxed variant rewards stronger indexes by penalizing build time\n # 10x less than the standard Vector DB ANN task.\n load_penalty_weight: 0.001\nsubmission:\n kind: directory\n path: /app\n exclude:\n - target\n - .git\n - .frontier-cs\n"}
|