neulab / neulab/agent-data-protocol
Audit: fix SFT roles and action/source representation issues
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 193
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
Dataset quality audit category: Conversation/action representation issues
The May 2026 dataset audit found 53 issues in this class:
sft_format_or_role: 17role_or_source_mapping: 15action_representation: 15sft_placeholder: 6
Problem
Several datasets flatten structured behavior into plain text, map environment observations to the wrong source, or assign SFT roles inconsistently. These issues are especially risky because downstream SFT consumers may train on incorrect assistant/tool boundaries.
Examples
agenttuning_alfworld: rootsample_sft.jsonmarks plain acknowledgements such asOK. I'll follow...asfrom: "function_call"even though they contain no function-call syntax.agenttuning_db: root SFT sample marks all assistant messages asfunction_callmessages without function-call syntax.agenttuning_mind2web: root SFT sample usesfunction_callfor final-choice text without an actual function call.agenttuning_alfworld: all 94 standardized text observations are markedsource: "user", including environment responses immediately after API actions such asYou pick up...andOn the shelf....agenttuning_db: SQL operations are not represented asCodeActionorApiAction; SQL is embedded in assistant text or omitted entirely.androidcontrol: rootsample_sft.jsonis a placeholder conversation and is not derived from the standardized mobile trajectories.
Suggested work
- Ensure SFT messages containing actual function-call syntax use
from: "function_call", and plain assistant text does not. - Fix converters rather than hand-editing generated sample JSON.
- Audit
TextObservation.sourcemapping for user/environment/agent boundaries, especially after tool/API calls. - Represent executable commands, SQL, browser actions, and API calls with
CodeActionorApiActionwhere the raw data supports it. - Replace placeholder root
sample_sft.jsonfiles with pipeline-derived SFT samples. - Add tests that detect function-call roles without function-call syntax, and function-call syntax outside
from: "function_call".
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 locating the converters that produce the root sample_sft.json files and the standardized TextObservation, CodeAction, and ApiAction records. Compare the agenttuning_alfworld, agenttuning_db, agenttuning_mind2web, and androidcontrol examples with their raw trajectories, then run or add tests for role syntax, source mapping, executable actions, and placeholder samples. Done means generated samples preserve assistant/tool boundaries and represent supported actions structurally.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data, testing-qa
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100