Datasets:
exact_match bool 2
classes | id stringlengths 46 46 | kind stringclasses 2
values | max_steps int64 2 5 | messages listlengths 6 41 | provider stringclasses 1
value | reward float64 0.83 1 | source stringclasses 1
value | target_smiles stringlengths 9 120 | task_id stringlengths 26 26 | tool_calls int64 3 29 | tools stringclasses 1
value | toolset stringclasses 1
value | turns int64 2 12 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
true | retro_000051229c9657679df3:reference-expert:a1 | single_route | 2 | [
{
"content": "You are a retrosynthesis planning agent. Use tools, validate cuts, confirm every stock leaf by exact lookup, and finish only with emit_routes. You have at most 16 model turns and must reserve the final turn for emit_routes even if the routes are incomplete. Pass emit_routes.submission as a JSON ob... | reference | 1 | reference-expert | CCOC(=O)c1cc2c(s1)CCN(C(=O)OCC)C2 | retro_000051229c9657679df3 | 9 | [{"function": {"description": "Inspect a molecule with RDKit.", "name": "inspect_molecule", "parameters": {"additionalProperties": false, "properties": {"smiles": {"description": "A SMILES string.", "type": "string"}}, "required": ["smiles"], "type": "object"}}, "type": "function"}, {"function": {"description": "Canoni... | full | 4 |
true | retro_0002b7c48de1e8e87ec2:reference-expert:a0 | single_route | 3 | [
{
"content": "You are a retrosynthesis planning agent. Use tools, validate cuts, confirm every stock leaf by exact lookup, and finish only with emit_routes. You have at most 16 model turns and must reserve the final turn for emit_routes even if the routes are incomplete. Pass emit_routes.submission as a JSON ob... | reference | 1 | reference-expert | CCOC(=O)c1cc(C#N)c(N2CCC(C(=O)NS(=O)(=O)Cc3ccc(Cl)cc3)CC2)nc1C(F)F | retro_0002b7c48de1e8e87ec2 | 10 | [{"function": {"description": "Inspect a molecule with RDKit.", "name": "inspect_molecule", "parameters": {"additionalProperties": false, "properties": {"smiles": {"description": "A SMILES string.", "type": "string"}}, "required": ["smiles"], "type": "object"}}, "type": "function"}, {"function": {"description": "Canoni... | full | 4 |
true | retro_0003b4385de5f73ebcda:reference-expert:a0 | single_route | 4 | [
{
"content": "You are a retrosynthesis planning agent. Use tools, validate cuts, confirm every stock leaf by exact lookup, and finish only with emit_routes. You have at most 16 model turns and must reserve the final turn for emit_routes even if the routes are incomplete. Pass emit_routes.submission as a JSON ob... | reference | 1 | reference-expert | Cc1sc(S(=O)(=O)N[C@@H](C)C(F)(F)F)cc1C(=O)Nc1ccc(F)c(C#N)c1 | retro_0003b4385de5f73ebcda | 14 | [{"function": {"description": "Inspect a molecule with RDKit.", "name": "inspect_molecule", "parameters": {"additionalProperties": false, "properties": {"smiles": {"description": "A SMILES string.", "type": "string"}}, "required": ["smiles"], "type": "object"}}, "type": "function"}, {"function": {"description": "Canoni... | full | 6 |
true | retro_0003b4385de5f73ebcda:reference-expert:a1 | single_route | 4 | [
{
"content": "You are a retrosynthesis planning agent. Use tools, validate cuts, confirm every stock leaf by exact lookup, and finish only with emit_routes. You have at most 16 model turns and must reserve the final turn for emit_routes even if the routes are incomplete. Pass emit_routes.submission as a JSON ob... | reference | 1 | reference-expert | Cc1sc(S(=O)(=O)N[C@@H](C)C(F)(F)F)cc1C(=O)Nc1ccc(F)c(C#N)c1 | retro_0003b4385de5f73ebcda | 17 | [{"function": {"description": "Inspect a molecule with RDKit.", "name": "inspect_molecule", "parameters": {"additionalProperties": false, "properties": {"smiles": {"description": "A SMILES string.", "type": "string"}}, "required": ["smiles"], "type": "object"}}, "type": "function"}, {"function": {"description": "Canoni... | full | 7 |
true | retro_00069cedfc5691d5ec1b:reference-expert:a0 | single_route | 5 | [
{
"content": "You are a retrosynthesis planning agent. Use tools, validate cuts, confirm every stock leaf by exact lookup, and finish only with emit_routes. You have at most 16 model turns and must reserve the final turn for emit_routes even if the routes are incomplete. Pass emit_routes.submission as a JSON ob... | reference | 1 | reference-expert | COc1ccc(C(=O)Cl)cc1C#N | retro_00069cedfc5691d5ec1b | 16 | [{"function": {"description": "Inspect a molecule with RDKit.", "name": "inspect_molecule", "parameters": {"additionalProperties": false, "properties": {"smiles": {"description": "A SMILES string.", "type": "string"}}, "required": ["smiles"], "type": "object"}}, "type": "function"}, {"function": {"description": "Canoni... | full | 7 |
true | retro_00069cedfc5691d5ec1b:reference-expert:a1 | single_route | 5 | [
{
"content": "You are a retrosynthesis planning agent. Use tools, validate cuts, confirm every stock leaf by exact lookup, and finish only with emit_routes. You have at most 16 model turns and must reserve the final turn for emit_routes even if the routes are incomplete. Pass emit_routes.submission as a JSON ob... | reference | 1 | reference-expert | COc1ccc(C(=O)Cl)cc1C#N | retro_00069cedfc5691d5ec1b | 19 | [{"function": {"description": "Inspect a molecule with RDKit.", "name": "inspect_molecule", "parameters": {"additionalProperties": false, "properties": {"smiles": {"description": "A SMILES string.", "type": "string"}}, "required": ["smiles"], "type": "object"}}, "type": "function"}, {"function": {"description": "Canoni... | full | 8 |
true | retro_00119d8aa850f59d3a4e:reference-expert:a0 | single_route | 3 | [
{
"content": "You are a retrosynthesis planning agent. Use tools, validate cuts, confirm every stock leaf by exact lookup, and finish only with emit_routes. You have at most 16 model turns and must reserve the final turn for emit_routes even if the routes are incomplete. Pass emit_routes.submission as a JSON ob... | reference | 1 | reference-expert | O=C(NS(=O)(=O)N1CC[C@H](O)C1)c1cc(Cl)c(OCC23CC4CC(CC(C4)C2)C3)cc1F | retro_00119d8aa850f59d3a4e | 12 | [{"function": {"description": "Inspect a molecule with RDKit.", "name": "inspect_molecule", "parameters": {"additionalProperties": false, "properties": {"smiles": {"description": "A SMILES string.", "type": "string"}}, "required": ["smiles"], "type": "object"}}, "type": "function"}, {"function": {"description": "Canoni... | full | 5 |
true | retro_0013f7716da99099d949:reference-expert:a0 | single_route | 3 | [
{
"content": "You are a retrosynthesis planning agent. Use tools, validate cuts, confirm every stock leaf by exact lookup, and finish only with emit_routes. You have at most 16 model turns and must reserve the final turn for emit_routes even if the routes are incomplete. Pass emit_routes.submission as a JSON ob... | reference | 1 | reference-expert | COCCN1CCN(c2ccc(Nc3nc(Br)cn4ccnc34)cc2)CC1 | retro_0013f7716da99099d949 | 9 | [{"function": {"description": "Inspect a molecule with RDKit.", "name": "inspect_molecule", "parameters": {"additionalProperties": false, "properties": {"smiles": {"description": "A SMILES string.", "type": "string"}}, "required": ["smiles"], "type": "object"}}, "type": "function"}, {"function": {"description": "Canoni... | full | 4 |
true | retro_00158781f153f90b03b4:reference-expert:a0 | single_route | 3 | [
{
"content": "You are a retrosynthesis planning agent. Use tools, validate cuts, confirm every stock leaf by exact lookup, and finish only with emit_routes. You have at most 16 model turns and must reserve the final turn for emit_routes even if the routes are incomplete. Pass emit_routes.submission as a JSON ob... | reference | 1 | reference-expert | Cc1ccc(C(=O)OC2CCN(Cc3ccccc3N)CC2)cc1 | retro_00158781f153f90b03b4 | 10 | [{"function": {"description": "Inspect a molecule with RDKit.", "name": "inspect_molecule", "parameters": {"additionalProperties": false, "properties": {"smiles": {"description": "A SMILES string.", "type": "string"}}, "required": ["smiles"], "type": "object"}}, "type": "function"}, {"function": {"description": "Canoni... | full | 5 |
true | retro_001824218294e92add5a:reference-expert:a0 | single_route | 5 | [{"content":"You are a retrosynthesis planning agent. Use tools, validate cuts, confirm every stock (...TRUNCATED) | reference | 1 | reference-expert | Cc1ccc(-n2ccc(NC(=O)c3cc(N4CCCCC4)ccc3N)n2)cc1C | retro_001824218294e92add5a | 23 | "[{\"function\": {\"description\": \"Inspect a molecule with RDKit.\", \"name\": \"inspect_molecule\(...TRUNCATED) | full | 10 |
RetroEnv SFT trajectories
Multi-turn tool-calling episodes for RetroEnv,
a retrosynthesis environment. Each row plans a route for one v3 train task of
AdithyaSK/RetroEnv-RL back to
purchasable molecules and ends with emit_routes. Every row is an episode that the
environment's verifier passed, through the same OpenEnv server and agent loop used for
evaluation.
chemist (default) |
plain (baseline) |
|
|---|---|---|
| Rows (train / validation) | 31,897 / 323 | 27,222 / 267 |
| Train tasks covered | 27,489 | 27,489 |
| Rows with 4- or 5-step routes | 31% | 19% |
| Exact match to the patent route | 96.8% | 96.8% |
| Rows that recover from a rejected cut | 46% | 0% |
| Tools used | 5 | 3 |
| Mean tool calls per row | 11.8 | 8.6 |
| Distinct assistant texts | 112,902 | 31,736 |
| Tokens per row, p50 / p95 (Qwen3.5) | 5,473 / 7,778 | 4,142 / 5,858 |
Use chemist. plain is the first version, kept for comparison: an expert that is always
right, writes four fixed sentences, and never recovers from a mistake.
How chemist rows were made
A scripted chemist that knows each task's patent route plays the episode through the real server:
- Most episodes start by inspecting the target and searching the training precedents for close analogues.
- It proposes disconnections from a library of strategic bonds: amide, sulfonamide, ester,
ether, biaryl, and C–N by alkylation, reductive amination or aryl substitution. In 46% of
episodes at least one proposal is a plausible cut the patent did not make.
validate_disconnectionrejects it, and the chemist moves on. - Each cut is validated and every new piece is looked up in the stock. A piece the stock lacks gets its own disconnection; one it holds stays a leaf, even where the patent made it, so some routes are shorter than the reference.
- The submitted tree names each reaction, its reagent roles and its evidence.
Its text states only what tool results returned or what the structures show: reaction families, reagent roles, strategic bonds. It cites a precedent only when its reaction type matches, and never writes the task's own patent number, reaction IDs or reagents. Choices are seeded per episode. 4- and 5-step tasks keep up to two different trajectories each, to move the mix toward the eval split. 1% of tasks are held out as validation.
No row comes from a dev, eval or stress task. The export refuses them, and re-audits the train tasks used against the held-out splits under the benchmark's own leakage rules.
Row layout
messages is an OpenAI-style chat: a system prompt, the task prompt, then assistant tool calls
and tool results, ending with the assistant's emit_routes call. Tool results are verbatim
server output, including model_turns_remaining. tools holds the nine function schemas.
Other columns: id, task_id, target_smiles, max_steps, kind, reward, exact_match,
tool_calls, turns, toolset, source, provider.
Tool-call arguments and tools are JSON strings, so that Arrow does not merge different
tools' arguments into one struct with null-filled gaps. Decode them before
apply_chat_template:
import json
from datasets import load_dataset
rows = load_dataset("AdithyaSK/RetroEnv-SFT", "chemist", split="train")
def decode(row):
messages = []
for m in row["messages"]:
m = {k: v for k, v in m.items() if v is not None}
for call in m.get("tool_calls") or []:
call["function"]["arguments"] = json.loads(call["function"]["arguments"])
messages.append(m)
return messages, json.loads(row["tools"])
train/sft_smoke.py in the RetroEnv code trains on this with TRL, with loss on assistant
turns only.
Limitations
- The rejected cuts come from eight bond rules, so the mistakes are textbook alternatives rather than the varied errors a model makes.
- The text comes from short templates with variants: factual, not free-form reasoning.
validate_disconnectionanswers from the task's hidden reference. These rows use thefulltoolset, so they teach a policy to lean on it.
License and attribution
CC-BY-4.0. Routes derive from PaRoutes v2 (Genheden & Bjerrum, Digital Discovery 2022; Zenodo 7341155, CC-BY-4.0), which extracts reactions from USPTO patents.
- Downloads last month
- 45