The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: DatasetGenerationError
Exception: CastError
Message: Couldn't cast
id: string
tools: list<item: struct<type: string, function: struct<name: string, description: string, strict: bool, pa (... 1509 chars omitted)
child 0, item: struct<type: string, function: struct<name: string, description: string, strict: bool, parameters: s (... 1497 chars omitted)
child 0, type: string
child 1, function: struct<name: string, description: string, strict: bool, parameters: struct<type: string, properties: (... 1465 chars omitted)
child 0, name: string
child 1, description: string
child 2, strict: bool
child 3, parameters: struct<type: string, properties: struct<account_id: struct<type: string, description: string>, owner (... 1396 chars omitted)
child 0, type: string
child 1, properties: struct<account_id: struct<type: string, description: string>, owner_name: struct<type: string, descr (... 1304 chars omitted)
child 0, account_id: struct<type: string, description: string>
child 0, type: string
child 1, description: string
child 1, owner_name: struct<type: string, description: string>
child 0, type: string
child 1, description: string
child 2, account_type: struct<type: string, enum: list<item: string>, description: string>
child 0, type: string
child 1, enum: list<item: string>
...
child 2, tool_calls: list<item: struct<id: string, type: string, function: struct<name: string, arguments: string>>>
child 0, item: struct<id: string, type: string, function: struct<name: string, arguments: string>>
child 0, id: string
child 1, type: string
child 2, function: struct<name: string, arguments: string>
child 0, name: string
child 1, arguments: string
child 3, tool_call_id: string
child 4, name: string
metadata: struct<workflow_type: string, expected_terminal_state: string, num_tool_steps: int64, is_error_recov (... 219 chars omitted)
child 0, workflow_type: string
child 1, expected_terminal_state: string
child 2, num_tool_steps: int64
child 3, is_error_recovery_trajectory: bool
child 4, fundamental_equation_balanced: bool
child 5, initial_accounts: list<item: struct<account_id: string, owner_name: string, account_type: string, currency: string, ky (... 41 chars omitted)
child 0, item: struct<account_id: string, owner_name: string, account_type: string, currency: string, kyc_tier: str (... 29 chars omitted)
child 0, account_id: string
child 1, owner_name: string
child 2, account_type: string
child 3, currency: string
child 4, kyc_tier: string
child 5, initial_balance: double
segment_weights: list<item: double>
child 0, item: double
loss_mask: list<item: bool>
child 0, item: bool
to
{'id': Value('string'), 'messages': List({'role': Value('string'), 'content': Value('string')}), 'segment_weights': List(Value('float64')), 'loss_mask': List(Value('bool'))}
because column names don't match
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1835, in _prepare_split_single
for key, table in generator:
^^^^^^^^^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 621, in wrapped
for item in generator(*args, **kwargs):
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 361, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2381, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2309, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
id: string
tools: list<item: struct<type: string, function: struct<name: string, description: string, strict: bool, pa (... 1509 chars omitted)
child 0, item: struct<type: string, function: struct<name: string, description: string, strict: bool, parameters: s (... 1497 chars omitted)
child 0, type: string
child 1, function: struct<name: string, description: string, strict: bool, parameters: struct<type: string, properties: (... 1465 chars omitted)
child 0, name: string
child 1, description: string
child 2, strict: bool
child 3, parameters: struct<type: string, properties: struct<account_id: struct<type: string, description: string>, owner (... 1396 chars omitted)
child 0, type: string
child 1, properties: struct<account_id: struct<type: string, description: string>, owner_name: struct<type: string, descr (... 1304 chars omitted)
child 0, account_id: struct<type: string, description: string>
child 0, type: string
child 1, description: string
child 1, owner_name: struct<type: string, description: string>
child 0, type: string
child 1, description: string
child 2, account_type: struct<type: string, enum: list<item: string>, description: string>
child 0, type: string
child 1, enum: list<item: string>
...
child 2, tool_calls: list<item: struct<id: string, type: string, function: struct<name: string, arguments: string>>>
child 0, item: struct<id: string, type: string, function: struct<name: string, arguments: string>>
child 0, id: string
child 1, type: string
child 2, function: struct<name: string, arguments: string>
child 0, name: string
child 1, arguments: string
child 3, tool_call_id: string
child 4, name: string
metadata: struct<workflow_type: string, expected_terminal_state: string, num_tool_steps: int64, is_error_recov (... 219 chars omitted)
child 0, workflow_type: string
child 1, expected_terminal_state: string
child 2, num_tool_steps: int64
child 3, is_error_recovery_trajectory: bool
child 4, fundamental_equation_balanced: bool
child 5, initial_accounts: list<item: struct<account_id: string, owner_name: string, account_type: string, currency: string, ky (... 41 chars omitted)
child 0, item: struct<account_id: string, owner_name: string, account_type: string, currency: string, kyc_tier: str (... 29 chars omitted)
child 0, account_id: string
child 1, owner_name: string
child 2, account_type: string
child 3, currency: string
child 4, kyc_tier: string
child 5, initial_balance: double
segment_weights: list<item: double>
child 0, item: double
loss_mask: list<item: bool>
child 0, item: bool
to
{'id': Value('string'), 'messages': List({'role': Value('string'), 'content': Value('string')}), 'segment_weights': List(Value('float64')), 'loss_mask': List(Value('bool'))}
because column names don't match
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1379, in compute_config_parquet_and_info_response
parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
~~~~~~~~~~~~~~~~~~~~~~~~~^
builder, max_dataset_size_bytes=max_dataset_size_bytes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 956, in stream_convert_to_parquet
builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1702, in _prepare_split
for job_id, done, content in self._prepare_split_single(
~~~~~~~~~~~~~~~~~~~~~~~~~~^
gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
):
^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1887, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.exceptions.DatasetGenerationError: An error occurred while generating the datasetNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
id string | messages list | segment_weights list | loss_mask list |
|---|---|---|---|
TRAJ_CANONICAL_01 | [
{
"role": "user",
"content": "You are an autonomous Financial Systems Business Workflow Agent managing a Digital Wallet Financial Ledger API under strict double-entry accounting principles.\nCore Invariants:\n1. Every journal entry must contain at least two lines (DEBIT and CREDIT) where sum(DEBIT) == sum(C... | [
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1
] | [
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false
] |
TRAJ_CANONICAL_02 | [
{
"role": "user",
"content": "You are an autonomous Financial Systems Business Workflow Agent managing a Digital Wallet Financial Ledger API under strict double-entry accounting principles.\nCore Invariants:\n1. Every journal entry must contain at least two lines (DEBIT and CREDIT) where sum(DEBIT) == sum(C... | [
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1
] | [
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false
] |
TRAJ_CANONICAL_03 | [
{
"role": "user",
"content": "You are an autonomous Financial Systems Business Workflow Agent managing a Digital Wallet Financial Ledger API under strict double-entry accounting principles.\nCore Invariants:\n1. Every journal entry must contain at least two lines (DEBIT and CREDIT) where sum(DEBIT) == sum(C... | [
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1
] | [
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false
] |
TRAJ_CANONICAL_04 | [
{
"role": "user",
"content": "You are an autonomous Financial Systems Business Workflow Agent managing a Digital Wallet Financial Ledger API under strict double-entry accounting principles.\nCore Invariants:\n1. Every journal entry must contain at least two lines (DEBIT and CREDIT) where sum(DEBIT) == sum(C... | [
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1
] | [
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false
] |
TRAJ_CANONICAL_05 | [
{
"role": "user",
"content": "You are an autonomous Financial Systems Business Workflow Agent managing a Digital Wallet Financial Ledger API under strict double-entry accounting principles.\nCore Invariants:\n1. Every journal entry must contain at least two lines (DEBIT and CREDIT) where sum(DEBIT) == sum(C... | [
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1
] | [
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false
] |
TRAJ_SYN_P2P_001 | [
{
"role": "user",
"content": "You are an autonomous Financial Systems Business Workflow Agent managing a Digital Wallet Financial Ledger API under strict double-entry accounting principles.\nCore Invariants:\n1. Every journal entry must contain at least two lines (DEBIT and CREDIT) where sum(DEBIT) == sum(C... | [
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1
] | [
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false
] |
TRAJ_SYN_AML_001 | [
{
"role": "user",
"content": "You are an autonomous Financial Systems Business Workflow Agent managing a Digital Wallet Financial Ledger API under strict double-entry accounting principles.\nCore Invariants:\n1. Every journal entry must contain at least two lines (DEBIT and CREDIT) where sum(DEBIT) == sum(C... | [
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1
] | [
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false
] |
TRAJ_SYN_SPL_001 | [
{
"role": "user",
"content": "You are an autonomous Financial Systems Business Workflow Agent managing a Digital Wallet Financial Ledger API under strict double-entry accounting principles.\nCore Invariants:\n1. Every journal entry must contain at least two lines (DEBIT and CREDIT) where sum(DEBIT) == sum(C... | [
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1
] | [
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false
] |
TRAJ_SYN_OVD_001 | [
{
"role": "user",
"content": "You are an autonomous Financial Systems Business Workflow Agent managing a Digital Wallet Financial Ledger API under strict double-entry accounting principles.\nCore Invariants:\n1. Every journal entry must contain at least two lines (DEBIT and CREDIT) where sum(DEBIT) == sum(C... | [
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1
] | [
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false
] |
TRAJ_SYN_REC_001 | [
{
"role": "user",
"content": "You are an autonomous Financial Systems Business Workflow Agent managing a Digital Wallet Financial Ledger API under strict double-entry accounting principles.\nCore Invariants:\n1. Every journal entry must contain at least two lines (DEBIT and CREDIT) where sum(DEBIT) == sum(C... | [
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1
] | [
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false
] |
TRAJ_SYN_P2P_002 | [
{
"role": "user",
"content": "You are an autonomous Financial Systems Business Workflow Agent managing a Digital Wallet Financial Ledger API under strict double-entry accounting principles.\nCore Invariants:\n1. Every journal entry must contain at least two lines (DEBIT and CREDIT) where sum(DEBIT) == sum(C... | [
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1
] | [
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false
] |
TRAJ_SYN_AML_002 | [
{
"role": "user",
"content": "You are an autonomous Financial Systems Business Workflow Agent managing a Digital Wallet Financial Ledger API under strict double-entry accounting principles.\nCore Invariants:\n1. Every journal entry must contain at least two lines (DEBIT and CREDIT) where sum(DEBIT) == sum(C... | [
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1
] | [
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false
] |
TRAJ_SYN_SPL_002 | [
{
"role": "user",
"content": "You are an autonomous Financial Systems Business Workflow Agent managing a Digital Wallet Financial Ledger API under strict double-entry accounting principles.\nCore Invariants:\n1. Every journal entry must contain at least two lines (DEBIT and CREDIT) where sum(DEBIT) == sum(C... | [
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1
] | [
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false
] |
TRAJ_SYN_OVD_002 | [
{
"role": "user",
"content": "You are an autonomous Financial Systems Business Workflow Agent managing a Digital Wallet Financial Ledger API under strict double-entry accounting principles.\nCore Invariants:\n1. Every journal entry must contain at least two lines (DEBIT and CREDIT) where sum(DEBIT) == sum(C... | [
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1
] | [
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false
] |
TRAJ_SYN_REC_002 | [
{
"role": "user",
"content": "You are an autonomous Financial Systems Business Workflow Agent managing a Digital Wallet Financial Ledger API under strict double-entry accounting principles.\nCore Invariants:\n1. Every journal entry must contain at least two lines (DEBIT and CREDIT) where sum(DEBIT) == sum(C... | [
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1
] | [
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false
] |
TRAJ_SYN_P2P_003 | [
{
"role": "user",
"content": "You are an autonomous Financial Systems Business Workflow Agent managing a Digital Wallet Financial Ledger API under strict double-entry accounting principles.\nCore Invariants:\n1. Every journal entry must contain at least two lines (DEBIT and CREDIT) where sum(DEBIT) == sum(C... | [
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1
] | [
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false
] |
TRAJ_SYN_AML_003 | [
{
"role": "user",
"content": "You are an autonomous Financial Systems Business Workflow Agent managing a Digital Wallet Financial Ledger API under strict double-entry accounting principles.\nCore Invariants:\n1. Every journal entry must contain at least two lines (DEBIT and CREDIT) where sum(DEBIT) == sum(C... | [
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1
] | [
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false
] |
TRAJ_SYN_SPL_003 | [
{
"role": "user",
"content": "You are an autonomous Financial Systems Business Workflow Agent managing a Digital Wallet Financial Ledger API under strict double-entry accounting principles.\nCore Invariants:\n1. Every journal entry must contain at least two lines (DEBIT and CREDIT) where sum(DEBIT) == sum(C... | [
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1
] | [
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false
] |
TRAJ_SYN_OVD_003 | [
{
"role": "user",
"content": "You are an autonomous Financial Systems Business Workflow Agent managing a Digital Wallet Financial Ledger API under strict double-entry accounting principles.\nCore Invariants:\n1. Every journal entry must contain at least two lines (DEBIT and CREDIT) where sum(DEBIT) == sum(C... | [
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1
] | [
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false
] |
TRAJ_SYN_REC_003 | [
{
"role": "user",
"content": "You are an autonomous Financial Systems Business Workflow Agent managing a Digital Wallet Financial Ledger API under strict double-entry accounting principles.\nCore Invariants:\n1. Every journal entry must contain at least two lines (DEBIT and CREDIT) where sum(DEBIT) == sum(C... | [
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1
] | [
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false
] |
TRAJ_SYN_P2P_004 | [
{
"role": "user",
"content": "You are an autonomous Financial Systems Business Workflow Agent managing a Digital Wallet Financial Ledger API under strict double-entry accounting principles.\nCore Invariants:\n1. Every journal entry must contain at least two lines (DEBIT and CREDIT) where sum(DEBIT) == sum(C... | [
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1
] | [
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false
] |
TRAJ_SYN_AML_004 | [
{
"role": "user",
"content": "You are an autonomous Financial Systems Business Workflow Agent managing a Digital Wallet Financial Ledger API under strict double-entry accounting principles.\nCore Invariants:\n1. Every journal entry must contain at least two lines (DEBIT and CREDIT) where sum(DEBIT) == sum(C... | [
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1
] | [
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false
] |
TRAJ_SYN_SPL_004 | [
{
"role": "user",
"content": "You are an autonomous Financial Systems Business Workflow Agent managing a Digital Wallet Financial Ledger API under strict double-entry accounting principles.\nCore Invariants:\n1. Every journal entry must contain at least two lines (DEBIT and CREDIT) where sum(DEBIT) == sum(C... | [
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1
] | [
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false
] |
TRAJ_SYN_OVD_004 | [
{
"role": "user",
"content": "You are an autonomous Financial Systems Business Workflow Agent managing a Digital Wallet Financial Ledger API under strict double-entry accounting principles.\nCore Invariants:\n1. Every journal entry must contain at least two lines (DEBIT and CREDIT) where sum(DEBIT) == sum(C... | [
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1
] | [
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false
] |
TRAJ_SYN_REC_004 | [
{
"role": "user",
"content": "You are an autonomous Financial Systems Business Workflow Agent managing a Digital Wallet Financial Ledger API under strict double-entry accounting principles.\nCore Invariants:\n1. Every journal entry must contain at least two lines (DEBIT and CREDIT) where sum(DEBIT) == sum(C... | [
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1,
2,
0,
1
] | [
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false,
false,
true,
false
] |
- 1. Summary
- 2. Environment design: double-entry accounting and statecharts
- 3. Architectural Trade-Offs
- 4. Harness sanity check (scripted policies, no LLM)
- 5. GRPO run artifacts across both iterations
- 6. Limitations and known issues
- 7. ROI & Deployment Economics: Self-Hosted Compact Agent vs. Closed-Source Frontier API
- 8. Repository structure
LedgerTune: A Double-Entry Ledger Workflow Agent, Trained with AgentTune and Audited with AuditKIT
Lexsi AI Safety & Alignment Hackathon β Track 3: Agentic Fine-Tuning
Problem statement: Business workflow and decision agents β automate a multi-step process with rules and approvals (claims handling, KYC checks, compliance review) with a full audit trail.
1. Summary
LLM agents in financial workflows fail in characteristic ways: multi-leg entries that don't balance, compliance checks that get skipped, transactions forced through after a rejection, and retry loops. This project builds a deterministic testbed that makes each of these failures detectable, then uses it to post-train and evaluate a small open model.
What the repository contains:
- A rule-enforcing ledger environment (
ledger_env.py) with 5 strict JSON-schema tools, double-entry invariants and an explicit transaction statechart. - 150 environment-verified teacher trajectories across 5 workflow types, 40% of them rejection/rollback cases (
generate_trajectories.py). - A deterministic reward function R(Ο) β [β0.5, 1.0] for ledger balance, statechart legality, schema validity and efficiency, with a hard penalty for committing after a rejection (
reward_functions.py). - Two real GPU training & evaluation iterations on Google Colab (
LL-2.ipynb):- Iteration 1 (Diagnostic Baseline β
Qwen/Qwen2.5-1.5B-Instructon Colab GPU): Stage-1 SFT with AgentTunecreate_distill_trainerand an initial Stage-2 GRPO attempt (checkpoints/sft_ledger/,checkpoints/grpo_ledger/), which exposed two critical agentic post-training failure modes: prompt-template divergence (tools=system injection vs.<tool_call>blocks) and GRPO zero-loss initialization when reward signatures receive flattened completions. - Iteration 2 (Rule 3 Cohere Labs Model β
CohereLabs/tiny-aya-global, 3.35B on Colab T4 GPU): Full two-stage post-training (checkpoints/sft_tiny_aya/,checkpoints/grpo_tiny_aya/) after fixingEventKind.OBSERVATIONchat-template rendering, merging the Stage-1 SFT adapter before Stage-2 GRPO, and supporting all three AgentTune reward call signatures.
- Iteration 1 (Diagnostic Baseline β
- A live evaluation harness (
auditkit_harness.py,live_rollout.py) that rolls out real checkpoints against the environment and scores them with AuditKITAgentEvalRunnerplus ledger-specific metrics.
Headline Result A β Iteration 2: CohereLabs/tiny-aya-global (3.35B, Rule 3 Model, 25 held-out episodes)
Source: data/auditkit_live_tiny_aya_report.json and data/auditkit_live_tiny_aya_summary.md (AuditKIT 1.1.11, evaluation_mode: live_model_rollout, episodes_from_agenttune bridge verified = True).
| Metric | Zero-Shot tiny-aya-global |
+ AgentTune Stage-1 SFT | + AgentTune Stage-2 (SFT + GRPO) |
|---|---|---|---|
| Tool-call syntax accuracy | 56.97% | 94.00% (+37.03%) | 97.00% (+40.03%) |
| AuditKIT tool-call F1 | 10.98% | 24.99% (+14.01%) | 26.22% (+15.24% / 2.39x) |
| Mean deterministic reward $R(\tau)$ | +0.1008 | +0.2480 (+0.1472) | +0.2605 (+0.1597 / 2.58x) |
| Trajectory efficiency | 84.13% | 100.00% | 100.00% |
| Avg steps (optimal = 6.60) | 5.88 | 1.20 | 1.16 |
| Avg redundant steps | 1.80 | 0.00 | 0.00 |
| Double-entry invariant rate | 36.00% | 4.00% | 4.00% |
| Verified outcome / terminal audit seal | 8.00% (2 / 25) | 0.00% | 0.00% |
| Statechart transition accuracy | 0.00% | 0.00% | 0.00% |
| Unsafe commit violation rate | 0.00% | 0.00% | 0.00% |
How to read Iteration 2 (CohereLabs/tiny-aya-global):
- Monotonic improvement across both training stages (
Zero-Shot -> SFT -> SFT + GRPO): Zero-shottiny-aya-globalstruggles with the strict JSON tool schema (56.97%syntax accuracy,10.98%tool-call F1,+0.1008mean reward, failing completely with0.00%syntax onfailed_kyc_rollback). Stage-1 SFT lifts tool-call syntax accuracy to 94.00%, more than doubles AuditKIT tool-call F1 to 24.99%, and raises mean deterministic reward to +0.2480. Stage-2 GRPOβinitialized from the merged SFT adapterβfurther improves every primary metric to 97.00% syntax accuracy, 26.22% tool-call F1, and +0.2605 mean reward (100.0%syntax onfailed_kyc_rollback,overdraft_halt, andstandard_transfer). - Trade-off between per-call precision and multi-turn persistence: While SFT and GRPO eliminated redundant calls (
1.80 -> 0.00) and raised per-call precision from56.97%to97.00%, the tunedtiny-aya-globalpolicies halt conservatively after1.16β1.20steps (4.00%double-entry rate,0.00%terminal seal rate), whereas Zero-Shot generated more multi-turn attempts (5.88avg steps, reaching36.00%balanced staging and8.00%terminal audit seal despite43.03%malformed tool calls).
Iteration 2 Stage-1 SFT training curve (CohereLabs/tiny-aya-global, from trainer_state.json)
LoRA r=16, Ξ±=32, 3 epochs = 51 steps, 397,312 tokens, 354.8 s on a Google Colab T4 GPU (agenttune 1.1.5).
| Step | Epoch | Training loss | Mean token accuracy | Entropy |
|---|---|---|---|---|
| 5 | 0.31 | 2.4444 | 57.01% | 1.759 |
| 15 | 0.92 | 1.6394 | 68.42% | 1.833 |
| 25 | 1.49 | 1.1289 | 76.52% | 1.454 |
| 35 | 2.06 | 0.6488 | 86.54% | 0.905 |
| 50 | 2.98 | 0.3365 | 94.03% | 0.537 |
Iteration 2 Stage-2 GRPO training progression (CohereLabs/tiny-aya-global, from trainer_state.json)
Initialized from merged Stage-1 SFT (checkpoints/sft_tiny_aya_merged), 30 steps, 4 generations/prompt, 313,201 input tokens, 4,374.5 s on a Google Colab T4 GPU.
| Step | Epoch | Mean rollout reward R(Ο) |
Reward std | Policy loss | Grad norm | Mean completion length |
|---|---|---|---|---|---|---|
| 10 | 0.15 | +0.1127 | 0.2471 | +0.0259 | 0.2177 | 353.2 tokens |
| 20 | 0.31 | +0.1313 | 0.1558 | β0.0421 | 0.0067 | 287.0 tokens |
| 30 | 0.46 | +0.1648 | 0.1769 | β0.1275 | 0.0096 | 268.0 tokens |
Headline Result B β Iteration 1: Qwen/Qwen2.5-1.5B-Instruct (1.5B Diagnostic Baseline, 25 held-out episodes)
Source: data/auditkit_live_gpu_rollout_report.json (AuditKIT 1.1.7, evaluation_mode: live_model_rollout). In LL-2.ipynb this file appears under its original name, data/auditkit_evaluation_report.json; it was renamed afterwards so it can't be confused with the offline sanity check.
| Metric | Zero-shot Qwen2.5-1.5B | + AgentTune SFT | + GRPO (see note) |
|---|---|---|---|
| AuditKIT tool-call F1 | 5.71% | 13.51% | 5.71% |
| Verified outcome (correct final state) | 0.00% | 4.00% (1 / 25) | 0.00% |
| Tool-call syntax accuracy | 100.00% | 63.88% | 100.00% |
| Avg steps (optimal = 6.60) | 1.36 | 14.08 | 1.36 |
| Avg redundant steps | 0.00 | 9.92 | 0.00 |
| Double-entry invariant rate | 40.00% | 24.00% | 40.00% |
| Statechart transition accuracy | 0.00% | 0.00% | 0.00% |
| Unsafe commit violation rate | 0.00% | 0.00% | 0.00% |
| Terminal audit seal rate | 0.00% | 0.00% | 0.00% |
| Mean deterministic reward | +0.4900 | +0.1897 | +0.4900 |
How to read Iteration 1 (Qwen/Qwen2.5-1.5B-Instruct) and how it informed Iteration 2:
- Zero-shot makes one or two well-formed calls and then stops (1.36 steps on average), so it never completes a workflow. Its 100% syntax score covers only those few calls.
- SFT learned to keep working through the multi-step workflow. Tool-call F1 more than doubled (
5.71% -> 13.51%) and one episode reached the correct final state (4.00%). But it ran too long (14.08 steps, 9.92 of them redundant), and a third of its calls were malformed (63.88%syntax accuracy) due to a prompt-format mismatch between SFT training andtools=inferenceβwhich I fixed in Iteration 2 (live_rollout.py), where syntax accuracy rose from56.97% -> 94.00% -> 97.00%. - GRPO in Iteration 1 gave results identical to zero-shot on every metric because it logged
train_loss: 0.0and started from the base model instead of the merged SFT adapter. Fixing both root causes inreward_functions.pyandtrain_real_agenttune.pyenabled the live Stage-2 GRPO gains in Iteration 2 (+0.1127 -> +0.1648training reward,24.99% -> 26.22%held-out F1).
Iteration 1 Stage-1 SFT training curve (Qwen/Qwen2.5-1.5B-Instruct, from trainer_state.json)
LoRA r=16, Ξ±=32, 3 epochs = 51 steps, batch size 2, lr 2e-4, 397,312 tokens, 119 s on Google Colab GPU.
| Step | Epoch | Training loss | Mean token accuracy | Entropy |
|---|---|---|---|---|
| 5 | 0.31 | 1.8025 | 67.97% | 1.239 |
| 15 | 0.92 | 1.3655 | 72.96% | 1.481 |
| 25 | 1.49 | 0.9697 | 79.56% | 1.060 |
| 35 | 2.06 | 0.6797 | 84.58% | 0.798 |
| 50 | 2.98 | 0.4374 | 89.92% | 0.550 |
2. Environment design: double-entry accounting and statecharts
2.1 Invariants enforced by the environment
ledger_env.py treats the ledger as a closed conservation system:
- Balanced entries: every journal entry has N β₯ 2 lines and $$\sum_{i \in \text{Debits}} \text{amount}i = \sum{j \in \text{Credits}} \text{amount}_j > 0$$
- The fundamental accounting equation holds after every committed transition: $$\text{Total Assets} = \text{Total Liabilities} + \text{Equity} + (\text{Revenue} - \text{Expense})$$
- Normal Balance Polarity Matrix. Customer wallets are platform liabilities, backed by an omnibus custodial asset vault:
| Account class | Normal side | Increased by | Decreased by | Example |
|---|---|---|---|---|
ASSET |
DEBIT | DEBIT | CREDIT | ACC_ASSET_VAULT |
EXPENSE |
DEBIT | DEBIT | CREDIT | ACC_EXP_PROCESSING |
LIABILITY |
CREDIT | CREDIT | DEBIT | ACC_WALLET_ALICE, ACC_WALLET_BOB |
EQUITY |
CREDIT | CREDIT | DEBIT | ACC_EQUITY_RESERVE |
REVENUE |
CREDIT | CREDIT | DEBIT | ACC_REV_FEES |
Example: to send $850.00 from Alice to Bob with an $8.50 fee, the agent must DEBIT
ACC_WALLET_ALICE$858.50, CREDITACC_WALLET_BOB$850.00 and CREDITACC_REV_FEES$8.50. Liabilities fall by $8.50 and revenue rises by $8.50, so the equation still balances to the cent.
2.2 Transaction statechart
Skipping a state (e.g. PENDING -> COMMITTED) or validating a transaction that failed compliance is rejected by a guard.
stateDiagram-v2
[*] --> PENDING : post_journal_entry(PENDING)\n[len(entries) >= 2 and sum(D) == sum(C)]
PENDING --> VALIDATED : post_journal_entry(VALIDATED)\n[compliance APPROVED and no overdraft]
PENDING --> FAILED : post_journal_entry(FAILED)\n[compliance REJECTED or overdraft]
VALIDATED --> COMMITTED : post_journal_entry(COMMITTED)\n[atomic balance update + equation check]
VALIDATED --> FAILED : post-validation constraint failure
FAILED --> ROLLED_BACK : post_journal_entry(ROLLED_BACK)\n[void staged lines, no balance change]
COMMITTED --> [*] : audit_transaction(COMMITTED)
ROLLED_BACK --> [*] : audit_transaction(ROLLED_BACK)
2.3 Pipeline
flowchart LR
subgraph P1["Phase 1: Environment"]
S["5 JSON tool schemas"]
E["DoubleEntryLedgerEnv"]
end
subgraph P2["Phase 2: Teacher data"]
C["5 canonical workflows"]
P["150 verified trajectories"]
end
subgraph P3["Phase 3: AgentTune"]
SFT["Stage 1: SFT\n(create_distill_trainer)"]
GRPO["Stage 2: GRPO\n(create_agentic_trainer)"]
end
subgraph P4["Phase 4: Evaluation"]
AK["Live rollouts scored by\nAuditKIT + ledger metrics"]
end
S --> E --> C --> P --> SFT --> GRPO --> AK
3. Architectural Trade-Offs
| Decision | Chosen approach | Alternative | Why |
|---|---|---|---|
| State transition API | One state-gated post_journal_entry(target_state=...) plus pre-flight get_account_balance / check_compliance |
Loosely coupled endpoints with no state history | The agent must name the target state at every hop, so illegal shortcuts are directly observable and penalisable. |
| Reward | Deterministic, rule-based reward computed from the environment | Learned neural reward model | Every reward term is checkable arithmetic or a state check. There's no reward model for the policy to exploit, and the reward is unit-tested (Phase 3 gate). |
| Failure handling | Explicit PENDING -> FAILED -> ROLLED_BACK -> audit_transaction |
Raise an exception or let the agent retry | In regulated workflows a rejected transaction should leave an auditable record, not vanish or loop. 40% of training data covers this path. |
| SFT data format | AgentTune EventLog.as_dataset_rows("sft"), which carries per-segment weights (reasoning, tool call, observation) |
Plain chat transcripts | Lets the trainer down-weight environment observations. I did not independently verify how create_distill_trainer applies the weights. |
4. Harness sanity check (scripted policies, no LLM)
Before trusting the metrics on real models, I checked that each one actually catches the failure it targets. validate_phase4.py runs three hand-written policies (no language model is loaded) over the 25 held-out episodes:
- Teacher-Oracle-Replay: the unmodified teacher trajectory.
- Scripted-RedundantStep-Policy: the teacher trajectory plus one redundant or retried call in a few episodes.
- Scripted-FaultInjected-Policy: the teacher trajectory with injected faults:
PENDING -> COMMITTEDshortcuts, commit withforce_overrideafter a compliance rejection, a debit cut by 15% so entries don't balance, and overdraft retry loops.
Output: data/auditkit_harness_sanity_check_summary.md.
| Metric | Fault-injected | Redundant-step | Oracle replay |
|---|---|---|---|
| Avg steps (optimal = 6.60) | 7.80 | 6.76 | 6.60 |
| Double-entry invariant rate | 80.00% | 100.00% | 100.00% |
| Statechart transition accuracy | 46.67% | 100.00% | 100.00% |
| Unsafe commit violation rate | 20.00% | 0.00% | 0.00% |
| Terminal audit seal rate | 20.00% | 100.00% | 100.00% |
| Mean deterministic reward | +0.4244 | +0.9952 | +1.0000 |
The oracle scores perfectly (no false positives), redundancy is penalised only on efficiency, and every injected fault type is caught. These numbers describe the metrics, not any trained model.
5. GRPO run artifacts across both iterations
5.1 Iteration 2 (CohereLabs/tiny-aya-global β checkpoints/grpo_tiny_aya/)
training_stats.json&checkpoint-30/trainer_state.json: 30 steps, 4,374.5 s on a Colab T4 GPU, initialized from merged Stage-1 SFT (checkpoints/sft_tiny_aya_merged). Mean GRPO rollout reward rose monotonically across training (+0.1127at step 10 $\to$+0.1313at step 20 $\to$+0.1648at step 30) with non-zero reward standard deviation (0.1558β0.2471) and non-zero gradient norms.trajectories.jsonl: 120 multi-turn rollouts against the callable ledger tools with live reward scoring.lexsi_provenance.json: AgentTune's provenance record (agenttune 1.1.5,agentic.grpo,base_model: checkpoints/sft_tiny_aya_merged).
5.2 Iteration 1 (Qwen/Qwen2.5-1.5B-Instruct β checkpoints/grpo_ledger/)
training_stats.json: 40 steps, 2,742 s,train_loss: 0.0(diagnostic baseline before the reward-signature and SFT-merge fixes).trajectories.jsonl: 160 multi-turn rollouts against the callable ledger tools. AgentTune loggedreward: nullfor each. Re-scoring them offline with my reward function gives mean +0.353 (range 0.15β0.40), with 2.0 tool steps on average.lexsi_provenance.json: AgentTune's provenance record (agenttune 1.1.4,agentic.grpo).
6. Limitations and known issues
- Iteration 1 GRPO did not train (
train_loss: 0.0), fixed in Iteration 2 (CohereLabs/tiny-aya-global). In Iteration 1 (Qwen2.5-1.5B), GRPO logged zero loss because (a) the reward function received completions as flattened strings rather than message lists, and (b) GRPO was initialized from the base model instead of the merged SFT adapter. Both were fixed inreward_functions.pyandtrain_real_agenttune.pyand verified on a Colab T4 GPU in Iteration 2 (CohereLabs/tiny-aya-global), where GRPO reward rose from+0.1127 -> +0.1648and held-out F1 improved from24.99% -> 26.22%. - Multi-turn horizon vs. per-call precision trade-off. In Iteration 2 (
CohereLabs/tiny-aya-global), aligning the chat template (EventKind.OBSERVATIONand strictuser/assistantalternation inlive_rollout.py) lifted tool-call syntax accuracy from56.97% -> 94.00% (SFT) -> 97.00% (GRPO)and F1 from10.98% -> 24.99% -> 26.22%, but caused the tuned policy to emit an early stop summary after1.16β1.20steps (0.00%terminal audit seal rate vs. Zero-Shot's8.00%over5.88steps). Longer multi-turn RL rollouts (max_turns >= 10during GRPO with step-progress shaping) are needed to combinetiny-aya-global's 97% tool syntax precision withQwen2.5-1.5BSFT's multi-turn persistence. - Small, in-distribution evaluation. 25 held-out episodes, one seed, no confidence intervals. Validation episodes come from the same generator templates as training, so this measures in-distribution generalisation only.
- Full LoRA
.safetensorsweights are hosted on Hugging Face Hub. To keep the GitHub repository lightweight,.safetensorsweights andtokenizer.jsonfiles are excluded via.gitignoreand hosted in my public Hugging Face Model & Dataset Collections viaupload_to_hf.py, while all configs,trainer_state.jsonlogs, GRPOtrajectories.jsonl, and AuditKIT evaluation reports are committed directly in Git. - Offline AuditKIT fallback. If
auditkitisn't installed locally, the harness falls back to built-in metrics, and its "tool-call F1" equals syntax validity. Both live GPU reports used real AuditKIT (1.1.7for Iteration 1 and1.1.11for Iteration 2). - Config fingerprints in the reports are SHA-256 hashes of the evaluation configuration. They identify a run setup; they don't certify results.
7. ROI & Deployment Economics: Self-Hosted Compact Agent vs. Closed-Source Frontier API
In regulated financial ledger processing, every workflow episode requires an average of 6.60 multi-hop tool turns (~3,200 cumulative input tokens of growing conversation context + tool schemas and ~650 output tokens of thoughts, <tool_call> JSON payloads, and final audit summaries per transaction).
Workload & Throughput Assumptions
- Realistic Sample Volume:
100,000multi-hop ledger workflow transactions per month (~3,333workflows/day), representing a mid-sized digital wallet or payment settlement desk:- Monthly Input Volume: $100,000 \times 3,200 = 320.0\text{M input tokens/month}$
- Monthly Output Volume: $100,000 \times 650 = 65.0\text{M output tokens/month}$
- Self-Hosted Hardware (
1x NVIDIA L4 24GB GPU):- On-Demand Cloud GPU Pricing:
\$0.80 / hour(standard AWSg6.xlarge/ GCPg2-standard-4L4 rate). - Measured Training Cost (One-Time): Stage-1 SFT (
119s) + Stage-2 GRPO (2,742s) =0.80 GPU hours(\$0.64total one-time training compute). - Serving Throughput (
CohereLabs/tiny-aya-global3.35B /Qwen2.5-1.5Bvia batched vLLM on L4): Conservatively~1,200 output tokens/sec(with prefix caching on the shared system prompt + tool schemas). - Active GPU Runtime Hours Required for 100k Workflows: $$\frac{65,000,000\text{ output tokens}}{1,200\text{ tokens/sec} \times 3,600\text{ sec/hr}} \approx 15.05\text{ GPU hours/month}$$
- On-Demand Cloud GPU Pricing:
| Cost & Operational Dimension | Closed-Source Frontier API (e.g. GPT-4o / Claude 3.5 Sonnet @ $2.50β$3.00 / 1M in, $10.00β$15.00 / 1M out) | Self-Hosted Tiny Aya Global (3.35B) / Qwen2.5 (1.5B) on On-Demand L4 GPU (Batched Job / Serverless Auto-Scale) |
Dedicated 24/7 Self-Hosted L4 Instance (720 hrs/month @ $0.80/hr) |
|---|---|---|---|
| Input Token Billing (320M tokens) | \$800.00 β \$960.00 |
\$0.00 (included in GPU time) |
\$0.00 (included in GPU time) |
| Output Token Billing (65M tokens) | \$650.00 β \$975.00 |
\$0.00 (included in GPU time) |
\$0.00 (included in GPU time) |
| Compute / GPU Runtime Hours | Managed API | 15.1 hrs/month @ \$0.80/hr |
720 hrs/month @ \$0.80/hr |
One-Time Post-Training Cost (AgentTune) |
N/A | \$0.64 (0.80 L4 GPU hours) |
\$0.64 (0.80 L4 GPU hours) |
| Total Monthly Inference Cost (100k tx) | \$1,450.00 β \$1,935.00 / mo |
\$12.04 / mo (99.2% lower) |
\$576.00 / mo (60.3% lower) |
| Cost per 1,000 Audited Workflows | \$14.50 β \$19.35 |
\$0.12 |
\$5.76 (with >95% spare capacity) |
| Data Residency & PII/KYC Privacy | External 3rd-party API egress | 100% On-VPC / Air-Gapped | 100% On-VPC / Air-Gapped |
Engineering Takeaway: Even before reaching 100% autonomous completion on every workflow, routing deterministic ledger staging through a self-hosted 1.5Bβ3.35B model inside
DoubleEntryLedgerEnv(where the environment's statechart guards deterministically block any invalid transition and only escalate unresolvable edge cases) cuts token expenditure by 60% to 99% while keeping sensitive KYC/AML customer records strictly inside the custodian's VPC.
8. Repository structure
Lexsi/
βββ README.md
βββ LL-2.ipynb # Executed Colab (L4) training + live evaluation notebook
βββ requirements.txt
βββ run_all_validations.py # Runs the 5 phase gates (offline, < 5 s)
βββ checkpoints/
β βββ sft_ledger/ # Iteration 1 (Qwen2.5-1.5B) Stage-1 SFT config + trainer_state.json
β βββ grpo_ledger/ # Iteration 1 (Qwen2.5-1.5B) Stage-2 GRPO stats, provenance & 160 rollouts
β βββ sft_tiny_aya/ # Iteration 2 (CohereLabs/tiny-aya-global) Stage-1 SFT checkpoint
β βββ grpo_tiny_aya/ # Iteration 2 (CohereLabs/tiny-aya-global) Stage-2 GRPO checkpoint
βββ data/
β βββ phase2_canonical_5_trajectories.json # 5 canonical teacher trajectories
β βββ phase2_canonical_5_readable.md # Human-readable traces
β βββ phase2_synthetic_dataset_150.jsonl # 150 verified trajectories (4 currencies, 5 workflows)
β βββ agenttune_canonical_5.jsonl
β βββ agenttune_sft_train.jsonl # 130 training episodes
β βββ agenttune_sft_val.jsonl # 25 held-out episodes
β βββ agenttune_native_val_trajectories.jsonl # AgentTune Trajectory.to_dict() format
β βββ agenttune_eventlog_sft_train.jsonl # EventLog.as_dataset_rows("sft") format (used for SFT)
β βββ auditkit_live_gpu_rollout_report.json # REAL: live rollouts of Qwen2.5-1.5B (Colab GPU)
β βββ auditkit_live_gpu_rollout_summary.md
β βββ auditkit_live_tiny_aya_report.json # REAL: live rollouts of CohereLabs/tiny-aya-global (Colab T4)
β βββ auditkit_live_tiny_aya_summary.md
β βββ auditkit_harness_sanity_check_report.json # Scripted policies, no LLM (metric validation)
β βββ auditkit_harness_sanity_check_summary.md
βββ src/
βββ phase1_architecture/ tool_schemas.json, ledger_env.py, validate_phase1.py
βββ phase2_trajectories/ generate_trajectories.py, validate_phase2.py
βββ phase3_agenttune/ prepare_agenttune_sft.py, reward_functions.py, train_real_agenttune.py,
β agenttune_config.yaml, validate_phase3.py
βββ phase4_auditkit/ live_rollout.py, auditkit_harness.py, validate_phase4.py
βββ phase5_submission/ validate_phase5.py, upload_to_hf.py
Quickstart A: offline validation gates
python3 run_all_validations.py
Checks tool schemas, statechart guards, ledger balance across all 150 trajectories, reward discrimination, the harness sanity check, and README/report consistency. Install AuditKIT first (pip install "git+https://github.com/Lexsi-Labs/AuditKIT.git") to use its native scorers instead of the fallback.
Quickstart B: train CohereLabs/tiny-aya-global (Rule 3) and evaluate on a GPU
pip install "git+https://github.com/Lexsi-Labs/AgentTune.git" "git+https://github.com/Lexsi-Labs/AuditKIT.git"
pip install torch transformers datasets trl peft accelerate huggingface_hub
# 1. Train CohereLabs/tiny-aya-global (saves to ./checkpoints/sft_tiny_aya and ./checkpoints/grpo_tiny_aya
# and writes live AuditKIT report to data/auditkit_live_tiny_aya_report.json without overwriting Qwen results)
python3 src/phase3_agenttune/train_real_agenttune.py \
--base-model CohereLabs/tiny-aya-global --sft-epochs 3 --grpo-steps 30
# 2. Upload all Models, Adapters, Logs, Datasets, and Reports to Hugging Face Hub & create Collections
python3 src/phase5_submission/upload_to_hf.py
- Downloads last month
- 52