@tangle-network/agent-eval 0.107.0 → 0.108.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/README.md +2 -2
- package/dist/adapters/http.d.ts +1 -1
- package/dist/adapters/langchain.d.ts +1 -1
- package/dist/adapters/otel.d.ts +1 -1
- package/dist/benchmarks/index.d.ts +3 -1
- package/dist/benchmarks/index.js +49 -3
- package/dist/campaign/index.d.ts +10 -7
- package/dist/campaign/index.js +72 -3407
- package/dist/campaign/index.js.map +1 -1
- package/dist/chunk-6SKVFBTR.js +4306 -0
- package/dist/chunk-6SKVFBTR.js.map +1 -0
- package/dist/{chunk-G4DLZAV5.js → chunk-OVPVM4JC.js} +1044 -643
- package/dist/chunk-OVPVM4JC.js.map +1 -0
- package/dist/chunk-T6W5ADLG.js +766 -0
- package/dist/chunk-T6W5ADLG.js.map +1 -0
- package/dist/contract/index.d.ts +16 -6
- package/dist/contract/index.js +10 -11
- package/dist/contract/index.js.map +1 -1
- package/dist/{gepa-BmqTrdtg.d.ts → gepa-B3x5Ulcv.d.ts} +3 -40
- package/dist/hosted/index.d.ts +1 -1
- package/dist/index-pPtfoIJO.d.ts +423 -0
- package/dist/index.d.ts +6 -5
- package/dist/index.js +8 -7
- package/dist/index.js.map +1 -1
- package/dist/multishot/index.d.ts +1 -1
- package/dist/openapi.json +1 -1
- package/dist/{pre-registration-x3f0VpxT.d.ts → pre-registration-BUhVPzE7.d.ts} +1 -1
- package/dist/{provenance-CIjRcI6m.d.ts → provenance-DdDhf6cg.d.ts} +3 -2
- package/dist/rl.d.ts +1 -1
- package/dist/rl.js +6 -6
- package/dist/storage-Dw_f7WMt.d.ts +39 -0
- package/dist/{types-CNZ0tHET.d.ts → types-BdIv5dvA.d.ts} +1 -1
- package/docs/improvement-glossary.md +5 -1
- package/package.json +1 -1
- package/dist/chunk-6PF6LXRY.js +0 -861
- package/dist/chunk-6PF6LXRY.js.map +0 -1
- package/dist/chunk-6QDKWHLS.js +0 -223
- package/dist/chunk-6QDKWHLS.js.map +0 -1
- package/dist/chunk-G4DLZAV5.js.map +0 -1
- package/dist/chunk-V75NN2ZR.js +0 -421
- package/dist/chunk-V75NN2ZR.js.map +0 -1
- package/dist/index-C2CC_dry.d.ts +0 -159
package/dist/index-C2CC_dry.d.ts
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import { b as RunSplitTag } from './run-record-I-Z3JNvO.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Shared types for the reference benchmark wrappers under
|
|
5
|
-
* `src/benchmarks/`. Each wrapper exports the three functions in
|
|
6
|
-
* `BenchmarkAdapter` plus its own typed `DatasetItem` shape.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
interface BenchmarkDatasetItem<TPayload = unknown> {
|
|
10
|
-
/** Stable dataset-local item id (used for split assignment + paper
|
|
11
|
-
* references). Unique within a benchmark. */
|
|
12
|
-
id: string;
|
|
13
|
-
/** Free-form payload. Each benchmark defines its own shape. */
|
|
14
|
-
payload: TPayload;
|
|
15
|
-
}
|
|
16
|
-
interface BenchmarkEvaluation {
|
|
17
|
-
/** [0, 1] score for the response on this item. Exact-match
|
|
18
|
-
* benchmarks use 0/1; partial-credit benchmarks may return
|
|
19
|
-
* fractional values. */
|
|
20
|
-
score: number;
|
|
21
|
-
/** Optional bag of raw scoring signals — e.g. parsed numeric
|
|
22
|
-
* answer, regex match, judge sub-scores. */
|
|
23
|
-
raw: Record<string, unknown>;
|
|
24
|
-
}
|
|
25
|
-
/** Common signature implemented by every adapter under `src/benchmarks/*`. */
|
|
26
|
-
interface BenchmarkAdapter<_TItem = unknown, TPayload = unknown> {
|
|
27
|
-
/** Load the dataset for the given split. May hit the network on
|
|
28
|
-
* first call but should be cache-friendly. Adapters that don't
|
|
29
|
-
* ship the dataset itself MUST throw a clearly-marked error
|
|
30
|
-
* pointing the caller at the loader script. */
|
|
31
|
-
loadDataset(split: RunSplitTag): Promise<BenchmarkDatasetItem<TPayload>[]>;
|
|
32
|
-
/** Score a single response. Pure with respect to the inputs. */
|
|
33
|
-
evaluate(item: BenchmarkDatasetItem<TPayload>, response: string): Promise<BenchmarkEvaluation>;
|
|
34
|
-
/** Deterministic split assignment via item id hashing. The
|
|
35
|
-
* fraction of items in each split is implementation-defined but
|
|
36
|
-
* MUST be stable across processes and platforms. */
|
|
37
|
-
assignSplit(itemId: string): RunSplitTag;
|
|
38
|
-
}
|
|
39
|
-
/** Split-assignment seed shared across all benchmarks. Bumping this
|
|
40
|
-
* value reshuffles every split — do NOT do that lightly. */
|
|
41
|
-
declare const BENCHMARK_SPLIT_SEED = "agent-eval-v1";
|
|
42
|
-
/**
|
|
43
|
-
* Assign an item id to one of `'search' | 'dev' | 'holdout'` using a
|
|
44
|
-
* stable 32-bit hash of `${seed}::${id}`. Default proportions:
|
|
45
|
-
*
|
|
46
|
-
* search: 60% (optimization-readable)
|
|
47
|
-
* dev: 20% (held-out for tuning, leak-on-purpose during dev)
|
|
48
|
-
* holdout:20% (paper-grade held-out, gated reads)
|
|
49
|
-
*/
|
|
50
|
-
declare function deterministicSplit(itemId: string, seed?: string): RunSplitTag;
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Synthetic routing dataset. 16 tasks across 4 categories. Used as a
|
|
54
|
-
* deterministic, dependency-free benchmark for any router that maps a
|
|
55
|
-
* natural-language request to one of a fixed set of route labels.
|
|
56
|
-
*
|
|
57
|
-
* Format (see `routing/README.md` for prose):
|
|
58
|
-
*
|
|
59
|
-
* {
|
|
60
|
-
* id: stable per-task ID (matches across processes).
|
|
61
|
-
* category: one of the four route labels.
|
|
62
|
-
* prompt: the user-facing request the router must classify.
|
|
63
|
-
* route: the ground-truth route the router should pick.
|
|
64
|
-
* synonyms: other strings that count as a correct answer.
|
|
65
|
-
* hardNegatives:close-but-wrong route labels — used to detect the
|
|
66
|
-
* "always picks the popular route" failure mode.
|
|
67
|
-
* }
|
|
68
|
-
*
|
|
69
|
-
* The four categories are intentionally cross-domain (file ops,
|
|
70
|
-
* math, search, conversation) so a router that collapses to one
|
|
71
|
-
* category is easy to spot.
|
|
72
|
-
*/
|
|
73
|
-
interface RoutingItem {
|
|
74
|
-
id: string;
|
|
75
|
-
category: 'file' | 'math' | 'search' | 'chat';
|
|
76
|
-
prompt: string;
|
|
77
|
-
/** Canonical correct route label. */
|
|
78
|
-
route: string;
|
|
79
|
-
/** Alternate route labels that also count as correct. */
|
|
80
|
-
synonyms: string[];
|
|
81
|
-
/** Wrong-but-tempting route labels (for analysis, not grading). */
|
|
82
|
-
hardNegatives: string[];
|
|
83
|
-
}
|
|
84
|
-
declare const ROUTING_DATASET: RoutingItem[];
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Routing benchmark — synthetic, dependency-free, ships in the
|
|
88
|
-
* package. 16 cross-category items in `dataset.ts`. See
|
|
89
|
-
* `routing/README.md` for the format.
|
|
90
|
-
*
|
|
91
|
-
* `evaluate` does case-insensitive exact match against the canonical
|
|
92
|
-
* route plus declared synonyms. The first valid route token in the
|
|
93
|
-
* response wins; everything else is ignored. Wrong answers also
|
|
94
|
-
* report whether they hit a hard negative — useful when triaging
|
|
95
|
-
* "always picks the popular route" failure modes.
|
|
96
|
-
*/
|
|
97
|
-
|
|
98
|
-
type RoutingPayload = RoutingItem;
|
|
99
|
-
type RoutingDatasetItem = BenchmarkDatasetItem<RoutingPayload>;
|
|
100
|
-
declare class RoutingAdapter implements BenchmarkAdapter<RoutingDatasetItem, RoutingPayload> {
|
|
101
|
-
loadDataset(split: RunSplitTag): Promise<RoutingDatasetItem[]>;
|
|
102
|
-
evaluate(item: RoutingDatasetItem, response: string): Promise<BenchmarkEvaluation>;
|
|
103
|
-
assignSplit(itemId: string): RunSplitTag;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Pull route-shaped tokens out of a model response. Routes look like
|
|
107
|
-
* `category.action` (`fs.write`, `chat.reply`). Bare alphanumerics
|
|
108
|
-
* are not routes, but `category.action` patterns are robust to most
|
|
109
|
-
* model wrappers (JSON output, prose explanations, code fences).
|
|
110
|
-
*/
|
|
111
|
-
declare function extractRouteTokens(response: string): string[];
|
|
112
|
-
declare const loadDataset: (split: RunSplitTag) => Promise<RoutingDatasetItem[]>;
|
|
113
|
-
declare const evaluate: (item: RoutingDatasetItem, response: string) => Promise<BenchmarkEvaluation>;
|
|
114
|
-
declare const assignSplit: (itemId: string) => RunSplitTag;
|
|
115
|
-
|
|
116
|
-
declare const index$1_ROUTING_DATASET: typeof ROUTING_DATASET;
|
|
117
|
-
type index$1_RoutingAdapter = RoutingAdapter;
|
|
118
|
-
declare const index$1_RoutingAdapter: typeof RoutingAdapter;
|
|
119
|
-
type index$1_RoutingDatasetItem = RoutingDatasetItem;
|
|
120
|
-
type index$1_RoutingItem = RoutingItem;
|
|
121
|
-
type index$1_RoutingPayload = RoutingPayload;
|
|
122
|
-
declare const index$1_assignSplit: typeof assignSplit;
|
|
123
|
-
declare const index$1_evaluate: typeof evaluate;
|
|
124
|
-
declare const index$1_extractRouteTokens: typeof extractRouteTokens;
|
|
125
|
-
declare const index$1_loadDataset: typeof loadDataset;
|
|
126
|
-
declare namespace index$1 {
|
|
127
|
-
export { index$1_ROUTING_DATASET as ROUTING_DATASET, index$1_RoutingAdapter as RoutingAdapter, type index$1_RoutingDatasetItem as RoutingDatasetItem, type index$1_RoutingItem as RoutingItem, type index$1_RoutingPayload as RoutingPayload, index$1_assignSplit as assignSplit, index$1_evaluate as evaluate, index$1_extractRouteTokens as extractRouteTokens, index$1_loadDataset as loadDataset };
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Reference benchmark wrappers — entry point.
|
|
132
|
-
*
|
|
133
|
-
* Core surface (exported here):
|
|
134
|
-
* - The `BenchmarkAdapter` contract.
|
|
135
|
-
* - `deterministicSplit` + `BENCHMARK_SPLIT_SEED` for split assignment.
|
|
136
|
-
* - `routing` — synthetic 16-task router benchmark. The only novel
|
|
137
|
-
* benchmark we built; ships in the package.
|
|
138
|
-
*
|
|
139
|
-
* Example wrappers (under `examples/benchmarks/`, NOT in the bundle):
|
|
140
|
-
* - `gsm8k` — exact-match math reasoning (HF mirror, dataset
|
|
141
|
-
* not bundled).
|
|
142
|
-
* - `swebench-lite` — 30-instance SWE-Bench subset via an external
|
|
143
|
-
* grader command.
|
|
144
|
-
*
|
|
145
|
-
* The example wrappers are reference implementations of `BenchmarkAdapter`.
|
|
146
|
-
* Read them, copy them, adapt them. They're intentionally not in the main
|
|
147
|
-
* entry — every team will configure them differently.
|
|
148
|
-
*/
|
|
149
|
-
|
|
150
|
-
declare const index_BENCHMARK_SPLIT_SEED: typeof BENCHMARK_SPLIT_SEED;
|
|
151
|
-
type index_BenchmarkAdapter<_TItem = unknown, TPayload = unknown> = BenchmarkAdapter<_TItem, TPayload>;
|
|
152
|
-
type index_BenchmarkDatasetItem<TPayload = unknown> = BenchmarkDatasetItem<TPayload>;
|
|
153
|
-
type index_BenchmarkEvaluation = BenchmarkEvaluation;
|
|
154
|
-
declare const index_deterministicSplit: typeof deterministicSplit;
|
|
155
|
-
declare namespace index {
|
|
156
|
-
export { index_BENCHMARK_SPLIT_SEED as BENCHMARK_SPLIT_SEED, type index_BenchmarkAdapter as BenchmarkAdapter, type index_BenchmarkDatasetItem as BenchmarkDatasetItem, type index_BenchmarkEvaluation as BenchmarkEvaluation, index_deterministicSplit as deterministicSplit, index$1 as routing };
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export { BENCHMARK_SPLIT_SEED as B, type BenchmarkAdapter as a, type BenchmarkDatasetItem as b, type BenchmarkEvaluation as c, deterministicSplit as d, index$1 as e, index as i };
|