| AbilityMatrix |
Ran ran on a synthesized input · constructed an object; no result was computed |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("f2f59313328a59ce") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, AbilityMatrix: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import torch.nn as nn
from collections import defaultdict
torch.manual_seed(0)
# AbilityMatrix only takes one parameter in __init__: prior (float)
# The prior parameter has a default value of 0.5
# We can test with the default or with a custom value
ARGS = {
'prior': 0.7
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type AbilityMatrix — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a AbilityMatrix output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| ContrastiveDistiller |
Ran ran on a synthesized input · constructed an object; no result was computed |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("93c06a1ee5084c61") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, ContrastiveDistiller: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
from dataclasses import dataclass, field
from typing import Any, Dict, Mapping, Optional, Sequence, Tuple
# Define the dataclasses as provided
@dataclass(frozen=True)
class Observation:
"""Environment feedback for a tool call."""
success: bool
result: Optional[str] = None
error: Optional[str] = None
raw: Mapping[str, Any] = field(default_factory=dict)
def render(self) -> str:
if self.success:
return f'success: {self.result}'
return f'error: {self.error}'
@dataclass(frozen=True)
class ToolCall:
"""A single tool invocation proposed by an agent."""
name: str
arguments: Mapping[str, Any] = field(default_factory=dict)
def render(self) -> str:
import json
return f'{self.name}({json.dumps(dict(self.arguments), ensure_ascii=True)})'
@dataclass(frozen=True)
class Step:
"""One reasoning/action/observation step."""
thought: str
tool_call: Optional[ToolCall] = None
observation: Optional[Observation] = None
@dataclass
class Trajectory:
"""Execution trace produced by one agent on one task."""
trajectory_id: str
agent_name: str
task_id: str
steps: Sequence[Step]
success: bool
final_answer: str
score: float = 0.0
notes: Mapping[str, Any] = field(default_factory=dict)
def compact_summary(self) -> str:
parts = [f'trajectory={self.trajectory_id}', f'agent={self.agent_name}', f'success={self.success}']
for step in self.steps:
parts.append(f'thought={step.thought}')
if step.tool_call is not None:
parts.append(f'tool={step.tool_call.render()}')
if step.observation is not None:
parts.append(f'observation={step.observation.render()}')
parts.append(f'final={self.final_answer}')
return ' | '.join(parts)
@dataclass(frozen=True)
class Task:
"""A task handled by agents."""
task_id: str
domain: str
instruction: str
metadata: Mapping[str, Any] = field(default_factory=dict)
# Create test data
task = Task(
task_id='task_001',
domain='translation',
instruction='Translate a word',
metadata={'test': True}
)
# Create successful trajectory
success_steps = [
Step(
thought='I need to translate the word',
tool_call=ToolCall(name='translateWord', arguments={'fromLanguage': 'en', 'toLanguage': 'ru', 'word': 'hello'}),
observation=Observation(success=True, result='привет')
)
]
success_trajectory = Trajectory(
trajectory_id='traj_success_001',
agent_name='agent_a',
task_id='task_001',
steps=success_steps,
success=True,
final_answer='привет',
score=1.0
)
# Create failing trajectory with invalid language argument
failure_steps = [
Step(
thought='I need to translate the word',
tool_call=ToolCall(name='translateWord', arguments={'fromLanguage': 'English', 'toLanguage': 'Russian', 'word': 'hello'}),
observation=Observation(success=False, error='invalid language argument')
)
]
failure_trajectory = Trajectory(
trajectory_id='traj_fail_001',
agent_name='agent_b',
task_id='task_001',
steps=failure_steps,
success=False,
final_answer='',
score=0.0
)
ARGS = {
'name': 'contrastive-distiller'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ContrastiveDistiller — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ContrastiveDistiller output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| Experience |
Ran ran on a synthesized input · constructed an object; no result was computed |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("655a360541b6efd9") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Experience: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
from typing import Dict, Tuple, Mapping, Any
torch.manual_seed(0)
ARGS = {
"experience_id": "exp_001",
"title": "Example Experience Title",
"description": "This is a detailed description of the experience",
"content": "The full content or body of the experience goes here with more details",
"tags": ("learning", "optimization", "neural_networks"),
"source_task_id": "task_42",
"supporting_trajectory_ids": ("traj_001", "traj_002", "traj_003"),
"rejected_trajectory_ids": ("traj_bad_001", "traj_bad_002"),
"metadata": {
"confidence": 0.95,
"version": 2,
"author": "system",
"timestamp": 1234567890
}
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Experience — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Experience output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| MemoryBank |
Ran ran on a synthesized input · constructed an object; no result was computed |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("9079b690f5039ebd") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, MemoryBank: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
from collections import defaultdict
from dataclasses import dataclass
from typing import Any, DefaultDict, Dict, List, Mapping, Sequence, Tuple
@dataclass(frozen=True)
class Experience:
"""A reusable memory item distilled from trajectories."""
experience_id: str
title: str
description: str
content: str
tags: Tuple[str, ...]
source_task_id: str
supporting_trajectory_ids: Tuple[str, ...] = ()
rejected_trajectory_ids: Tuple[str, ...] = ()
metadata: Mapping[str, Any] = None
def __post_init__(self):
if self.metadata is None:
object.__setattr__(self, 'metadata', {})
def searchable_text(self) -> str:
return ' '.join([self.title, self.description, self.content, ' '.join(self.tags), self.source_task_id])
@dataclass(frozen=True)
class MemoryHit:
"""A retrieved memory item and its similarity score."""
experience: Experience
score: float
bank: str
@dataclass(frozen=True)
class Vote:
"""One verifier's decision about a candidate memory."""
agent_name: str
accept: bool
rationale: str
@dataclass(frozen=True)
class VerificationDecision:
"""Routing decision after consensus verification."""
experience: Experience
votes: Sequence[Vote]
destination: str
@property
def accepted_agents(self) -> Tuple[str, ...]:
return tuple((vote.agent_name for vote in self.votes if vote.accept))
class MemoryBank:
"""Hierarchical EDV memory: shared bank plus per-agent private banks."""
def __init__(self) -> None:
self.shared: List[Experience] = []
self.private: DefaultDict[str, List[Experience]] = defaultdict(list)
def apply_decision(self, decision: VerificationDecision) -> None:
if decision.destination == 'shared':
self.add_shared(decision.experience)
elif decision.destination == 'private':
for agent_name in decision.accepted_agents:
self.add_private(agent_name, decision.experience)
def add_shared(self, experience: Experience) -> None:
if not self._contains(self.shared, experience.experience_id):
self.shared.append(experience)
def add_private(self, agent_name: str, experience: Experience) -> None:
if not self._contains(self.private[agent_name], experience.experience_id):
self.private[agent_name].append(experience)
@staticmethod
def _contains(experiences: Sequence[Experience], experience_id: str) -> bool:
return any((exp.experience_id == experience_id for exp in experiences))
exp1 = Experience(
experience_id="exp_001",
title="Test Experience",
description="A test memory item",
content="This is test content for the memory bank",
tags=("test", "memory", "edv"),
source_task_id="task_001",
supporting_trajectory_ids=("traj_001", "traj_002"),
rejected_trajectory_ids=("traj_003",),
metadata={"key": "value"}
)
exp2 = Experience(
experience_id="exp_002",
title="Another Experience",
description="Second test memory item",
content="More test content for retrieval",
tags=("secondary", "edv"),
source_task_id="task_002",
supporting_trajectory_ids=(),
rejected_trajectory_ids=(),
metadata={}
)
vote1 = Vote(agent_name="agent_1", accept=True, rationale="Good memory")
vote2 = Vote(agent_name="agent_2", accept=True, rationale="Useful content")
decision = VerificationDecision(
experience=exp1,
votes=[vote1, vote2],
destination="shared"
)
ARGS = {}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type MemoryBank — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MemoryBank output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| MemoryHit |
Ran ran on a synthesized input · constructed an object; no result was computed |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("46b0a722f6123d8b") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, MemoryHit: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
from dataclasses import dataclass, field
from typing import Any, Dict, Mapping, Optional, Sequence, Tuple
@dataclass(frozen=True)
class Experience:
"""A reusable memory item distilled from trajectories."""
experience_id: str
title: str
description: str
content: str
tags: Tuple[str, ...]
source_task_id: str
supporting_trajectory_ids: Tuple[str, ...] = ()
rejected_trajectory_ids: Tuple[str, ...] = ()
metadata: Mapping[str, Any] = field(default_factory=dict)
def searchable_text(self) -> str:
return ' '.join([self.title, self.description, self.content, ' '.join(self.tags), self.source_task_id])
@dataclass(frozen=True)
class MemoryHit:
"""A retrieved memory item and its similarity score."""
experience: Experience
score: float
bank: str
# Create a sample Experience
sample_experience = Experience(
experience_id="exp_001",
title="Sample Experience",
description="A description of the experience",
content="Detailed content about the experience",
tags=("tag1", "tag2", "tag3"),
source_task_id="task_001",
supporting_trajectory_ids=("traj_001", "traj_002"),
rejected_trajectory_ids=("traj_003",),
metadata={"key1": "value1", "key2": 42}
)
# Define ARGS for MemoryHit
ARGS = {
"experience": sample_experience,
"score": 0.95,
"bank": "memory_bank_001"
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type MemoryHit — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MemoryHit output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| Observation |
Ran ran on a synthesized input · constructed an object; no result was computed |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("75ed7733fb5fc3e8") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Observation: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
from dataclasses import dataclass, field
from typing import Any, Dict, Mapping, Optional
torch.manual_seed(0)
@dataclass(frozen=True)
class Observation:
"""Environment feedback for a tool call."""
success: bool
result: Optional[str] = None
error: Optional[str] = None
raw: Mapping[str, Any] = field(default_factory=dict)
def render(self) -> str:
if self.success:
return f'success: {self.result}'
return f'error: {self.error}'
ARGS = {
'success': True,
'result': 'Tool execution completed successfully',
'error': None,
'raw': {'status_code': 200, 'elapsed_time': 1.23}
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Observation — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Observation output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| Step |
Ran ran on a synthesized input · constructed an object; no result was computed |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("a49713ef8b941f3a") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Step: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import json
from dataclasses import dataclass, field
from typing import Iterable, List, Mapping, Sequence
from typing import Any, Dict, Mapping, Optional, Sequence, Tuple
@dataclass(frozen=True)
class Observation:
"""Environment feedback for a tool call."""
success: bool
result: Optional[str] = None
error: Optional[str] = None
raw: Mapping[str, Any] = field(default_factory=dict)
def render(self) -> str:
if self.success:
return f'success: {self.result}'
return f'error: {self.error}'
@dataclass(frozen=True)
class ToolCall:
"""A single tool invocation proposed by an agent."""
name: str
arguments: Mapping[str, Any] = field(default_factory=dict)
def render(self) -> str:
return f'{self.name}({json.dumps(dict(self.arguments), ensure_ascii=True)})'
@dataclass(frozen=True)
class Step:
"""One reasoning/action/observation step."""
thought: str
tool_call: Optional[ToolCall] = None
observation: Optional[Observation] = None
# Construct valid arguments for Step
tool_call_instance = ToolCall(
name="calculate",
arguments={"x": 5, "y": 3}
)
observation_instance = Observation(
success=True,
result="The answer is 8",
error=None,
raw={"computation_time": 0.5}
)
ARGS = {
"thought": "I need to calculate the sum of 5 and 3",
"tool_call": tool_call_instance,
"observation": observation_instance
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Step — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Step output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| Task |
Ran ran on a synthesized input · constructed an object; no result was computed |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("7e6bf386dea53a1e") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Task: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
from dataclasses import dataclass, field
from typing import Any, Dict, Mapping, Optional, Sequence, Tuple
@dataclass(frozen=True)
class Task:
"""A task handled by agents."""
task_id: str
domain: str
instruction: str
metadata: Mapping[str, Any] = field(default_factory=dict)
ARGS = {
"task_id": "task_001",
"domain": "nlp",
"instruction": "Classify the sentiment of the given text",
"metadata": {"priority": "high", "timeout": 30, "tags": ["classification", "sentiment"]}
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Task — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Task output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| ToolCall |
Ran ran on a synthesized input · constructed an object; no result was computed |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("b6632fab06bf37ff") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, ToolCall: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import json
from dataclasses import dataclass, field
from typing import Any, Dict, Mapping, Optional, Sequence, Tuple
@dataclass(frozen=True)
class ToolCall:
"""A single tool invocation proposed by an agent."""
name: str
arguments: Mapping[str, Any] = field(default_factory=dict)
def render(self) -> str:
return f'{self.name}({json.dumps(dict(self.arguments), ensure_ascii=True)})'
# Setup code to construct valid arguments for ToolCall
ARGS = {
"name": "fetch_data",
"arguments": {
"query": "user_id_123",
"limit": 10,
"filters": {"status": "active", "region": "us-west"}
}
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ToolCall — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ToolCall output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| ToyTranslationEnvironment |
Ran ran on a synthesized input · constructed an object; no result was computed |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("c65f5d2c7acb3a49") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, ToyTranslationEnvironment: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
from typing import Dict, Tuple
# ToyTranslationEnvironment.__init__() takes no parameters
# It initializes self.translations and a method _is_iso_639_1
# The run_tool method uses:
# - call.name (string)
# - call.arguments (Mapping[str, Any])
# - self.translations (Dict)
# - self._is_iso_639_1 (static method)
# Since __init__ takes no arguments, ARGS should be an empty dict
ARGS = {}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ToyTranslationEnvironment — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ToyTranslationEnvironment output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| Trajectory |
Ran ran on a synthesized input · constructed an object; no result was computed |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("d14951a6ebdfc386") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Trajectory: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
from typing import Dict, List, Sequence, Mapping, Any, Optional
from dataclasses import dataclass, field
@dataclass(frozen=True)
class Observation:
"""Environment feedback for a tool call."""
success: bool
result: Optional[str] = None
error: Optional[str] = None
raw: Mapping[str, Any] = field(default_factory=dict)
def render(self) -> str:
if self.success:
return f'success: {self.result}'
return f'error: {self.error}'
@dataclass(frozen=True)
class ToolCall:
"""A single tool invocation proposed by an agent."""
name: str
arguments: Mapping[str, Any] = field(default_factory=dict)
def render(self) -> str:
import json
return f'{self.name}({json.dumps(dict(self.arguments), ensure_ascii=True)})'
@dataclass(frozen=True)
class Step:
"""One reasoning/action/observation step."""
thought: str
tool_call: Optional[ToolCall] = None
observation: Optional[Observation] = None
@dataclass
class Trajectory:
"""Execution trace produced by one agent on one task."""
trajectory_id: str
agent_name: str
task_id: str
steps: Sequence[Step]
success: bool
final_answer: str
score: float = 0.0
notes: Mapping[str, Any] = field(default_factory=dict)
def compact_summary(self) -> str:
parts = [f'trajectory={self.trajectory_id}', f'agent={self.agent_name}', f'success={self.success}']
for step in self.steps:
parts.append(f'thought={step.thought}')
if step.tool_call is not None:
parts.append(f'tool={step.tool_call.render()}')
if step.observation is not None:
parts.append(f'observation={step.observation.render()}')
parts.append(f'final={self.final_answer}')
return ' | '.join(parts)
# Construct valid arguments for Trajectory
step1_observation = Observation(
success=True,
result="Tool executed successfully",
error=None,
raw={"status": "ok"}
)
step1_tool_call = ToolCall(
name="search",
arguments={"query": "python tutorial"}
)
step1 = Step(
thought="I need to search for information",
tool_call=step1_tool_call,
observation=step1_observation
)
step2_observation = Observation(
success=False,
result=None,
error="Connection timeout",
raw={"error_code": 500}
)
step2_tool_call = ToolCall(
name="fetch_url",
arguments={"url": "https://example.com"}
)
step2 = Step(
thought="Let me try fetching a specific URL",
tool_call=step2_tool_call,
observation=step2_observation
)
step3 = Step(
thought="Based on the results, I can provide an answer",
tool_call=None,
observation=None
)
ARGS = {
"trajectory_id": "traj_001",
"agent_name": "gpt4_agent",
"task_id": "task_42",
"steps": [step1, step2, step3],
"success": True,
"final_answer": "Python is a high-level programming language",
"score": 0.85,
"notes": {"attempt": 1, "model_version": "1.0"}
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Trajectory — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Trajectory output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| VerificationDecision |
Ran ran on a synthesized input · constructed an object; no result was computed |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("571a62bc659e3932") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, VerificationDecision: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
from typing import Dict, List, Sequence, Tuple, Any, Mapping
from dataclasses import dataclass, field
torch.manual_seed(0)
@dataclass(frozen=True)
class Experience:
"""A reusable memory item distilled from trajectories."""
experience_id: str
title: str
description: str
content: str
tags: Tuple[str, ...]
source_task_id: str
supporting_trajectory_ids: Tuple[str, ...] = ()
rejected_trajectory_ids: Tuple[str, ...] = ()
metadata: Mapping[str, Any] = field(default_factory=dict)
def searchable_text(self) -> str:
return ' '.join([self.title, self.description, self.content, ' '.join(self.tags), self.source_task_id])
@dataclass(frozen=True)
class Vote:
"""One verifier's decision about a candidate memory."""
agent_name: str
accept: bool
rationale: str
@dataclass(frozen=True)
class VerificationDecision:
"""Routing decision after consensus verification."""
experience: Experience
votes: Sequence[Vote]
destination: str
@property
def accepted_agents(self) -> Tuple[str, ...]:
return tuple((vote.agent_name for vote in self.votes if vote.accept))
experience = Experience(
experience_id="exp_001",
title="Problem Solving Strategy",
description="A novel approach to solving optimization problems",
content="This experience describes a two-phase algorithm combining gradient descent with simulated annealing.",
tags=("optimization", "algorithm", "learning"),
source_task_id="task_alpha",
supporting_trajectory_ids=("traj_001", "traj_002"),
rejected_trajectory_ids=("traj_003",),
metadata={"difficulty": "hard", "success_rate": 0.87}
)
votes = [
Vote(agent_name="agent_alice", accept=True, rationale="Well-structured and novel approach"),
Vote(agent_name="agent_bob", accept=True, rationale="Consistent with best practices"),
Vote(agent_name="agent_charlie", accept=False, rationale="Missing edge case handling"),
]
destination = "memory_buffer_high_value"
ARGS = {
"experience": experience,
"votes": votes,
"destination": destination,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type VerificationDecision — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a VerificationDecision output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| Vote |
Ran ran on a synthesized input · constructed an object; no result was computed |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("c106bc344ca3423b") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Vote: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
from dataclasses import dataclass
torch.manual_seed(0)
@dataclass(frozen=True)
class Vote:
"""One verifier's decision about a candidate memory."""
agent_name: str
accept: bool
rationale: str
ARGS = {
"agent_name": "verifier_001",
"accept": True,
"rationale": "The candidate memory is consistent with the knowledge base and passes all validation checks."
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Vote — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Vote output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| _dedupe_hits |
Ran ran; our contract draft was wrong, not the code |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("4747943e918596b7") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
from typing import Dict, List, Sequence, Tuple, Mapping, Any
from dataclasses import dataclass, field
@dataclass(frozen=True)
class Experience:
"""A reusable memory item distilled from trajectories."""
experience_id: str
title: str
description: str
content: str
tags: Tuple[str, ...]
source_task_id: str
supporting_trajectory_ids: Tuple[str, ...] = ()
rejected_trajectory_ids: Tuple[str, ...] = ()
metadata: Mapping[str, Any] = field(default_factory=dict)
def searchable_text(self) -> str:
return ' '.join([self.title, self.description, self.content, ' '.join(self.tags), self.source_task_id])
@dataclass(frozen=True)
class MemoryHit:
"""A retrieved memory item and its similarity score."""
experience: Experience
score: float
bank: str
# Create sample Experience objects
exp1 = Experience(
experience_id="exp_001",
title="First Experience",
description="This is the first test experience",
content="Some content here",
tags=("tag1", "tag2"),
source_task_id="task_001"
)
exp2 = Experience(
experience_id="exp_002",
title="Second Experience",
description="This is the second test experience",
content="More content",
tags=("tag3",),
source_task_id="task_002"
)
exp3 = Experience(
experience_id="exp_001", # Duplicate ID to test deduplication
title="First Experience Duplicate",
description="Duplicate of first",
content="Different content",
tags=("tag4",),
source_task_id="task_003"
)
# Create MemoryHit objects, including duplicates
hit1 = MemoryHit(experience=exp1, score=0.95, bank="bank_a")
hit2 = MemoryHit(experience=exp2, score=0.87, bank="bank_b")
hit3 = MemoryHit(experience=exp3, score=0.92, bank="bank_c") # Duplicate exp_id
# Create sequence of hits with duplicates
hits = [hit1, hit2, hit3]
ARGS = {
"hits": hits
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| _experience_from_dict |
Ran ran; our contract draft was wrong, not the code |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("e5f491fa3700bf6e") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Experience. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
from typing import Dict, Any
torch.manual_seed(0)
# Construct a minimal valid data dict for _experience_from_dict
data = {
'experience_id': 'exp_001',
'title': 'Sample Experience Title',
'description': 'A detailed description of the experience',
'content': 'The main content of the experience',
'tags': ('tag1', 'tag2', 'tag3'),
'source_task_id': 'task_42',
'supporting_trajectory_ids': ('traj_001', 'traj_002'),
'rejected_trajectory_ids': ('traj_003',),
'metadata': {'key1': 'value1', 'key2': 42}
}
ARGS = {
'data': data
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Experience — a Experience output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Experience output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| _jaccard |
Ran ran, honoured the contract we drafted |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("8e7c99d2b2d8ce78") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
def _jaccard(left: set, right: set) -> float:
if not left or not right:
return 0.0
return len(left & right) / len(left | right)
# Construct valid arguments for _jaccard
left_set = {1, 2, 3, 4, 5}
right_set = {3, 4, 5, 6, 7}
ARGS = {
"left": left_set,
"right": right_set,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| _language_code |
Ran ran; our contract draft was wrong, not the code |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("bf8c7497fd576e6c") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
LANGUAGE_NAME = {'en': 'English', 'ru': 'Russian', 'fr': 'French', 'de': 'German'}
LANGUAGE_CODE = {name.lower(): code for code, name in LANGUAGE_NAME.items()}
def _language_code(value: object) -> str:
raw = str(value).strip()
if len(raw) == 2:
return raw.lower()
return LANGUAGE_CODE.get(raw.lower(), raw.lower())
ARGS = {
'value': 'en'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| _memory_mentions_iso_codes |
Ran ran, violated the contract we drafted |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("2af788ecabcf50b5") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
from typing import Dict, Tuple, Iterable, Mapping, Any
from dataclasses import dataclass, field
@dataclass(frozen=True)
class Experience:
"""A reusable memory item distilled from trajectories."""
experience_id: str
title: str
description: str
content: str
tags: Tuple[str, ...]
source_task_id: str
supporting_trajectory_ids: Tuple[str, ...] = ()
rejected_trajectory_ids: Tuple[str, ...] = ()
metadata: Mapping[str, Any] = field(default_factory=dict)
def searchable_text(self) -> str:
return ' '.join([self.title, self.description, self.content, ' '.join(self.tags), self.source_task_id])
def _memory_mentions_iso_codes(memories: Iterable[Experience]) -> bool:
return any(('iso 639-1' in memory.searchable_text().lower() for memory in memories))
# Create sample Experience objects
experience_1 = Experience(
experience_id="exp_001",
title="Language Standards",
description="Information about ISO 639-1 language codes",
content="ISO 639-1 defines two-letter codes for languages",
tags=("standards", "languages", "iso"),
source_task_id="task_001"
)
experience_2 = Experience(
experience_id="exp_002",
title="Other Topic",
description="This is about something else",
content="No relevant information here",
tags=("other", "unrelated"),
source_task_id="task_002"
)
experience_3 = Experience(
experience_id="exp_003",
title="Programming",
description="Python programming guide",
content="Learn how to code in python",
tags=("python", "coding"),
source_task_id="task_003"
)
memories_list = [experience_1, experience_2, experience_3]
ARGS = {
"memories": memories_list
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| _task_word |
Ran ran; our contract draft was wrong, not the code |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("978206f2f397e75c") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
from dataclasses import dataclass, field
from typing import Any, Dict, Mapping, Optional, Sequence, Tuple
@dataclass(frozen=True)
class Task:
"""A task handled by agents."""
task_id: str
domain: str
instruction: str
metadata: Mapping[str, Any] = field(default_factory=dict)
# Test case 1: Task with word in metadata
task1 = Task(
task_id="task_001",
domain="nlp",
instruction="Find the answer to this question",
metadata={"word": "EXAMPLE"}
)
# Test case 2: Task with word in quotes in instruction
task2 = Task(
task_id="task_002",
domain="vision",
instruction="Extract the word 'apple' from the image",
metadata={}
)
# Test case 3: Task with word as last word in instruction
task3 = Task(
task_id="task_003",
domain="audio",
instruction="Identify the sound pattern.",
metadata={}
)
ARGS = {
"task": task1
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| _tokens |
Ran ran; our contract draft was wrong, not the code |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("549a85e88e7d3a60") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned set. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import re
def _tokens(text: str) -> set:
return set(re.findall('[a-z0-9]+', text.lower()))
ARGS = {
'text': 'Hello World 123 Test ABC 456'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| BaseAgent |
Not yet run unverified (harvested, no recorded run) |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("348c63d8240bb48c") How it ran |
| ConsensusVerifier |
Not yet run unverified (harvested, no recorded run) |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("746538fbeaa1b75a") How it ran |
| ConstructionReport |
Not yet run unverified (harvested, no recorded run) |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("eb3bd6fbbcdd0877") How it ran |
| EDVPipeline |
Not yet run unverified (harvested, no recorded run) |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("2447ee68ca4c6490") How it ran |
| InferenceReport |
Not yet run unverified (harvested, no recorded run) |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("ea6064f3dc27a6fb") How it ran |
| IsoCodeAgent |
Not yet run unverified (harvested, no recorded run) |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("505f5a282720fa3f") How it ran |
| NaturalLanguageAgent |
Not yet run unverified (harvested, no recorded run) |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("dccad036cef55961") How it ran |
| _stable_id |
Not yet run unverified (harvested, no recorded run) |
shidingz/EDV/src/edv/pipeline.py code served (permissive licence) · get_code("0074accb2a0b87e2") How it ran |