@trazum/core 1.56.0 → 1.56.2
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/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/maintainers.d.ts +81 -0
- package/dist/maintainers.d.ts.map +1 -0
- package/dist/maintainers.js +97 -0
- package/dist/maintainers.js.map +1 -0
- package/dist/rule-yield.d.ts +134 -0
- package/dist/rule-yield.d.ts.map +1 -0
- package/dist/rule-yield.js +100 -0
- package/dist/rule-yield.js.map +1 -0
- package/dist/rules.d.ts +19 -1
- package/dist/rules.d.ts.map +1 -1
- package/dist/rules.js +21 -2
- package/dist/rules.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +8 -0
- package/src/maintainers.ts +128 -0
- package/src/rule-yield.ts +205 -0
- package/src/rules.ts +21 -2
package/dist/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export { measuredUsage, labelCoverage, MIN_SCALE_DAYS, SCALE_TO_DAYS } from './m
|
|
|
15
15
|
export { assignSources, fleetRollup } from './fleet.js';
|
|
16
16
|
export { rollUp } from './rollup.js';
|
|
17
17
|
export { heartbeats } from './heartbeat.js';
|
|
18
|
+
export { ruleYield } from './rule-yield.js';
|
|
18
19
|
export { buildPlan, planLabelName, parsePlanDocument, PLAN_ACTION_KINDS } from './plan.js';
|
|
19
20
|
export type { PlanParseFailure, PlanParseResult } from './plan.js';
|
|
20
21
|
export type { PlanAction, PlanActionKind, PlanAssumption, PlanDocument } from './plan.js';
|
|
@@ -61,6 +62,7 @@ export type { BucketedReport, BucketedSlice, ConnectorDescriptor, ConnectorGranu
|
|
|
61
62
|
export type { HistoryDocument, HistoryRun, RepeatedPlanAction, StoredReport, UnmeasuredStretch, OverlappingReports, } from './history.js';
|
|
62
63
|
export type { CannotTellReason, PlanVerification, VerifiedAction, VerifyOutcome } from './verify.js';
|
|
63
64
|
export type { FleetSource, FleetRollup } from './fleet.js';
|
|
65
|
+
export type { RuleYield, RuleYieldReport } from './rule-yield.js';
|
|
64
66
|
export type { Heartbeat, HeartbeatInput, HeartbeatKind, HeartbeatReport, HeartbeatVerdict, } from './heartbeat.js';
|
|
65
67
|
export type { RollupInput, RollupDocument, RollupContributor, RollupDay, RollupCaveat, ContributorGap, UnmergedFinding, SilentRun, } from './rollup.js';
|
|
66
68
|
export type { MeasuredUsage, LabelCoverage } from './measured-profile.js';
|
|
@@ -88,6 +90,8 @@ export type { BillLevers, BillLeverOptions, LeverId, SliceLevers } from './lever
|
|
|
88
90
|
export { DETECTABLE_LANGUAGES, detectTextLanguage } from './language.js';
|
|
89
91
|
export { countSentences, profilePrompt } from './profile.js';
|
|
90
92
|
export { PHRASE_LANGUAGES } from './phrases.js';
|
|
93
|
+
export { DICTIONARY_STANDING, dictionaryStanding, languagesWithStanding, } from './maintainers.js';
|
|
94
|
+
export type { DictionaryRecord, DictionaryStanding } from './maintainers.js';
|
|
91
95
|
export { toPromptfoo } from './promptfoo.js';
|
|
92
96
|
export { toOtlpMetrics } from './otlp.js';
|
|
93
97
|
export type { OtlpAttribute, OtlpDataPoint, OtlpInput, OtlpMetric, OtlpPayload } from './otlp.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,WAAW,EACX,cAAc,EACd,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,UAAU,EACV,cAAc,EACd,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,QAAQ,GACT,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,WAAW,GACZ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EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -20,6 +20,7 @@ export { measuredUsage, labelCoverage, MIN_SCALE_DAYS, SCALE_TO_DAYS } from './m
|
|
|
20
20
|
export { assignSources, fleetRollup } from './fleet.js';
|
|
21
21
|
export { rollUp } from './rollup.js';
|
|
22
22
|
export { heartbeats } from './heartbeat.js';
|
|
23
|
+
export { ruleYield } from './rule-yield.js';
|
|
23
24
|
export { buildPlan, planLabelName, parsePlanDocument, PLAN_ACTION_KINDS } from './plan.js';
|
|
24
25
|
export { verifyPlan } from './verify.js';
|
|
25
26
|
export { buildHistory, storedReportFrom, MIN_RUN } from './history.js';
|
|
@@ -66,6 +67,7 @@ export { billLevers } from './levers.js';
|
|
|
66
67
|
export { DETECTABLE_LANGUAGES, detectTextLanguage } from './language.js';
|
|
67
68
|
export { countSentences, profilePrompt } from './profile.js';
|
|
68
69
|
export { PHRASE_LANGUAGES } from './phrases.js';
|
|
70
|
+
export { DICTIONARY_STANDING, dictionaryStanding, languagesWithStanding, } from './maintainers.js';
|
|
69
71
|
export { toPromptfoo } from './promptfoo.js';
|
|
70
72
|
export { toOtlpMetrics } from './otlp.js';
|
|
71
73
|
export { SUGGEST_SYSTEM_PROMPT, applyRewrites, rejectionText, suggestRewrites } from './suggest.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,WAAW,EACX,cAAc,EACd,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,UAAU,EACV,cAAc,EACd,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,QAAQ,GACT,MAAM,YAAY,CAAC;AAWpB,OAAO,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAA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
+
* The trimming dictionaries in `phrases.ts` cover seven languages. Two of them
|
|
5
|
+
* are languages this project reports in, which is the only evidence in this
|
|
6
|
+
* repository that somebody here reads them. The other five were written by the
|
|
7
|
+
* same process that wrote the rules, and nothing in the history says a person
|
|
8
|
+
* who speaks French, German, Portuguese, Italian or Dutch has ever looked at
|
|
9
|
+
* the entries and agreed that removing one leaves the prompt asking for the
|
|
10
|
+
* same thing.
|
|
11
|
+
*
|
|
12
|
+
* **That is a stronger claim than "an eighth language is not scheduled".** The
|
|
13
|
+
* roadmap has said for several arcs that a dictionary is a judgement about a
|
|
14
|
+
* language and this project will not make it in a language nobody here reads.
|
|
15
|
+
* Seven dictionaries shipped anyway. The rule and the catalogue disagree, and
|
|
16
|
+
* the catalogue is the one users meet.
|
|
17
|
+
*
|
|
18
|
+
* ## The evidence that reading the list is not enough
|
|
19
|
+
*
|
|
20
|
+
* `INTENSIFIERS` shipped `molto`, `muito` and `heel` — each of which is an
|
|
21
|
+
* intensifier *and* a quantifier, so dropping one turns "you have much time"
|
|
22
|
+
* into "you have time". Three languages, the same mistake, and it survived
|
|
23
|
+
* being read. It was caught by running prompts through the rules, which is a
|
|
24
|
+
* far weaker instrument than a speaker and is what this project actually had.
|
|
25
|
+
*
|
|
26
|
+
* One bug found by the weaker instrument is not a review. It is the reason to
|
|
27
|
+
* stop describing the two situations with one word.
|
|
28
|
+
*
|
|
29
|
+
* ## What this module refuses
|
|
30
|
+
*
|
|
31
|
+
* - **Deleting the five.** They fire, they save tokens, and a Dutch prompt is
|
|
32
|
+
* better served by an unreviewed dictionary that says so than by silence.
|
|
33
|
+
* - **Calling them equal to the two.** `a legibility floor outranks a visual
|
|
34
|
+
* tier`, and one line of admission in the report costs nothing.
|
|
35
|
+
* - **Naming a person.** A maintainer is somebody who accepts the role in
|
|
36
|
+
* public; inventing one here would be the same lie in the other direction.
|
|
37
|
+
* Until one exists, `unreviewed` is the whole of what can be said.
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* Whether anybody who reads the language has passed over its entries.
|
|
41
|
+
*
|
|
42
|
+
* Deliberately two values. A scale — "partially reviewed", "spot-checked" —
|
|
43
|
+
* would be a number nobody can produce evidence for, and the honest answer to
|
|
44
|
+
* "has a speaker signed off on this list" is yes or no.
|
|
45
|
+
*/
|
|
46
|
+
export type DictionaryStanding =
|
|
47
|
+
/** Somebody here reads it. This project reports in it. */
|
|
48
|
+
'reviewed'
|
|
49
|
+
/** Nobody here has been shown to read it. The entries stand unchecked. */
|
|
50
|
+
| 'unreviewed';
|
|
51
|
+
export interface DictionaryRecord {
|
|
52
|
+
/** The language code, as `PHRASE_LANGUAGES` holds it. */
|
|
53
|
+
code: string;
|
|
54
|
+
standing: DictionaryStanding;
|
|
55
|
+
/**
|
|
56
|
+
* What was actually done to these entries — never what was intended.
|
|
57
|
+
*
|
|
58
|
+
* English rather than a code, because this string is evidence a reader
|
|
59
|
+
* weighs, not a value a program branches on.
|
|
60
|
+
*/
|
|
61
|
+
checkedBy: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The standing of each shipped dictionary.
|
|
65
|
+
*
|
|
66
|
+
* `maintainers.test.js` derives the `reviewed` set from the report catalogues
|
|
67
|
+
* on disk rather than from this list, so adding a French report translation
|
|
68
|
+
* fails the build here until somebody decides what it means — which is the
|
|
69
|
+
* moment the question is actually answerable, and not before.
|
|
70
|
+
*/
|
|
71
|
+
export declare const DICTIONARY_STANDING: Readonly<Record<string, DictionaryRecord>>;
|
|
72
|
+
/** The record for a language, or null when the dictionaries do not cover it. */
|
|
73
|
+
export declare function dictionaryStanding(code: string): DictionaryRecord | null;
|
|
74
|
+
/**
|
|
75
|
+
* The codes with a given standing, in catalogue order.
|
|
76
|
+
*
|
|
77
|
+
* Order comes from the argument rather than from this module's object literal,
|
|
78
|
+
* so a caller that lists languages in report order gets them back in it.
|
|
79
|
+
*/
|
|
80
|
+
export declare function languagesWithStanding(codes: readonly string[], standing: DictionaryStanding): readonly string[];
|
|
81
|
+
//# sourceMappingURL=maintainers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maintainers.d.ts","sourceRoot":"","sources":["../src/maintainers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB;AAC5B,0DAA0D;AACxD,UAAU;AACZ,0EAA0E;GACxE,YAAY,CAAC;AAEjB,MAAM,WAAW,gBAAgB;IAC/B,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,kBAAkB,CAAC;IAC7B;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAoC1E,CAAC;AAEF,gFAAgF;AAChF,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAExE;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,QAAQ,EAAE,kBAAkB,GAC3B,SAAS,MAAM,EAAE,CAEnB"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Who read the dictionary.
|
|
3
|
+
*
|
|
4
|
+
* The trimming dictionaries in `phrases.ts` cover seven languages. Two of them
|
|
5
|
+
* are languages this project reports in, which is the only evidence in this
|
|
6
|
+
* repository that somebody here reads them. The other five were written by the
|
|
7
|
+
* same process that wrote the rules, and nothing in the history says a person
|
|
8
|
+
* who speaks French, German, Portuguese, Italian or Dutch has ever looked at
|
|
9
|
+
* the entries and agreed that removing one leaves the prompt asking for the
|
|
10
|
+
* same thing.
|
|
11
|
+
*
|
|
12
|
+
* **That is a stronger claim than "an eighth language is not scheduled".** The
|
|
13
|
+
* roadmap has said for several arcs that a dictionary is a judgement about a
|
|
14
|
+
* language and this project will not make it in a language nobody here reads.
|
|
15
|
+
* Seven dictionaries shipped anyway. The rule and the catalogue disagree, and
|
|
16
|
+
* the catalogue is the one users meet.
|
|
17
|
+
*
|
|
18
|
+
* ## The evidence that reading the list is not enough
|
|
19
|
+
*
|
|
20
|
+
* `INTENSIFIERS` shipped `molto`, `muito` and `heel` — each of which is an
|
|
21
|
+
* intensifier *and* a quantifier, so dropping one turns "you have much time"
|
|
22
|
+
* into "you have time". Three languages, the same mistake, and it survived
|
|
23
|
+
* being read. It was caught by running prompts through the rules, which is a
|
|
24
|
+
* far weaker instrument than a speaker and is what this project actually had.
|
|
25
|
+
*
|
|
26
|
+
* One bug found by the weaker instrument is not a review. It is the reason to
|
|
27
|
+
* stop describing the two situations with one word.
|
|
28
|
+
*
|
|
29
|
+
* ## What this module refuses
|
|
30
|
+
*
|
|
31
|
+
* - **Deleting the five.** They fire, they save tokens, and a Dutch prompt is
|
|
32
|
+
* better served by an unreviewed dictionary that says so than by silence.
|
|
33
|
+
* - **Calling them equal to the two.** `a legibility floor outranks a visual
|
|
34
|
+
* tier`, and one line of admission in the report costs nothing.
|
|
35
|
+
* - **Naming a person.** A maintainer is somebody who accepts the role in
|
|
36
|
+
* public; inventing one here would be the same lie in the other direction.
|
|
37
|
+
* Until one exists, `unreviewed` is the whole of what can be said.
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* The standing of each shipped dictionary.
|
|
41
|
+
*
|
|
42
|
+
* `maintainers.test.js` derives the `reviewed` set from the report catalogues
|
|
43
|
+
* on disk rather than from this list, so adding a French report translation
|
|
44
|
+
* fails the build here until somebody decides what it means — which is the
|
|
45
|
+
* moment the question is actually answerable, and not before.
|
|
46
|
+
*/
|
|
47
|
+
export const DICTIONARY_STANDING = {
|
|
48
|
+
en: {
|
|
49
|
+
code: 'en',
|
|
50
|
+
standing: 'reviewed',
|
|
51
|
+
checkedBy: 'the report is written in it, and the entries were revised by somebody reading them',
|
|
52
|
+
},
|
|
53
|
+
es: {
|
|
54
|
+
code: 'es',
|
|
55
|
+
standing: 'reviewed',
|
|
56
|
+
checkedBy: 'the report is written in it, and the entries were revised by somebody reading them',
|
|
57
|
+
},
|
|
58
|
+
fr: {
|
|
59
|
+
code: 'fr',
|
|
60
|
+
standing: 'unreviewed',
|
|
61
|
+
checkedBy: 'run through the rules against sample prompts; no speaker has agreed to the entries',
|
|
62
|
+
},
|
|
63
|
+
de: {
|
|
64
|
+
code: 'de',
|
|
65
|
+
standing: 'unreviewed',
|
|
66
|
+
checkedBy: 'run through the rules against sample prompts; no speaker has agreed to the entries',
|
|
67
|
+
},
|
|
68
|
+
pt: {
|
|
69
|
+
code: 'pt',
|
|
70
|
+
standing: 'unreviewed',
|
|
71
|
+
checkedBy: 'run through the rules against sample prompts; no speaker has agreed to the entries',
|
|
72
|
+
},
|
|
73
|
+
it: {
|
|
74
|
+
code: 'it',
|
|
75
|
+
standing: 'unreviewed',
|
|
76
|
+
checkedBy: 'run through the rules against sample prompts; no speaker has agreed to the entries',
|
|
77
|
+
},
|
|
78
|
+
nl: {
|
|
79
|
+
code: 'nl',
|
|
80
|
+
standing: 'unreviewed',
|
|
81
|
+
checkedBy: 'run through the rules against sample prompts; no speaker has agreed to the entries',
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
/** The record for a language, or null when the dictionaries do not cover it. */
|
|
85
|
+
export function dictionaryStanding(code) {
|
|
86
|
+
return DICTIONARY_STANDING[code] ?? null;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* The codes with a given standing, in catalogue order.
|
|
90
|
+
*
|
|
91
|
+
* Order comes from the argument rather than from this module's object literal,
|
|
92
|
+
* so a caller that lists languages in report order gets them back in it.
|
|
93
|
+
*/
|
|
94
|
+
export function languagesWithStanding(codes, standing) {
|
|
95
|
+
return codes.filter((code) => DICTIONARY_STANDING[code]?.standing === standing);
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingUR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,CAAC;AAClF,CAAC"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which rules actually recover anything, and how much.
|
|
3
|
+
*
|
|
4
|
+
* The README says plainly that the deterministic rules recover about one per
|
|
5
|
+
* cent, and that is the fair complaint about this tool. It is also an
|
|
6
|
+
* **aggregate**, and an aggregate is where a distribution goes to hide: seven
|
|
7
|
+
* rules recovering one per cent between them could be seven rules each doing a
|
|
8
|
+
* seventh of the work, or two rules doing all of it beside five that have never
|
|
9
|
+
* changed a byte of anybody's prompt.
|
|
10
|
+
*
|
|
11
|
+
* Nobody here had measured which. That is the wrong place to start an arc
|
|
12
|
+
* about raising the ceiling — what to add on the model's side of the line is a
|
|
13
|
+
* question about what the dictionary side already covers, and "about one per
|
|
14
|
+
* cent" does not answer it.
|
|
15
|
+
*
|
|
16
|
+
* **Two numbers per rule, and they are not the same number.**
|
|
17
|
+
*
|
|
18
|
+
* - **Alone** is what the rule saves when it is the only one running.
|
|
19
|
+
* - **Marginal** is what the whole set loses when the rule is removed.
|
|
20
|
+
*
|
|
21
|
+
* They diverge exactly where rules overlap, which is most of the interesting
|
|
22
|
+
* cases: `duplicate-lines` and `duplicate-blocks` both find a repeated stanza,
|
|
23
|
+
* so each has a real `alone` and a `marginal` near zero. Reporting either
|
|
24
|
+
* figure by itself would be wrong in a different direction — `alone` alone
|
|
25
|
+
* makes an overlapping rule look load-bearing, and `marginal` alone makes it
|
|
26
|
+
* look inert. The report carries both and **never reconciles them into one**,
|
|
27
|
+
* for the same reason a measurement and a projection are never added here.
|
|
28
|
+
*
|
|
29
|
+
* **Inert is a fact about the corpus, never about the rule.** A rule that finds
|
|
30
|
+
* nothing across twenty-one files has not been shown to be useless; it has been
|
|
31
|
+
* shown that these twenty-one files do not contain what it looks for. The
|
|
32
|
+
* distinction is the whole difference between "delete this rule" and "measure
|
|
33
|
+
* it on something else", and this module refuses to make the first claim.
|
|
34
|
+
*
|
|
35
|
+
* Browser-safe: prompts in, arithmetic out, no filesystem.
|
|
36
|
+
*/
|
|
37
|
+
import type { OptimizeOptions, RuleId } from './types.js';
|
|
38
|
+
export interface RuleYield {
|
|
39
|
+
id: RuleId;
|
|
40
|
+
/** Tokens saved when this rule is the only one running, across every prompt. */
|
|
41
|
+
alone: number;
|
|
42
|
+
/**
|
|
43
|
+
* Tokens the full set loses when this rule is removed.
|
|
44
|
+
*
|
|
45
|
+
* Zero with a non-zero `alone` means every token it finds is found by
|
|
46
|
+
* something else too — an overlap, not a defect, and not a reason to delete
|
|
47
|
+
* anything without knowing which rule is the better one to keep.
|
|
48
|
+
*/
|
|
49
|
+
marginal: number;
|
|
50
|
+
/** How many prompts it changed at all, running alone. */
|
|
51
|
+
prompts: number;
|
|
52
|
+
}
|
|
53
|
+
export interface RuleYieldReport {
|
|
54
|
+
schemaVersion: 1;
|
|
55
|
+
/** Prompts measured. */
|
|
56
|
+
prompts: number;
|
|
57
|
+
/** Tokens across every prompt before any rule ran. */
|
|
58
|
+
tokensBefore: number;
|
|
59
|
+
/**
|
|
60
|
+
* Tokens **the rules** save across every prompt.
|
|
61
|
+
*
|
|
62
|
+
* The whole run's saving minus the floor below, because they are not the
|
|
63
|
+
* same thing and the first version of this module reported the difference as
|
|
64
|
+
* if it were the rules' work. Run over a corpus the rules do not touch, that
|
|
65
|
+
* version said the optimiser saved twenty-one tokens and every rule was
|
|
66
|
+
* redundant — a sentence assembled out of somebody else's arithmetic.
|
|
67
|
+
*/
|
|
68
|
+
tokensSaved: number;
|
|
69
|
+
/**
|
|
70
|
+
* Tokens the optimiser saves with **every rule disabled**.
|
|
71
|
+
*
|
|
72
|
+
* Normalisation the optimiser does regardless of the rule set. Named rather
|
|
73
|
+
* than folded in: it is a real saving and it is not a rule's, and a report
|
|
74
|
+
* that credited it to the rules would be flattering exactly the thing this
|
|
75
|
+
* measurement exists to be honest about.
|
|
76
|
+
*/
|
|
77
|
+
floor: number;
|
|
78
|
+
/** Per rule, largest `marginal` first, then largest `alone`. */
|
|
79
|
+
rules: RuleYield[];
|
|
80
|
+
/**
|
|
81
|
+
* `alone` summed over every rule.
|
|
82
|
+
*
|
|
83
|
+
* Stated beside `tokensSaved` and deliberately not reconciled with it: the
|
|
84
|
+
* gap between them **is** the overlap, and a single "total" would be the one
|
|
85
|
+
* number that cannot be true. Larger than `tokensSaved` means rules are
|
|
86
|
+
* finding the same tokens; equal means they are disjoint on this corpus.
|
|
87
|
+
*/
|
|
88
|
+
sumOfAlone: number;
|
|
89
|
+
/**
|
|
90
|
+
* Rules that save something alone and nothing at the margin — every token
|
|
91
|
+
* they find, another rule finds too. On **this corpus**.
|
|
92
|
+
*/
|
|
93
|
+
redundantHere: RuleId[];
|
|
94
|
+
/**
|
|
95
|
+
* Rules that changed nothing at all — they never fired. On **this corpus**,
|
|
96
|
+
* which is the only claim the arithmetic supports: a rule that finds nothing
|
|
97
|
+
* in these files has not been shown to find nothing anywhere.
|
|
98
|
+
*/
|
|
99
|
+
inertHere: RuleId[];
|
|
100
|
+
/**
|
|
101
|
+
* Rules that **fired and recovered nothing**: they changed the prompt and
|
|
102
|
+
* the token count did not move.
|
|
103
|
+
*
|
|
104
|
+
* Kept apart from `inertHere`, because the two look identical in a saving
|
|
105
|
+
* column and mean opposite things. A rule that never fires has not been
|
|
106
|
+
* exercised; a rule that fires and saves nothing has been exercised and is
|
|
107
|
+
* altering somebody's prompt for no measured benefit — which is a finding
|
|
108
|
+
* about the rule rather than about the corpus, and the one this measurement
|
|
109
|
+
* was least likely to produce and most worth producing.
|
|
110
|
+
*
|
|
111
|
+
* `emphasis` lands here on a prompt whose shouted words it lowercases: same
|
|
112
|
+
* words, same count, different instruction.
|
|
113
|
+
*/
|
|
114
|
+
firedWithoutSavingHere: RuleId[];
|
|
115
|
+
/**
|
|
116
|
+
* How the tokens were counted, so the reader knows the margin.
|
|
117
|
+
*
|
|
118
|
+
* `heuristic` carries the estimator's documented band, and every figure here
|
|
119
|
+
* inherits it — a rule whose marginal yield is a handful of tokens is inside
|
|
120
|
+
* the noise, and the report says which counter it used rather than leaving
|
|
121
|
+
* somebody to assume an exact one.
|
|
122
|
+
*/
|
|
123
|
+
tokenSource: 'heuristic' | 'external';
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Measures each rule's yield over a set of prompts.
|
|
127
|
+
*
|
|
128
|
+
* `rules` is the full set to measure — the caller passes it rather than this
|
|
129
|
+
* module reaching for the catalogue, so a subset can be measured and so the
|
|
130
|
+
* list has one home. Every run uses the same options, so the level and the
|
|
131
|
+
* token counter are the caller's and not this module's assumption.
|
|
132
|
+
*/
|
|
133
|
+
export declare function ruleYield(prompts: string[], rules: readonly RuleId[], options?: OptimizeOptions): RuleYieldReport;
|
|
134
|
+
//# sourceMappingURL=rule-yield.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule-yield.d.ts","sourceRoot":"","sources":["../src/rule-yield.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAE1D,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,gFAAgF;IAChF,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;OAMG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,aAAa,EAAE,CAAC,CAAC;IACjB,wBAAwB;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,YAAY,EAAE,MAAM,CAAC;IACrB;;;;;;;;OAQG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;;;OAOG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB;;;;;;;OAOG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB;;;;OAIG;IACH,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB;;;;;;;;;;;;;OAaG;IACH,sBAAsB,EAAE,MAAM,EAAE,CAAC;IACjC;;;;;;;OAOG;IACH,WAAW,EAAE,WAAW,GAAG,UAAU,CAAC;CACvC;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CACvB,OAAO,EAAE,MAAM,EAAE,EACjB,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,OAAO,GAAE,eAAoB,GAC5B,eAAe,CA+DjB"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which rules actually recover anything, and how much.
|
|
3
|
+
*
|
|
4
|
+
* The README says plainly that the deterministic rules recover about one per
|
|
5
|
+
* cent, and that is the fair complaint about this tool. It is also an
|
|
6
|
+
* **aggregate**, and an aggregate is where a distribution goes to hide: seven
|
|
7
|
+
* rules recovering one per cent between them could be seven rules each doing a
|
|
8
|
+
* seventh of the work, or two rules doing all of it beside five that have never
|
|
9
|
+
* changed a byte of anybody's prompt.
|
|
10
|
+
*
|
|
11
|
+
* Nobody here had measured which. That is the wrong place to start an arc
|
|
12
|
+
* about raising the ceiling — what to add on the model's side of the line is a
|
|
13
|
+
* question about what the dictionary side already covers, and "about one per
|
|
14
|
+
* cent" does not answer it.
|
|
15
|
+
*
|
|
16
|
+
* **Two numbers per rule, and they are not the same number.**
|
|
17
|
+
*
|
|
18
|
+
* - **Alone** is what the rule saves when it is the only one running.
|
|
19
|
+
* - **Marginal** is what the whole set loses when the rule is removed.
|
|
20
|
+
*
|
|
21
|
+
* They diverge exactly where rules overlap, which is most of the interesting
|
|
22
|
+
* cases: `duplicate-lines` and `duplicate-blocks` both find a repeated stanza,
|
|
23
|
+
* so each has a real `alone` and a `marginal` near zero. Reporting either
|
|
24
|
+
* figure by itself would be wrong in a different direction — `alone` alone
|
|
25
|
+
* makes an overlapping rule look load-bearing, and `marginal` alone makes it
|
|
26
|
+
* look inert. The report carries both and **never reconciles them into one**,
|
|
27
|
+
* for the same reason a measurement and a projection are never added here.
|
|
28
|
+
*
|
|
29
|
+
* **Inert is a fact about the corpus, never about the rule.** A rule that finds
|
|
30
|
+
* nothing across twenty-one files has not been shown to be useless; it has been
|
|
31
|
+
* shown that these twenty-one files do not contain what it looks for. The
|
|
32
|
+
* distinction is the whole difference between "delete this rule" and "measure
|
|
33
|
+
* it on something else", and this module refuses to make the first claim.
|
|
34
|
+
*
|
|
35
|
+
* Browser-safe: prompts in, arithmetic out, no filesystem.
|
|
36
|
+
*/
|
|
37
|
+
import { optimize } from './optimize.js';
|
|
38
|
+
/**
|
|
39
|
+
* Measures each rule's yield over a set of prompts.
|
|
40
|
+
*
|
|
41
|
+
* `rules` is the full set to measure — the caller passes it rather than this
|
|
42
|
+
* module reaching for the catalogue, so a subset can be measured and so the
|
|
43
|
+
* list has one home. Every run uses the same options, so the level and the
|
|
44
|
+
* token counter are the caller's and not this module's assumption.
|
|
45
|
+
*/
|
|
46
|
+
export function ruleYield(prompts, rules, options = {}) {
|
|
47
|
+
const run = (disableRules) => prompts.map((prompt) => optimize(prompt, { ...options, disableRules }));
|
|
48
|
+
const whole = run([]);
|
|
49
|
+
const tokensBefore = whole.reduce((sum, result) => sum + result.tokensBefore, 0);
|
|
50
|
+
const wholeSaved = whole.reduce((sum, result) => sum + result.tokensSaved, 0);
|
|
51
|
+
/**
|
|
52
|
+
* What the optimiser saves with every rule off.
|
|
53
|
+
*
|
|
54
|
+
* Whitespace normalisation and the like happen either way, and crediting
|
|
55
|
+
* them to the rules is how "the rules recover about one per cent" survives
|
|
56
|
+
* on a corpus where the rules recover nothing.
|
|
57
|
+
*/
|
|
58
|
+
const floorResults = run([...rules]);
|
|
59
|
+
const floor = floorResults.reduce((sum, result) => sum + result.tokensSaved, 0);
|
|
60
|
+
const tokensSaved = Math.max(0, wholeSaved - floor);
|
|
61
|
+
const measured = rules.map((id) => {
|
|
62
|
+
// Alone: everything else off.
|
|
63
|
+
const only = run(rules.filter((other) => other !== id));
|
|
64
|
+
const alone = Math.max(0, only.reduce((sum, result) => sum + result.tokensSaved, 0) - floor);
|
|
65
|
+
// Changed against the floor's own output, not against the original: the
|
|
66
|
+
// normalisation changes every prompt, and counting that as this rule
|
|
67
|
+
// having fired is how every rule came back as touching every file.
|
|
68
|
+
const changed = only.filter((result, index) => result.optimized !== floorResults[index]?.optimized).length;
|
|
69
|
+
// Marginal: everything on but this one.
|
|
70
|
+
const without = run([id]);
|
|
71
|
+
const withoutSaved = without.reduce((sum, result) => sum + result.tokensSaved, 0);
|
|
72
|
+
return {
|
|
73
|
+
id,
|
|
74
|
+
alone,
|
|
75
|
+
// Never negative: removing a rule cannot make the set save more, and a
|
|
76
|
+
// rounding artefact that said it did would be a finding nobody could act
|
|
77
|
+
// on. Clamped rather than reported, because the clamp is the honest
|
|
78
|
+
// reading of a difference inside the counter's own noise.
|
|
79
|
+
marginal: Math.max(0, wholeSaved - withoutSaved),
|
|
80
|
+
prompts: changed,
|
|
81
|
+
};
|
|
82
|
+
});
|
|
83
|
+
measured.sort((a, b) => b.marginal - a.marginal || b.alone - a.alone);
|
|
84
|
+
return {
|
|
85
|
+
schemaVersion: 1,
|
|
86
|
+
prompts: prompts.length,
|
|
87
|
+
tokensBefore,
|
|
88
|
+
tokensSaved,
|
|
89
|
+
floor,
|
|
90
|
+
rules: measured,
|
|
91
|
+
sumOfAlone: measured.reduce((sum, rule) => sum + rule.alone, 0),
|
|
92
|
+
redundantHere: measured.filter((rule) => rule.alone > 0 && rule.marginal === 0).map((rule) => rule.id),
|
|
93
|
+
inertHere: measured.filter((rule) => rule.prompts === 0).map((rule) => rule.id),
|
|
94
|
+
firedWithoutSavingHere: measured
|
|
95
|
+
.filter((rule) => rule.prompts > 0 && rule.alone === 0)
|
|
96
|
+
.map((rule) => rule.id),
|
|
97
|
+
tokenSource: whole[0]?.tokenSource ?? 'heuristic',
|
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,CAAC,CAAC,KAAK,CAAC,CAAC;IAEtE,OAAO;QACL,aAAa,EAAE,CAAC;QAChB,OAAO,EAAE,OAAO,CAAC,MAAM;QACvB,YAAY;QACZ,WAAW;QACX,KAAK;QACL,KAAK,EAAE,QAAQ;QACf,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QAC/D,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,IAAI,IAAI,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QACtG,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/E,sBAAsB,EAAE,QAAQ;aAC7B,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,IAAI,CAAC,KAAK,KAAK,CAAC,CAAC;aACtD,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QACzB,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,WAAW,IAAI,WAAW;KAClD,CAAC;AACJ,CAAC"}
|
package/dist/rules.d.ts
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
import type { Rule } from './types.js';
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Every rule, in the order they must run.
|
|
4
|
+
*
|
|
5
|
+
* **The order decides what the reader is told, not just how fast this runs.**
|
|
6
|
+
* A repeated stanza is a repeated *block* and also a set of repeated *lines*,
|
|
7
|
+
* so all three of the deletion rules can find it and whichever runs first
|
|
8
|
+
* takes it. Coarsest first means the report says "one repeated paragraph"
|
|
9
|
+
* rather than "three repeated lines" for the same saving — the same number
|
|
10
|
+
* attached to a sentence somebody can act on instead of three they have to
|
|
11
|
+
* reassemble.
|
|
12
|
+
*
|
|
13
|
+
* That was an unstated consequence until `rules --measure` made the overlap
|
|
14
|
+
* visible: the leave-one-out measurement credits each of the three with the
|
|
15
|
+
* whole saving, because each of them *would* have caught it alone. The applied
|
|
16
|
+
* run credits exactly one, and this list is what picks which.
|
|
17
|
+
*
|
|
18
|
+
* `rules.test.js` pins both facts, so a reorder that quietly changes the
|
|
19
|
+
* attribution fails the build rather than changing what users read.
|
|
20
|
+
*/
|
|
3
21
|
export declare const RULES: readonly Rule[];
|
|
4
22
|
export declare function getRule(id: string): Rule | undefined;
|
|
5
23
|
//# sourceMappingURL=rules.d.ts.map
|
package/dist/rules.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../src/rules.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAiSvC
|
|
1
|
+
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../src/rules.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAiSvC;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,KAAK,EAAE,SAAS,IAAI,EAiBhC,CAAC;AAEF,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAEpD"}
|
package/dist/rules.js
CHANGED
|
@@ -255,9 +255,28 @@ const nearDuplicateBlocksRule = {
|
|
|
255
255
|
return { text: kept.join('\n\n'), hits };
|
|
256
256
|
},
|
|
257
257
|
};
|
|
258
|
-
/**
|
|
258
|
+
/**
|
|
259
|
+
* Every rule, in the order they must run.
|
|
260
|
+
*
|
|
261
|
+
* **The order decides what the reader is told, not just how fast this runs.**
|
|
262
|
+
* A repeated stanza is a repeated *block* and also a set of repeated *lines*,
|
|
263
|
+
* so all three of the deletion rules can find it and whichever runs first
|
|
264
|
+
* takes it. Coarsest first means the report says "one repeated paragraph"
|
|
265
|
+
* rather than "three repeated lines" for the same saving — the same number
|
|
266
|
+
* attached to a sentence somebody can act on instead of three they have to
|
|
267
|
+
* reassemble.
|
|
268
|
+
*
|
|
269
|
+
* That was an unstated consequence until `rules --measure` made the overlap
|
|
270
|
+
* visible: the leave-one-out measurement credits each of the three with the
|
|
271
|
+
* whole saving, because each of them *would* have caught it alone. The applied
|
|
272
|
+
* run credits exactly one, and this list is what picks which.
|
|
273
|
+
*
|
|
274
|
+
* `rules.test.js` pins both facts, so a reorder that quietly changes the
|
|
275
|
+
* attribution fails the build rather than changing what users read.
|
|
276
|
+
*/
|
|
259
277
|
export const RULES = [
|
|
260
|
-
// Whole-block deletions first
|
|
278
|
+
// Whole-block deletions first: less text for the rest to walk, and the
|
|
279
|
+
// coarsest description of what was removed.
|
|
261
280
|
duplicateBlocksRule,
|
|
262
281
|
nearDuplicateBlocksRule,
|
|
263
282
|
duplicateLinesRule,
|
package/dist/rules.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rules.js","sourceRoot":"","sources":["../src/rules.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,MAAM,EACN,MAAM,EACN,YAAY,EACZ,UAAU,EACV,UAAU,EACV,aAAa,EACb,eAAe,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAIpD,kEAAkE;AAClE,SAAS,QAAQ,CAAC,OAAe;IAC/B,OAAO,OAAO,CAAC,OAAO,CAA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M,WAAW,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,IAAI,CAAC,CAAC;gBACrF,IAAI,WAAW,EAAE,CAAC;oBAChB,IAAI,EAAE,CAAC;oBACP,SAAS;gBACX,CAAC;gBACD,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAClC,CAAC;YACD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnB,CAAC;QAED,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC;IAC3C,CAAC;CACF,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,KAAK,GAAoB;IACpC,uEAAuE;IACvE,4CAA4C;IAC5C,mBAAmB;IACnB,uBAAuB;IACvB,kBAAkB;IAClB,+BAA+B;IAC/B,kBAAkB;IAClB,cAAc;IACd,UAAU;IACV,UAAU;IACV,gBAAgB;IAChB,aAAa;IACb,YAAY;IACZ,wEAAwE;IACxE,cAAc;IACd,cAAc;CACf,CAAC;AAEF,MAAM,UAAU,OAAO,CAAC,EAAU;IAChC,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AACxC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trazum/core",
|
|
3
|
-
"version": "1.56.
|
|
3
|
+
"version": "1.56.2",
|
|
4
4
|
"description": "Trazum core: priced advisories for LLM prompts (caching, model tier, batching, schemas), plus deterministic trimming, token counting and pricing.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "David Mu\u00f1oz Rey",
|
package/src/index.ts
CHANGED
|
@@ -52,6 +52,7 @@ export { measuredUsage, labelCoverage, MIN_SCALE_DAYS, SCALE_TO_DAYS } from './m
|
|
|
52
52
|
export { assignSources, fleetRollup } from './fleet.js';
|
|
53
53
|
export { rollUp } from './rollup.js';
|
|
54
54
|
export { heartbeats } from './heartbeat.js';
|
|
55
|
+
export { ruleYield } from './rule-yield.js';
|
|
55
56
|
export { buildPlan, planLabelName, parsePlanDocument, PLAN_ACTION_KINDS } from './plan.js';
|
|
56
57
|
export type { PlanParseFailure, PlanParseResult } from './plan.js';
|
|
57
58
|
export type { PlanAction, PlanActionKind, PlanAssumption, PlanDocument } from './plan.js';
|
|
@@ -256,6 +257,7 @@ export type {
|
|
|
256
257
|
} from './history.js';
|
|
257
258
|
export type { CannotTellReason, PlanVerification, VerifiedAction, VerifyOutcome } from './verify.js';
|
|
258
259
|
export type { FleetSource, FleetRollup } from './fleet.js';
|
|
260
|
+
export type { RuleYield, RuleYieldReport } from './rule-yield.js';
|
|
259
261
|
export type {
|
|
260
262
|
Heartbeat,
|
|
261
263
|
HeartbeatInput,
|
|
@@ -314,6 +316,12 @@ export type { BillLevers, BillLeverOptions, LeverId, SliceLevers } from './lever
|
|
|
314
316
|
export { DETECTABLE_LANGUAGES, detectTextLanguage } from './language.js';
|
|
315
317
|
export { countSentences, profilePrompt } from './profile.js';
|
|
316
318
|
export { PHRASE_LANGUAGES } from './phrases.js';
|
|
319
|
+
export {
|
|
320
|
+
DICTIONARY_STANDING,
|
|
321
|
+
dictionaryStanding,
|
|
322
|
+
languagesWithStanding,
|
|
323
|
+
} from './maintainers.js';
|
|
324
|
+
export type { DictionaryRecord, DictionaryStanding } from './maintainers.js';
|
|
317
325
|
export { toPromptfoo } from './promptfoo.js';
|
|
318
326
|
export { toOtlpMetrics } from './otlp.js';
|
|
319
327
|
export type { OtlpAttribute, OtlpDataPoint, OtlpInput, OtlpMetric, OtlpPayload } from './otlp.js';
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Who read the dictionary.
|
|
3
|
+
*
|
|
4
|
+
* The trimming dictionaries in `phrases.ts` cover seven languages. Two of them
|
|
5
|
+
* are languages this project reports in, which is the only evidence in this
|
|
6
|
+
* repository that somebody here reads them. The other five were written by the
|
|
7
|
+
* same process that wrote the rules, and nothing in the history says a person
|
|
8
|
+
* who speaks French, German, Portuguese, Italian or Dutch has ever looked at
|
|
9
|
+
* the entries and agreed that removing one leaves the prompt asking for the
|
|
10
|
+
* same thing.
|
|
11
|
+
*
|
|
12
|
+
* **That is a stronger claim than "an eighth language is not scheduled".** The
|
|
13
|
+
* roadmap has said for several arcs that a dictionary is a judgement about a
|
|
14
|
+
* language and this project will not make it in a language nobody here reads.
|
|
15
|
+
* Seven dictionaries shipped anyway. The rule and the catalogue disagree, and
|
|
16
|
+
* the catalogue is the one users meet.
|
|
17
|
+
*
|
|
18
|
+
* ## The evidence that reading the list is not enough
|
|
19
|
+
*
|
|
20
|
+
* `INTENSIFIERS` shipped `molto`, `muito` and `heel` — each of which is an
|
|
21
|
+
* intensifier *and* a quantifier, so dropping one turns "you have much time"
|
|
22
|
+
* into "you have time". Three languages, the same mistake, and it survived
|
|
23
|
+
* being read. It was caught by running prompts through the rules, which is a
|
|
24
|
+
* far weaker instrument than a speaker and is what this project actually had.
|
|
25
|
+
*
|
|
26
|
+
* One bug found by the weaker instrument is not a review. It is the reason to
|
|
27
|
+
* stop describing the two situations with one word.
|
|
28
|
+
*
|
|
29
|
+
* ## What this module refuses
|
|
30
|
+
*
|
|
31
|
+
* - **Deleting the five.** They fire, they save tokens, and a Dutch prompt is
|
|
32
|
+
* better served by an unreviewed dictionary that says so than by silence.
|
|
33
|
+
* - **Calling them equal to the two.** `a legibility floor outranks a visual
|
|
34
|
+
* tier`, and one line of admission in the report costs nothing.
|
|
35
|
+
* - **Naming a person.** A maintainer is somebody who accepts the role in
|
|
36
|
+
* public; inventing one here would be the same lie in the other direction.
|
|
37
|
+
* Until one exists, `unreviewed` is the whole of what can be said.
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Whether anybody who reads the language has passed over its entries.
|
|
42
|
+
*
|
|
43
|
+
* Deliberately two values. A scale — "partially reviewed", "spot-checked" —
|
|
44
|
+
* would be a number nobody can produce evidence for, and the honest answer to
|
|
45
|
+
* "has a speaker signed off on this list" is yes or no.
|
|
46
|
+
*/
|
|
47
|
+
export type DictionaryStanding =
|
|
48
|
+
/** Somebody here reads it. This project reports in it. */
|
|
49
|
+
| 'reviewed'
|
|
50
|
+
/** Nobody here has been shown to read it. The entries stand unchecked. */
|
|
51
|
+
| 'unreviewed';
|
|
52
|
+
|
|
53
|
+
export interface DictionaryRecord {
|
|
54
|
+
/** The language code, as `PHRASE_LANGUAGES` holds it. */
|
|
55
|
+
code: string;
|
|
56
|
+
standing: DictionaryStanding;
|
|
57
|
+
/**
|
|
58
|
+
* What was actually done to these entries — never what was intended.
|
|
59
|
+
*
|
|
60
|
+
* English rather than a code, because this string is evidence a reader
|
|
61
|
+
* weighs, not a value a program branches on.
|
|
62
|
+
*/
|
|
63
|
+
checkedBy: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The standing of each shipped dictionary.
|
|
68
|
+
*
|
|
69
|
+
* `maintainers.test.js` derives the `reviewed` set from the report catalogues
|
|
70
|
+
* on disk rather than from this list, so adding a French report translation
|
|
71
|
+
* fails the build here until somebody decides what it means — which is the
|
|
72
|
+
* moment the question is actually answerable, and not before.
|
|
73
|
+
*/
|
|
74
|
+
export const DICTIONARY_STANDING: Readonly<Record<string, DictionaryRecord>> = {
|
|
75
|
+
en: {
|
|
76
|
+
code: 'en',
|
|
77
|
+
standing: 'reviewed',
|
|
78
|
+
checkedBy: 'the report is written in it, and the entries were revised by somebody reading them',
|
|
79
|
+
},
|
|
80
|
+
es: {
|
|
81
|
+
code: 'es',
|
|
82
|
+
standing: 'reviewed',
|
|
83
|
+
checkedBy: 'the report is written in it, and the entries were revised by somebody reading them',
|
|
84
|
+
},
|
|
85
|
+
fr: {
|
|
86
|
+
code: 'fr',
|
|
87
|
+
standing: 'unreviewed',
|
|
88
|
+
checkedBy: 'run through the rules against sample prompts; no speaker has agreed to the entries',
|
|
89
|
+
},
|
|
90
|
+
de: {
|
|
91
|
+
code: 'de',
|
|
92
|
+
standing: 'unreviewed',
|
|
93
|
+
checkedBy: 'run through the rules against sample prompts; no speaker has agreed to the entries',
|
|
94
|
+
},
|
|
95
|
+
pt: {
|
|
96
|
+
code: 'pt',
|
|
97
|
+
standing: 'unreviewed',
|
|
98
|
+
checkedBy: 'run through the rules against sample prompts; no speaker has agreed to the entries',
|
|
99
|
+
},
|
|
100
|
+
it: {
|
|
101
|
+
code: 'it',
|
|
102
|
+
standing: 'unreviewed',
|
|
103
|
+
checkedBy: 'run through the rules against sample prompts; no speaker has agreed to the entries',
|
|
104
|
+
},
|
|
105
|
+
nl: {
|
|
106
|
+
code: 'nl',
|
|
107
|
+
standing: 'unreviewed',
|
|
108
|
+
checkedBy: 'run through the rules against sample prompts; no speaker has agreed to the entries',
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/** The record for a language, or null when the dictionaries do not cover it. */
|
|
113
|
+
export function dictionaryStanding(code: string): DictionaryRecord | null {
|
|
114
|
+
return DICTIONARY_STANDING[code] ?? null;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* The codes with a given standing, in catalogue order.
|
|
119
|
+
*
|
|
120
|
+
* Order comes from the argument rather than from this module's object literal,
|
|
121
|
+
* so a caller that lists languages in report order gets them back in it.
|
|
122
|
+
*/
|
|
123
|
+
export function languagesWithStanding(
|
|
124
|
+
codes: readonly string[],
|
|
125
|
+
standing: DictionaryStanding,
|
|
126
|
+
): readonly string[] {
|
|
127
|
+
return codes.filter((code) => DICTIONARY_STANDING[code]?.standing === standing);
|
|
128
|
+
}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which rules actually recover anything, and how much.
|
|
3
|
+
*
|
|
4
|
+
* The README says plainly that the deterministic rules recover about one per
|
|
5
|
+
* cent, and that is the fair complaint about this tool. It is also an
|
|
6
|
+
* **aggregate**, and an aggregate is where a distribution goes to hide: seven
|
|
7
|
+
* rules recovering one per cent between them could be seven rules each doing a
|
|
8
|
+
* seventh of the work, or two rules doing all of it beside five that have never
|
|
9
|
+
* changed a byte of anybody's prompt.
|
|
10
|
+
*
|
|
11
|
+
* Nobody here had measured which. That is the wrong place to start an arc
|
|
12
|
+
* about raising the ceiling — what to add on the model's side of the line is a
|
|
13
|
+
* question about what the dictionary side already covers, and "about one per
|
|
14
|
+
* cent" does not answer it.
|
|
15
|
+
*
|
|
16
|
+
* **Two numbers per rule, and they are not the same number.**
|
|
17
|
+
*
|
|
18
|
+
* - **Alone** is what the rule saves when it is the only one running.
|
|
19
|
+
* - **Marginal** is what the whole set loses when the rule is removed.
|
|
20
|
+
*
|
|
21
|
+
* They diverge exactly where rules overlap, which is most of the interesting
|
|
22
|
+
* cases: `duplicate-lines` and `duplicate-blocks` both find a repeated stanza,
|
|
23
|
+
* so each has a real `alone` and a `marginal` near zero. Reporting either
|
|
24
|
+
* figure by itself would be wrong in a different direction — `alone` alone
|
|
25
|
+
* makes an overlapping rule look load-bearing, and `marginal` alone makes it
|
|
26
|
+
* look inert. The report carries both and **never reconciles them into one**,
|
|
27
|
+
* for the same reason a measurement and a projection are never added here.
|
|
28
|
+
*
|
|
29
|
+
* **Inert is a fact about the corpus, never about the rule.** A rule that finds
|
|
30
|
+
* nothing across twenty-one files has not been shown to be useless; it has been
|
|
31
|
+
* shown that these twenty-one files do not contain what it looks for. The
|
|
32
|
+
* distinction is the whole difference between "delete this rule" and "measure
|
|
33
|
+
* it on something else", and this module refuses to make the first claim.
|
|
34
|
+
*
|
|
35
|
+
* Browser-safe: prompts in, arithmetic out, no filesystem.
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
import { optimize } from './optimize.js';
|
|
39
|
+
import type { OptimizeOptions, RuleId } from './types.js';
|
|
40
|
+
|
|
41
|
+
export interface RuleYield {
|
|
42
|
+
id: RuleId;
|
|
43
|
+
/** Tokens saved when this rule is the only one running, across every prompt. */
|
|
44
|
+
alone: number;
|
|
45
|
+
/**
|
|
46
|
+
* Tokens the full set loses when this rule is removed.
|
|
47
|
+
*
|
|
48
|
+
* Zero with a non-zero `alone` means every token it finds is found by
|
|
49
|
+
* something else too — an overlap, not a defect, and not a reason to delete
|
|
50
|
+
* anything without knowing which rule is the better one to keep.
|
|
51
|
+
*/
|
|
52
|
+
marginal: number;
|
|
53
|
+
/** How many prompts it changed at all, running alone. */
|
|
54
|
+
prompts: number;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface RuleYieldReport {
|
|
58
|
+
schemaVersion: 1;
|
|
59
|
+
/** Prompts measured. */
|
|
60
|
+
prompts: number;
|
|
61
|
+
/** Tokens across every prompt before any rule ran. */
|
|
62
|
+
tokensBefore: number;
|
|
63
|
+
/**
|
|
64
|
+
* Tokens **the rules** save across every prompt.
|
|
65
|
+
*
|
|
66
|
+
* The whole run's saving minus the floor below, because they are not the
|
|
67
|
+
* same thing and the first version of this module reported the difference as
|
|
68
|
+
* if it were the rules' work. Run over a corpus the rules do not touch, that
|
|
69
|
+
* version said the optimiser saved twenty-one tokens and every rule was
|
|
70
|
+
* redundant — a sentence assembled out of somebody else's arithmetic.
|
|
71
|
+
*/
|
|
72
|
+
tokensSaved: number;
|
|
73
|
+
/**
|
|
74
|
+
* Tokens the optimiser saves with **every rule disabled**.
|
|
75
|
+
*
|
|
76
|
+
* Normalisation the optimiser does regardless of the rule set. Named rather
|
|
77
|
+
* than folded in: it is a real saving and it is not a rule's, and a report
|
|
78
|
+
* that credited it to the rules would be flattering exactly the thing this
|
|
79
|
+
* measurement exists to be honest about.
|
|
80
|
+
*/
|
|
81
|
+
floor: number;
|
|
82
|
+
/** Per rule, largest `marginal` first, then largest `alone`. */
|
|
83
|
+
rules: RuleYield[];
|
|
84
|
+
/**
|
|
85
|
+
* `alone` summed over every rule.
|
|
86
|
+
*
|
|
87
|
+
* Stated beside `tokensSaved` and deliberately not reconciled with it: the
|
|
88
|
+
* gap between them **is** the overlap, and a single "total" would be the one
|
|
89
|
+
* number that cannot be true. Larger than `tokensSaved` means rules are
|
|
90
|
+
* finding the same tokens; equal means they are disjoint on this corpus.
|
|
91
|
+
*/
|
|
92
|
+
sumOfAlone: number;
|
|
93
|
+
/**
|
|
94
|
+
* Rules that save something alone and nothing at the margin — every token
|
|
95
|
+
* they find, another rule finds too. On **this corpus**.
|
|
96
|
+
*/
|
|
97
|
+
redundantHere: RuleId[];
|
|
98
|
+
/**
|
|
99
|
+
* Rules that changed nothing at all — they never fired. On **this corpus**,
|
|
100
|
+
* which is the only claim the arithmetic supports: a rule that finds nothing
|
|
101
|
+
* in these files has not been shown to find nothing anywhere.
|
|
102
|
+
*/
|
|
103
|
+
inertHere: RuleId[];
|
|
104
|
+
/**
|
|
105
|
+
* Rules that **fired and recovered nothing**: they changed the prompt and
|
|
106
|
+
* the token count did not move.
|
|
107
|
+
*
|
|
108
|
+
* Kept apart from `inertHere`, because the two look identical in a saving
|
|
109
|
+
* column and mean opposite things. A rule that never fires has not been
|
|
110
|
+
* exercised; a rule that fires and saves nothing has been exercised and is
|
|
111
|
+
* altering somebody's prompt for no measured benefit — which is a finding
|
|
112
|
+
* about the rule rather than about the corpus, and the one this measurement
|
|
113
|
+
* was least likely to produce and most worth producing.
|
|
114
|
+
*
|
|
115
|
+
* `emphasis` lands here on a prompt whose shouted words it lowercases: same
|
|
116
|
+
* words, same count, different instruction.
|
|
117
|
+
*/
|
|
118
|
+
firedWithoutSavingHere: RuleId[];
|
|
119
|
+
/**
|
|
120
|
+
* How the tokens were counted, so the reader knows the margin.
|
|
121
|
+
*
|
|
122
|
+
* `heuristic` carries the estimator's documented band, and every figure here
|
|
123
|
+
* inherits it — a rule whose marginal yield is a handful of tokens is inside
|
|
124
|
+
* the noise, and the report says which counter it used rather than leaving
|
|
125
|
+
* somebody to assume an exact one.
|
|
126
|
+
*/
|
|
127
|
+
tokenSource: 'heuristic' | 'external';
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Measures each rule's yield over a set of prompts.
|
|
132
|
+
*
|
|
133
|
+
* `rules` is the full set to measure — the caller passes it rather than this
|
|
134
|
+
* module reaching for the catalogue, so a subset can be measured and so the
|
|
135
|
+
* list has one home. Every run uses the same options, so the level and the
|
|
136
|
+
* token counter are the caller's and not this module's assumption.
|
|
137
|
+
*/
|
|
138
|
+
export function ruleYield(
|
|
139
|
+
prompts: string[],
|
|
140
|
+
rules: readonly RuleId[],
|
|
141
|
+
options: OptimizeOptions = {},
|
|
142
|
+
): RuleYieldReport {
|
|
143
|
+
const run = (disableRules: RuleId[]) =>
|
|
144
|
+
prompts.map((prompt) => optimize(prompt, { ...options, disableRules }));
|
|
145
|
+
|
|
146
|
+
const whole = run([]);
|
|
147
|
+
const tokensBefore = whole.reduce((sum, result) => sum + result.tokensBefore, 0);
|
|
148
|
+
const wholeSaved = whole.reduce((sum, result) => sum + result.tokensSaved, 0);
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* What the optimiser saves with every rule off.
|
|
152
|
+
*
|
|
153
|
+
* Whitespace normalisation and the like happen either way, and crediting
|
|
154
|
+
* them to the rules is how "the rules recover about one per cent" survives
|
|
155
|
+
* on a corpus where the rules recover nothing.
|
|
156
|
+
*/
|
|
157
|
+
const floorResults = run([...rules]);
|
|
158
|
+
const floor = floorResults.reduce((sum, result) => sum + result.tokensSaved, 0);
|
|
159
|
+
const tokensSaved = Math.max(0, wholeSaved - floor);
|
|
160
|
+
|
|
161
|
+
const measured: RuleYield[] = rules.map((id) => {
|
|
162
|
+
// Alone: everything else off.
|
|
163
|
+
const only = run(rules.filter((other) => other !== id));
|
|
164
|
+
const alone = Math.max(0, only.reduce((sum, result) => sum + result.tokensSaved, 0) - floor);
|
|
165
|
+
// Changed against the floor's own output, not against the original: the
|
|
166
|
+
// normalisation changes every prompt, and counting that as this rule
|
|
167
|
+
// having fired is how every rule came back as touching every file.
|
|
168
|
+
const changed = only.filter(
|
|
169
|
+
(result, index) => result.optimized !== floorResults[index]?.optimized,
|
|
170
|
+
).length;
|
|
171
|
+
|
|
172
|
+
// Marginal: everything on but this one.
|
|
173
|
+
const without = run([id]);
|
|
174
|
+
const withoutSaved = without.reduce((sum, result) => sum + result.tokensSaved, 0);
|
|
175
|
+
|
|
176
|
+
return {
|
|
177
|
+
id,
|
|
178
|
+
alone,
|
|
179
|
+
// Never negative: removing a rule cannot make the set save more, and a
|
|
180
|
+
// rounding artefact that said it did would be a finding nobody could act
|
|
181
|
+
// on. Clamped rather than reported, because the clamp is the honest
|
|
182
|
+
// reading of a difference inside the counter's own noise.
|
|
183
|
+
marginal: Math.max(0, wholeSaved - withoutSaved),
|
|
184
|
+
prompts: changed,
|
|
185
|
+
};
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
measured.sort((a, b) => b.marginal - a.marginal || b.alone - a.alone);
|
|
189
|
+
|
|
190
|
+
return {
|
|
191
|
+
schemaVersion: 1,
|
|
192
|
+
prompts: prompts.length,
|
|
193
|
+
tokensBefore,
|
|
194
|
+
tokensSaved,
|
|
195
|
+
floor,
|
|
196
|
+
rules: measured,
|
|
197
|
+
sumOfAlone: measured.reduce((sum, rule) => sum + rule.alone, 0),
|
|
198
|
+
redundantHere: measured.filter((rule) => rule.alone > 0 && rule.marginal === 0).map((rule) => rule.id),
|
|
199
|
+
inertHere: measured.filter((rule) => rule.prompts === 0).map((rule) => rule.id),
|
|
200
|
+
firedWithoutSavingHere: measured
|
|
201
|
+
.filter((rule) => rule.prompts > 0 && rule.alone === 0)
|
|
202
|
+
.map((rule) => rule.id),
|
|
203
|
+
tokenSource: whole[0]?.tokenSource ?? 'heuristic',
|
|
204
|
+
};
|
|
205
|
+
}
|
package/src/rules.ts
CHANGED
|
@@ -300,9 +300,28 @@ const nearDuplicateBlocksRule: Rule = {
|
|
|
300
300
|
},
|
|
301
301
|
};
|
|
302
302
|
|
|
303
|
-
/**
|
|
303
|
+
/**
|
|
304
|
+
* Every rule, in the order they must run.
|
|
305
|
+
*
|
|
306
|
+
* **The order decides what the reader is told, not just how fast this runs.**
|
|
307
|
+
* A repeated stanza is a repeated *block* and also a set of repeated *lines*,
|
|
308
|
+
* so all three of the deletion rules can find it and whichever runs first
|
|
309
|
+
* takes it. Coarsest first means the report says "one repeated paragraph"
|
|
310
|
+
* rather than "three repeated lines" for the same saving — the same number
|
|
311
|
+
* attached to a sentence somebody can act on instead of three they have to
|
|
312
|
+
* reassemble.
|
|
313
|
+
*
|
|
314
|
+
* That was an unstated consequence until `rules --measure` made the overlap
|
|
315
|
+
* visible: the leave-one-out measurement credits each of the three with the
|
|
316
|
+
* whole saving, because each of them *would* have caught it alone. The applied
|
|
317
|
+
* run credits exactly one, and this list is what picks which.
|
|
318
|
+
*
|
|
319
|
+
* `rules.test.js` pins both facts, so a reorder that quietly changes the
|
|
320
|
+
* attribution fails the build rather than changing what users read.
|
|
321
|
+
*/
|
|
304
322
|
export const RULES: readonly Rule[] = [
|
|
305
|
-
// Whole-block deletions first
|
|
323
|
+
// Whole-block deletions first: less text for the rest to walk, and the
|
|
324
|
+
// coarsest description of what was removed.
|
|
306
325
|
duplicateBlocksRule,
|
|
307
326
|
nearDuplicateBlocksRule,
|
|
308
327
|
duplicateLinesRule,
|