|
Download docs/for-agents.md from Battam/training-data-foundation: direct link, hf CLI and curl.
- Browser
- Download file 12.5 kB
-
https://huggingface.co/datasets/Battam/training-data-foundation/resolve/refs%2Fpr%2F2/docs/for-agents.md
- Command line
-
hf download hf://datasets/Battam/training-data-foundation@refs/pr/2/docs/for-agents.md
-
curl -L -o for-agents.md https://huggingface.co/datasets/Battam/training-data-foundation/resolve/refs%2Fpr%2F2/docs/for-agents.md
12.5 kB
| [Back to README.md](../README.md) | |
| <!-- Generated by artpool.index_projection from catalog/portal/llms.txt of the pipeline repository and this release's coverage. Every release regenerates it, so edits to this file do not last. --> | |
| # For agents | |
| English | [简体中文](for-agents.zh.md) | |
| - The index holds two layers over the same public web, kept apart and never added together. A material set is a batch of files picked from one source (a site, a repository or a dataset), for building tasks; material sets are grouped into collections by task family; corpora are whole upstreams read in bulk; a group of corpus rows becomes a material set only by passing admission. Task material comes first: material sets, grouped into collections, one per task family. A material set (task-ready) is a batch of files picked from one source (a site, a repository or a dataset), for building tasks: its files are grouped into units (the catalog column `kind` is `material_set`, and `collection` names its collection). A unit is a group of files that its upstream publishes as one thing, delivered whole; its key `unit_id` is defined once, in docs/sources.md of the index. A unit is material, not a task: one unit may give several tasks, and one task may use several units. Corpora come second, to search when no material set fits: a corpus (raw; plural corpora) is one whole upstream that a collector keeps reading, such as Common Crawl's office documents, PyPI's release files, Mendeley Data or NVD: its rows are pointers to files or API responses, and it is mined one unit per row (`kind` is `corpus`). | |
| - Pick material sets or corpora from `meta/catalog.parquet` (one row per material set or corpus, about 50 KB; do not download `meta/` whole). Columns: `source`; `kind`, `material_set` or `corpus` (select one layer: units and rows are never added together); `collection`, the code of a material set's collection (A, B, C, G, GT, HW, M, MD, ML, OP, S, SC, SW), or of the collection that lists a corpus as holding its kind of material (`corpora` in `meta/vocabulary.json`; empty for any other corpus); `domain`, a list of codes D1 to D10 or leaves such as D3.5, or `multi`, `unclassified`; `form`, such as `test-suites` or `spreadsheets`; `units` (the distinct `unit_id` values: a test case, one workbook, one package; a corpus has one unit per row) and `files` (its rows: the files of its units and the README.md and LICENSE of a collection source); `publishers` (a material set's distinct publisher names over all its rows; empty when its rows name none); `language` (the language codes of the rows' labels, what the default profile filters on; `not recorded` when a row has none); `contamination.level` (by the rule of the default profile of `tools/fetch.py` over `meta/bench_overlap.parquet` and `meta/bench_checked.parquet`: `none` when every data file is compared and kept and no row is removed, the hit class with the most removed rows when some are removed, `not scanned` otherwise); `license.ship`; `pii.level`; `distinct_bytes` (deduplicated size) and `bytes` (recorded size, the sum over rows); `size_check` (the rows read in `meta/sizes.parquet`, `compared` those that compared a size or hash, and how many have each status, `match` when the measured size agrees; the check's share is `match` over `compared`), `unsized_rows` (rows without a recorded size) and `unsized_estimate` (their estimated size, with its 95% range); `fetch` (whether the upstream still serves the files: `rows`, the sampled rows read in `meta/sizes.parquet`; `fetched`, those that fetched and matched their recorded size and hash; `read_at`, the day read; `level`, `all`, `some`, `none` or `not read`); the same figures for the whole index, each layer and each collection are in `meta/size_figures.json`. Who published each file of a material set, and under which license and license URL, is in `meta/attribution.parquet` (one row per source, publisher, license and license URL, with its number of files). The vocabulary is `meta/vocabulary.json`: every domain code with its name (and `zh`, its Chinese name), what it covers and its parent, every form with its Chinese name and what it means, every category of `meta/not_included.parquet` with its requirement in English and in Chinese, the two layers with their relation, and every collection with its name, what it holds, its campaigns (take a collection with `--tag campaign:<name>` for each of its campaigns) and the corpora it lists, if any (take one with `--source`). | |
| - Size of this release: Whole index: Recorded size 4.50 PB; deduplicated size 4.09 PB; size check: 99.7% match (43,648 of the 44,629 rows read compared); not compared: address unreachable 466, file gone 119, login needed 331, no size from the server 61, other error 4; estimated size of 279,909,103 of the 311,970,416 rows without a recorded size: 583 TB (an estimate; 95% range 497 TB to 701 TB, the sum of its sources' ranges, wider than a joint interval; from 15,964 rows read), the other 32,061,313 with too few rows read for an estimate. Task material: Recorded size 2.90 GB; deduplicated size 2.82 GB; size check: 99.7% match (8,122 of the 8,144 rows read compared); not compared: address unreachable 10, file gone 2, login needed 8, other error 2. Corpora: Recorded size 4.50 PB; deduplicated size 4.09 PB; size check: 99.7% match (35,526 of the 36,485 rows read compared); not compared: address unreachable 456, file gone 117, login needed 323, no size from the server 61, other error 2; estimated size of 279,909,103 of the 311,970,416 rows without a recorded size: 583 TB (an estimate; 95% range 497 TB to 701 TB, the sum of its sources' ranges, wider than a joint interval; from 15,964 rows read), the other 32,061,313 with too few rows read for an estimate. Distinct content is the sum of `size_bytes` over the rows minus the sizes of the rows that repeat another row's content (the same sha256, else sha1, else md5 and size, within the same hash scope; one copy of each content is kept, in the first source by registry order), counted at every release, per source in the catalog column `distinct_bytes`; archive members whose archive the same source also lists whole have other hashes, so they are not subtracted. `tools/fetch.py` removes duplicates over your own selection when it reads it. The recorded size is the sum of `size_bytes` over the rows that have one (catalog column `bytes`). The check reads a sample of rows of every data file (`meta/sizes.parquet`): 20 of its rows with a recorded size, and of its rows without one its share of its source's sample, sized for their mean size within 25% at 95% confidence by the spread of the sizes read so far (at most 400 rows per source per round, 20 for a source with none read yet); its share is the rows that match their recorded size out of the rows it compared (status `match`, `size_mismatch` or `hash_mismatch`), and the rows it could not compare, which never reached their file, are counted beside it by status (`unreachable`, `gone`, `needs_auth`, `no_length`, `error`; catalog column `size_check`). The estimate for a source's rows without a recorded size (catalog columns `unsized_rows` and `unsized_estimate`) is their number times the mean measured size of such rows read, with a 95% BCa bootstrap range (`scipy.stats.bootstrap`, its default resample count); a source with fewer than 10 such rows read has none. Above one source, the estimate is the sum of its sources' estimates and its range the sum of their ranges, which is wider than a joint interval. The figures of every level are in `meta/size_figures.json`. | |
| - Fetch with one command: `uv run https://huggingface.co/datasets/Battam/agentic-env-index/resolve/main/tools/fetch.py --domain D3 --form spreadsheets --sample 3 --out ./data`. Without uv: `pip install duckdb`, download `tools/fetch.py` and run it with `python`. Select with `--source`, `--kind` (`material_set` or `corpus`: one layer), `--domain`, `--form`, `--tag`, `--ext`, or `--selection <file>` (a selection file the data page saves: the ids of its sources and its commit); `--sample N` takes N units per source, `--limit N` takes N units over the whole selection, `--unit <unit_id>` takes the unit of that `unit_id` whole (with `--source`); before its first download the run prints the units, files and total size it selected. | |
| - It pins the commit it reads and prints it; pass `--revision <commit>` to get the same files later. A name that does not exist stops with exit code 2 and the closest names. | |
| - The default profile removes duplicate copies, rows that matched a benchmark (copies of benchmark data, collections awaiting a ruling), rows not compared with the benchmark list yet (counted apart, with their own reason), files whose license does not allow shipping (license.ship yes and conditional stay), rows recorded in a language other than English, personal data (catalog pii.level present or suspected, rows marked sensitive), and files above 20 MB. Before downloading it prints how many units each criterion removed; each criterion has its own option (`--keep-duplicates`, `--allow-benchmark`, `--allow-not-compared`, `--any-license`, `--any-language`, `--allow-personal-data`, `--any-size`; `--allow-benchmark` also keeps rows not compared yet), and `--all` turns off every criterion except benchmark and not compared, so rows that matched a benchmark or were not compared yet come in only with their own options. Compared with the benchmark list (keys of 2026-11-08): 1,799 of 1,799 material sets; 138 of 138 corpora. The profile also removes every row whose data file was not compared (`--allow-benchmark` keeps them, unchecked). | |
| - Output: `./data/<domain>/<source>/<unit folder>/...` holds each unit whole, in a folder of its own named after its `unit_id`, its files at their paths within the unit; `./data/<domain>/<source>/` also holds the README.md and LICENSE of a collection source; `./data/_meta/manifest.jsonl` has one line per file (source, path, url, sha256, bytes, spdx, licence_url, publisher, retrieved, origin_kind, leaf, unit_id, verified); `./data/_meta/sizes.tsv` one line per source. Every file is checked against the sha256 the index records. A unit stored inside a container (such as a disk image inside a zip) is written as the unit itself: fetch.py takes the member out and checks it against the unit's recorded sha256, so no second tool is needed; only units marked expand (archives meant to be used as folders) are unpacked by `tools/to_pool.py`. | |
| - The index holds material only: what a task checks is decided when the task is built from the material. Keep out of the environment the agent works in whatever the task checks its result against: | |
| - Workbooks (such as the form `spreadsheets`): a published workbook holds the cached results of its formulas, so a workbook put in as fetched hands the agent the values a task may ask it to compute. Strip the cached values first: in .xlsx and .xlsm the `<v>` of every formula cell (`xl/worksheets/*.xml`), the chart caches (`c:numCache` and `c:strCache` in `xl/charts/*.xml`), the pivot caches (`xl/pivotCache/`, definitions and records) and the external link caches (`xl/externalLinks/`); in .ods the value attributes (`office:value` and the like) and the text of formula cells; in .xls the cached result of every FORMULA record and its STRING record. | |
| - Expected results inside a unit (such as test suites, detection rules with their tests, rules with worked examples, and reproductions and evaluation results with the numbers their authors published): the unit carries its own check (expected outputs, expected findings, the worked result, the reported numbers, and the files that hold the same numbers, such as result tables and logs). Keep those files or parts out of the environment and use them only to check the agent's result. | |
| - The form of a task built from these files (such as a Terminal-Bench style task with `environment/`, `solution/` and `tests/`): | |
| - `solution/solve.sh` is in bash, with the work spread over top-level commands (8 or more), each command that changes the environment on its own line; not wrapped in a function, `main`, a large heredoc or a single `python` call. | |
| - The task runs without network; its data is inside `environment/`. | |
| - Written files carry no timestamps, random values or host names; versions are pinned. | |
| - No background service that has to outlive a step, no database service. | |
| - Tests check the final state, not only that files exist. | |