neulab / neulab/agent-data-protocol
Schema: promote and standardize common trajectory details fields
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 193
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
Follow-up from the May 2026 dataset audit and PR #225.
Problem
Many datasets store semantically important metadata under the free-form Trajectory.details dictionary. That is useful for dataset-specific fields, but several recurring concepts now appear often enough that leaving them untyped causes inconsistency, stringified values, duplicated naming conventions, and downstream consumers missing important information.
A recent inventory of committed sample_std.json files found 78 distinct details keys. Many are dataset-local, but several represent common ADP concepts that should probably be promoted to first-class schema elements or standardized nested objects.
Examples
Provenance fields
Current details keys include variants such as:
sourcedataset_sourcesource_datasetdatasetdata_sourcesource_configsource_splitsplitsource_idsource_indexsource_qidsource_filetranscript_pathcreated_at
These all describe where a trajectory came from, but they use inconsistent names and types across datasets.
System prompt
Several datasets store system_prompt in details, even though system instructions affect trajectory interpretation and SFT conversion. This makes system prompts easy to miss or handle inconsistently.
Outcome and evaluation fields
Current details keys include:
resolvedexit_statusstatusrewardsession_successfeedbackpolaritytest_resultgen_tests_correctpred_passes_gen_tests
ADP already has per-action reward, but there is no typed trajectory-level result/outcome object for task success, status, score, or evaluation logs.
Tool/API specifications
Some datasets store raw tool definitions as JSON strings under details.tools, while the top-level available_apis field only stores function names. This loses structured per-instance API descriptions, signatures, and tool metadata.
Task and artifact metadata
Fields such as task_description, question, answer, website, domain, subdomain, task, title, keywords, problem_statement, generated_patch, model_patch, rollout_patch, target_patch, eval_logs, verification_files, solution_path, and task_toml suggest there may also be value in typed task and artifacts structures, especially for SWE/web/evaluation datasets.
Suggested work
- Define a typed provenance structure, for example:
sourceconfigsplitupstream_idsource_filerow_indexcreated_atpathorurl
- Decide whether
system_promptshould be a top-levelTrajectory.system_promptfield or a dedicated standardized content event. - Define a typed trajectory outcome/evaluation structure, separate from per-action reward.
- Decide whether
available_apisshould be extended or complemented with structured per-instance API specs. - Consider optional typed
taskandartifactsstructures for fields that are common in web, notebook, and SWE datasets. - Keep truly dataset-specific metadata in
details, but document the boundary between standardized fields and free-form details. - Add migration tests or lints so newly standardized fields are not reintroduced under
detailswith alternate names.
Acceptance criteria
- Common provenance and outcome fields have a documented schema-level home.
- Existing datasets are migrated incrementally or have clear follow-up issues.
detailsremains available for dataset-specific metadata, but no longer carries the common fields that ADP consumers should reliably understand.- Schema docs include examples showing when to use first-class fields versus
details.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing PR #225 and the committed sample_std.json files referenced by the audit, then inspect how Trajectory.details and available_apis are defined. Compare the recurring fields against the suggested provenance, outcome, task, and artifacts structures. Done means the schema boundary is decided, common fields have documented homes, migration or follow-up guidance is clear, and docs include first-class-versus-details examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100