agentfootprint 6.28.0 → 6.29.0
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/README.md +74 -5
- package/dist/esm/lib/context-bisect/index.js +2 -0
- package/dist/esm/lib/context-bisect/index.js.map +1 -1
- package/dist/esm/lib/context-bisect/missingContext.js +63 -0
- package/dist/esm/lib/context-bisect/missingContext.js.map +1 -0
- package/dist/esm/lib/influence-core/attributability.js +136 -0
- package/dist/esm/lib/influence-core/attributability.js.map +1 -0
- package/dist/esm/lib/influence-core/index.js +2 -1
- package/dist/esm/lib/influence-core/index.js.map +1 -1
- package/dist/esm/lib/influence-core/types.js +27 -0
- package/dist/esm/lib/influence-core/types.js.map +1 -1
- package/dist/esm/observe.js +2 -2
- package/dist/esm/observe.js.map +1 -1
- package/dist/lib/context-bisect/index.js +4 -1
- package/dist/lib/context-bisect/index.js.map +1 -1
- package/dist/lib/context-bisect/missingContext.js +67 -0
- package/dist/lib/context-bisect/missingContext.js.map +1 -0
- package/dist/lib/influence-core/attributability.js +142 -0
- package/dist/lib/influence-core/attributability.js.map +1 -0
- package/dist/lib/influence-core/index.js +8 -1
- package/dist/lib/influence-core/index.js.map +1 -1
- package/dist/lib/influence-core/types.js +28 -1
- package/dist/lib/influence-core/types.js.map +1 -1
- package/dist/observe.js +9 -2
- package/dist/observe.js.map +1 -1
- package/dist/types/lib/context-bisect/index.d.ts +1 -0
- package/dist/types/lib/context-bisect/index.d.ts.map +1 -1
- package/dist/types/lib/context-bisect/missingContext.d.ts +72 -0
- package/dist/types/lib/context-bisect/missingContext.d.ts.map +1 -0
- package/dist/types/lib/influence-core/attributability.d.ts +73 -0
- package/dist/types/lib/influence-core/attributability.d.ts.map +1 -0
- package/dist/types/lib/influence-core/index.d.ts +3 -2
- package/dist/types/lib/influence-core/index.d.ts.map +1 -1
- package/dist/types/lib/influence-core/types.d.ts +95 -0
- package/dist/types/lib/influence-core/types.d.ts.map +1 -1
- package/dist/types/observe.d.ts +2 -2
- package/dist/types/observe.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.rankingConfidence = exports.ratioStrategy = exports.marginStrategy = void 0;
|
|
4
|
+
const types_js_1 = require("./types.js");
|
|
5
|
+
const nonNegative = (label, x) => {
|
|
6
|
+
// `!(x >= 0)` rejects negatives AND NaN (a plain `< 0` would let NaN through).
|
|
7
|
+
if (!(x >= 0))
|
|
8
|
+
throw new Error(`${label} must be >= 0 (got ${x})`);
|
|
9
|
+
return x;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Default strategy: ABSOLUTE top-2 gap `s0 − s1 >= threshold`. Simple and
|
|
13
|
+
* interpretable, but embedder-relative (the gap scale depends on the embedding
|
|
14
|
+
* geometry). Use `ratioStrategy` for cross-embedder transfer.
|
|
15
|
+
*/
|
|
16
|
+
function marginStrategy(threshold = types_js_1.DEFAULT_CLEAR_WINNER_MARGIN) {
|
|
17
|
+
nonNegative('marginStrategy: threshold', threshold);
|
|
18
|
+
return {
|
|
19
|
+
name: `margin>=${threshold}`,
|
|
20
|
+
isClearWinner: (s) => s.length >= 2 && s[0] - s[1] >= threshold,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
exports.marginStrategy = marginStrategy;
|
|
24
|
+
/**
|
|
25
|
+
* Scale-invariant strategy: top-2 gap as a FRACTION of the top score,
|
|
26
|
+
* `(s0 − s1) / |s0| >= threshold`. Transfers across embedders / answer lengths
|
|
27
|
+
* where the absolute margin does not. A zero (or all-equal) top is never a
|
|
28
|
+
* clear winner.
|
|
29
|
+
*/
|
|
30
|
+
function ratioStrategy(threshold = types_js_1.DEFAULT_CLEAR_WINNER_RATIO) {
|
|
31
|
+
nonNegative('ratioStrategy: threshold', threshold);
|
|
32
|
+
return {
|
|
33
|
+
name: `ratio>=${threshold}`,
|
|
34
|
+
isClearWinner: (s) => {
|
|
35
|
+
if (s.length < 2)
|
|
36
|
+
return false;
|
|
37
|
+
const denom = Math.abs(s[0]);
|
|
38
|
+
if (denom === 0)
|
|
39
|
+
return false; // flat at zero → no clear winner (avoid div-by-zero)
|
|
40
|
+
return (s[0] - s[1]) / denom >= threshold;
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
exports.ratioStrategy = ratioStrategy;
|
|
45
|
+
/** Finite score, or −Infinity for a malformed (NaN/+Infinity/−Infinity) one —
|
|
46
|
+
* so a bad embedder degrades that item to "ranked last", never corrupts the
|
|
47
|
+
* ordering. Note +Infinity is demoted too: a meaningless score is never a win. */
|
|
48
|
+
const finiteScore = (s) => (Number.isFinite(s.score) ? s.score : -Infinity);
|
|
49
|
+
/** Total, NaN-free comparator (descending) — correctness does not rest on the
|
|
50
|
+
* engine's handling of a NaN comparator return for the all-malformed case. */
|
|
51
|
+
const byScoreDesc = (a, b) => {
|
|
52
|
+
const x = finiteScore(a);
|
|
53
|
+
const y = finiteScore(b);
|
|
54
|
+
return x > y ? -1 : x < y ? 1 : 0;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Assess whether an influence ranking has a clear winner to trust as a lead,
|
|
58
|
+
* or is too close to call and should be confirmed by ablation.
|
|
59
|
+
*
|
|
60
|
+
* Guarantees (relied on by the localizer): the returned `shortlist` always
|
|
61
|
+
* contains `lead` when there is one, and — when there is NO clear winner and
|
|
62
|
+
* there are ≥2 suspects — always contains the runner-up too (so ablation over
|
|
63
|
+
* the shortlist covers the real culprit even if it ranked below an innocent).
|
|
64
|
+
*
|
|
65
|
+
* @param scores `scoreInfluence` output (any order — re-sorted defensively).
|
|
66
|
+
* Ids are assumed unique (as `scoreInfluence` enforces); the
|
|
67
|
+
* shortlist is de-duplicated defensively regardless.
|
|
68
|
+
* @throws Error on negative or NaN options.
|
|
69
|
+
*/
|
|
70
|
+
function rankingConfidence(scores, options = {}) {
|
|
71
|
+
// strategy WINS over clearWinnerMargin; the default builds a margin strategy
|
|
72
|
+
// (which validates its own threshold).
|
|
73
|
+
const strategy = options.strategy ?? marginStrategy(options.clearWinnerMargin ?? types_js_1.DEFAULT_CLEAR_WINNER_MARGIN);
|
|
74
|
+
const shortlistBand = nonNegative('rankingConfidence: shortlistBand', options.shortlistBand ?? types_js_1.DEFAULT_SHORTLIST_BAND);
|
|
75
|
+
if (scores.length === 0) {
|
|
76
|
+
return { clearWinner: false, margin: undefined, lead: undefined, shortlist: [], reason: 'No suspects to rank.' };
|
|
77
|
+
}
|
|
78
|
+
const ranked = [...scores].sort(byScoreDesc);
|
|
79
|
+
const top = ranked[0];
|
|
80
|
+
const topScore = finiteScore(top);
|
|
81
|
+
if (ranked.length === 1) {
|
|
82
|
+
return {
|
|
83
|
+
clearWinner: true,
|
|
84
|
+
margin: undefined,
|
|
85
|
+
lead: top.id,
|
|
86
|
+
shortlist: [top.id],
|
|
87
|
+
reason: `Only one suspect "${top.id}" — clear by default (nothing to compare against); confirm by ablation for a causal claim.`,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
const secondScore = finiteScore(ranked[1]);
|
|
91
|
+
// Clear winner, robust to malformed scores (framework invariants, NOT the
|
|
92
|
+
// strategy's concern):
|
|
93
|
+
// - top itself malformed (e.g. all-malformed) → no clear winner, no margin.
|
|
94
|
+
// - clean finite top, malformed runner-up → unambiguous lead → clear winner
|
|
95
|
+
// (the inverse of suppressing it); no meaningful finite gap to report.
|
|
96
|
+
// - both finite → the pluggable STRATEGY decides, over all finite scores.
|
|
97
|
+
let clearWinner;
|
|
98
|
+
let margin;
|
|
99
|
+
if (!Number.isFinite(topScore)) {
|
|
100
|
+
clearWinner = false;
|
|
101
|
+
margin = undefined;
|
|
102
|
+
}
|
|
103
|
+
else if (!Number.isFinite(secondScore)) {
|
|
104
|
+
clearWinner = true;
|
|
105
|
+
margin = undefined;
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
margin = topScore - secondScore;
|
|
109
|
+
const finiteRanked = ranked.map(finiteScore).filter((x) => Number.isFinite(x));
|
|
110
|
+
clearWinner = strategy.isClearWinner(finiteRanked);
|
|
111
|
+
}
|
|
112
|
+
// Shortlist = the band of FINITE scores within shortlistBand of a finite top.
|
|
113
|
+
// Then enforce the guarantees: lead always present; when there is no clear
|
|
114
|
+
// winner with ≥2 suspects, the runner-up is present too.
|
|
115
|
+
const shortlist = [];
|
|
116
|
+
const seen = new Set();
|
|
117
|
+
const add = (id) => {
|
|
118
|
+
if (!seen.has(id)) {
|
|
119
|
+
seen.add(id);
|
|
120
|
+
shortlist.push(id);
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
if (Number.isFinite(topScore)) {
|
|
124
|
+
for (const s of ranked) {
|
|
125
|
+
const sc = finiteScore(s);
|
|
126
|
+
if (Number.isFinite(sc) && topScore - sc <= shortlistBand)
|
|
127
|
+
add(s.id);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
add(top.id); // guarantee: lead always in the shortlist
|
|
131
|
+
if (!clearWinner)
|
|
132
|
+
add(ranked[1].id); // guarantee: no-clear-winner shortlist covers the runner-up
|
|
133
|
+
const gap = margin === undefined ? 'n/a' : margin.toFixed(3);
|
|
134
|
+
const reason = clearWinner
|
|
135
|
+
? margin === undefined
|
|
136
|
+
? `Clear winner [${strategy.name}]: "${top.id}" leads clearly (runner-up score unavailable). A clear lead is a similarity PROXY, not a proven cause — confirm by ablation.`
|
|
137
|
+
: `Clear winner [${strategy.name}]: "${top.id}" leads (top-2 margin ${gap}). A clear lead is a similarity PROXY, not a proven cause — confirm by ablation.`
|
|
138
|
+
: `Too close to call [${strategy.name}]: top-2 margin ${gap} — no suspect stands out by output similarity. Double-check the ${shortlist.length} shortlisted suspect(s) by ABLATION. Similarity scoring is blind to absence/crowding bugs (history truncation, context dilution), where the culprit need not resemble the answer; a flat top can also mean genuinely co-equal sources.`;
|
|
139
|
+
return { clearWinner, margin, lead: top.id, shortlist, reason };
|
|
140
|
+
}
|
|
141
|
+
exports.rankingConfidence = rankingConfidence;
|
|
142
|
+
//# sourceMappingURL=attributability.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attributability.js","sourceRoot":"","sources":["../../../src/lib/influence-core/attributability.ts"],"names":[],"mappings":";;;AA2BA,yCAA6G;AAE7G,MAAM,WAAW,GAAG,CAAC,KAAa,EAAE,CAAS,EAAU,EAAE;IACvD,+EAA+E;IAC/E,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,sBAAsB,CAAC,GAAG,CAAC,CAAC;IACnE,OAAO,CAAC,CAAC;AACX,CAAC,CAAC;AAEF;;;;GAIG;AACH,SAAgB,cAAc,CAAC,YAAoB,sCAA2B;IAC5E,WAAW,CAAC,2BAA2B,EAAE,SAAS,CAAC,CAAC;IACpD,OAAO;QACL,IAAI,EAAE,WAAW,SAAS,EAAE;QAC5B,aAAa,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,SAAS;KAChE,CAAC;AACJ,CAAC;AAND,wCAMC;AAED;;;;;GAKG;AACH,SAAgB,aAAa,CAAC,YAAoB,qCAA0B;IAC1E,WAAW,CAAC,0BAA0B,EAAE,SAAS,CAAC,CAAC;IACnD,OAAO;QACL,IAAI,EAAE,UAAU,SAAS,EAAE;QAC3B,aAAa,EAAE,CAAC,CAAC,EAAE,EAAE;YACnB,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC;gBAAE,OAAO,KAAK,CAAC;YAC/B,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC7B,IAAI,KAAK,KAAK,CAAC;gBAAE,OAAO,KAAK,CAAC,CAAC,qDAAqD;YACpF,OAAO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E,yBAAyB,GAAG,kFAAkF;QAC7J,CAAC,CAAC,sBAAsB,QAAQ,CAAC,IAAI,mBAAmB,GAAG,mEAAmE,SAAS,CAAC,MAAM,wOAAwO,CAAC;IAEzX,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;AAClE,CAAC;AA7ED,8CA6EC"}
|
|
@@ -26,11 +26,18 @@
|
|
|
26
26
|
* and never causal attribution.
|
|
27
27
|
*/
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.scoreMargin = exports.pairwiseSimilarity = exports.structuralProximity = exports.scoreInfluence = exports.persistence = exports.finalAnswerSimilarity = exports.compositeScore = exports.averageRelevancy = exports.adaptWeights = exports.embeddingCache = exports.EmbeddingCache = exports.contentHash = exports.DEFAULT_PERSISTENCE_THRESHOLD = exports.DEFAULT_MARGIN_THRESHOLD = exports.DEFAULT_INFLUENCE_WEIGHTS = void 0;
|
|
29
|
+
exports.scoreMargin = exports.pairwiseSimilarity = exports.structuralProximity = exports.scoreInfluence = exports.persistence = exports.finalAnswerSimilarity = exports.compositeScore = exports.averageRelevancy = exports.adaptWeights = exports.embeddingCache = exports.EmbeddingCache = exports.contentHash = exports.ratioStrategy = exports.rankingConfidence = exports.marginStrategy = exports.DEFAULT_SHORTLIST_BAND = exports.DEFAULT_PERSISTENCE_THRESHOLD = exports.DEFAULT_MARGIN_THRESHOLD = exports.DEFAULT_INFLUENCE_WEIGHTS = exports.DEFAULT_CLEAR_WINNER_RATIO = exports.DEFAULT_CLEAR_WINNER_MARGIN = void 0;
|
|
30
30
|
var types_js_1 = require("./types.js");
|
|
31
|
+
Object.defineProperty(exports, "DEFAULT_CLEAR_WINNER_MARGIN", { enumerable: true, get: function () { return types_js_1.DEFAULT_CLEAR_WINNER_MARGIN; } });
|
|
32
|
+
Object.defineProperty(exports, "DEFAULT_CLEAR_WINNER_RATIO", { enumerable: true, get: function () { return types_js_1.DEFAULT_CLEAR_WINNER_RATIO; } });
|
|
31
33
|
Object.defineProperty(exports, "DEFAULT_INFLUENCE_WEIGHTS", { enumerable: true, get: function () { return types_js_1.DEFAULT_INFLUENCE_WEIGHTS; } });
|
|
32
34
|
Object.defineProperty(exports, "DEFAULT_MARGIN_THRESHOLD", { enumerable: true, get: function () { return types_js_1.DEFAULT_MARGIN_THRESHOLD; } });
|
|
33
35
|
Object.defineProperty(exports, "DEFAULT_PERSISTENCE_THRESHOLD", { enumerable: true, get: function () { return types_js_1.DEFAULT_PERSISTENCE_THRESHOLD; } });
|
|
36
|
+
Object.defineProperty(exports, "DEFAULT_SHORTLIST_BAND", { enumerable: true, get: function () { return types_js_1.DEFAULT_SHORTLIST_BAND; } });
|
|
37
|
+
var attributability_js_1 = require("./attributability.js");
|
|
38
|
+
Object.defineProperty(exports, "marginStrategy", { enumerable: true, get: function () { return attributability_js_1.marginStrategy; } });
|
|
39
|
+
Object.defineProperty(exports, "rankingConfidence", { enumerable: true, get: function () { return attributability_js_1.rankingConfidence; } });
|
|
40
|
+
Object.defineProperty(exports, "ratioStrategy", { enumerable: true, get: function () { return attributability_js_1.ratioStrategy; } });
|
|
34
41
|
var cache_js_1 = require("./cache.js");
|
|
35
42
|
Object.defineProperty(exports, "contentHash", { enumerable: true, get: function () { return cache_js_1.contentHash; } });
|
|
36
43
|
Object.defineProperty(exports, "EmbeddingCache", { enumerable: true, get: function () { return cache_js_1.EmbeddingCache; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/influence-core/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/influence-core/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;;;AAmBH,uCAOoB;AANlB,uHAAA,2BAA2B,OAAA;AAC3B,sHAAA,0BAA0B,OAAA;AAC1B,qHAAA,yBAAyB,OAAA;AACzB,oHAAA,wBAAwB,OAAA;AACxB,yHAAA,6BAA6B,OAAA;AAC7B,kHAAA,sBAAsB,OAAA;AAGxB,2DAK8B;AAJ5B,oHAAA,cAAc,OAAA;AACd,uHAAA,iBAAiB,OAAA;AACjB,mHAAA,aAAa,OAAA;AAIf,uCAMoB;AALlB,uGAAA,WAAW,OAAA;AACX,0GAAA,cAAc,OAAA;AACd,0GAAA,cAAc,OAAA;AAKhB,2CASsB;AARpB,0GAAA,YAAY,OAAA;AACZ,8GAAA,gBAAgB,OAAA;AAChB,4GAAA,cAAc,OAAA;AACd,mHAAA,qBAAqB,OAAA;AACrB,yGAAA,WAAW,OAAA;AACX,4GAAA,cAAc,OAAA;AACd,iHAAA,mBAAmB,OAAA;AAIrB,iDAAkF;AAAzE,mHAAA,kBAAkB,OAAA;AAE3B,yCAAgE;AAAvD,wGAAA,WAAW,OAAA"}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* live.
|
|
24
24
|
*/
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.DEFAULT_MARGIN_THRESHOLD = exports.DEFAULT_PERSISTENCE_THRESHOLD = exports.DEFAULT_INFLUENCE_WEIGHTS = void 0;
|
|
26
|
+
exports.DEFAULT_CLEAR_WINNER_RATIO = exports.DEFAULT_SHORTLIST_BAND = exports.DEFAULT_CLEAR_WINNER_MARGIN = exports.DEFAULT_MARGIN_THRESHOLD = exports.DEFAULT_PERSISTENCE_THRESHOLD = exports.DEFAULT_INFLUENCE_WEIGHTS = void 0;
|
|
27
27
|
/** Paper defaults: α=0.40, β=0.30, γ=0.20, δ=0.10 (sum to 1.0). */
|
|
28
28
|
exports.DEFAULT_INFLUENCE_WEIGHTS = Object.freeze({
|
|
29
29
|
fa: 0.4,
|
|
@@ -35,4 +35,31 @@ exports.DEFAULT_INFLUENCE_WEIGHTS = Object.freeze({
|
|
|
35
35
|
exports.DEFAULT_PERSISTENCE_THRESHOLD = 0.3;
|
|
36
36
|
/** RFC-002 §4 default: margins below this flag the choice as `narrow`. */
|
|
37
37
|
exports.DEFAULT_MARGIN_THRESHOLD = 0.05;
|
|
38
|
+
/**
|
|
39
|
+
* RFC-003 default: an influence ranking whose top-1 vs top-2 score margin is
|
|
40
|
+
* below this has NO clear winner — a shortlist, not a verdict. Escalate to
|
|
41
|
+
* ablation.
|
|
42
|
+
*
|
|
43
|
+
* UNCALIBRATED proxy starting point, chosen for interpretability. `margin`
|
|
44
|
+
* is an ABSOLUTE difference on the same scale as `scoreInfluence`'s composite
|
|
45
|
+
* (S ∈ ≈[−0.7, 1]), so this threshold is EMBEDDER-RELATIVE — recalibrate by
|
|
46
|
+
* sweeping clear-winner vs flat rankings on your embedder. The numeric
|
|
47
|
+
* coincidence with `DEFAULT_MARGIN_THRESHOLD` is NOT a shared derivation: that
|
|
48
|
+
* one measures `scoreMargin`'s chosen-vs-not-chosen distribution, a different
|
|
49
|
+
* statistic.
|
|
50
|
+
*/
|
|
51
|
+
exports.DEFAULT_CLEAR_WINNER_MARGIN = 0.05;
|
|
52
|
+
/**
|
|
53
|
+
* RFC-003 default: when there is no clear winner, suspects scoring within this
|
|
54
|
+
* band of the top form the shortlist ablation should COVER (the culprit may be
|
|
55
|
+
* any of them — or, for absence bugs, none). UNCALIBRATED proxy; embedder-
|
|
56
|
+
* relative (see `DEFAULT_CLEAR_WINNER_MARGIN`).
|
|
57
|
+
*/
|
|
58
|
+
exports.DEFAULT_SHORTLIST_BAND = 0.1;
|
|
59
|
+
/**
|
|
60
|
+
* RFC-003 default for `ratioStrategy`: the top-2 gap as a FRACTION of the top
|
|
61
|
+
* score `(s0 − s1) / |s0|`. Unlike the absolute margin this is scale-invariant,
|
|
62
|
+
* so it transfers across embedders / answer lengths. UNCALIBRATED proxy.
|
|
63
|
+
*/
|
|
64
|
+
exports.DEFAULT_CLEAR_WINNER_RATIO = 0.05;
|
|
38
65
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/lib/influence-core/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;;AA0BH,mEAAmE;AACtD,QAAA,yBAAyB,GAAqB,MAAM,CAAC,MAAM,CAAC;IACvE,EAAE,EAAE,GAAG;IACP,GAAG,EAAE,GAAG;IACR,OAAO,EAAE,GAAG;IACZ,KAAK,EAAE,GAAG;CACX,CAAC,CAAC;AAEH,yDAAyD;AAC5C,QAAA,6BAA6B,GAAG,GAAG,CAAC;AAEjD,0EAA0E;AAC7D,QAAA,wBAAwB,GAAG,IAAI,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/lib/influence-core/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;;AA0BH,mEAAmE;AACtD,QAAA,yBAAyB,GAAqB,MAAM,CAAC,MAAM,CAAC;IACvE,EAAE,EAAE,GAAG;IACP,GAAG,EAAE,GAAG;IACR,OAAO,EAAE,GAAG;IACZ,KAAK,EAAE,GAAG;CACX,CAAC,CAAC;AAEH,yDAAyD;AAC5C,QAAA,6BAA6B,GAAG,GAAG,CAAC;AAEjD,0EAA0E;AAC7D,QAAA,wBAAwB,GAAG,IAAI,CAAC;AAE7C;;;;;;;;;;;;GAYG;AACU,QAAA,2BAA2B,GAAG,IAAI,CAAC;AAEhD;;;;;GAKG;AACU,QAAA,sBAAsB,GAAG,GAAG,CAAC;AAE1C;;;;GAIG;AACU,QAAA,0BAA0B,GAAG,IAAI,CAAC"}
|
package/dist/observe.js
CHANGED
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
* directly; Tier 3 dashboards are opt-in.
|
|
33
33
|
*/
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.
|
|
36
|
-
exports.toolChoiceRecorder = exports.buildChoiceContext = exports.saysWhatNotWhenRule = exports.runToolLintCli = exports.optionalParamRule = exports.MOCK_EMBEDDER_CALIBRATION = exports.formatToolCatalogReport = exports.enumInProseRule = exports.differentiationHint = exports.descriptionRule = exports.defaultStructuralRules = exports.DEFAULT_WHEN_CUES = exports.DEFAULT_WATCH_BAND = exports.DEFAULT_OMISSION_CUES = exports.DEFAULT_CONFUSABILITY_THRESHOLD = exports.confusabilityText = exports.coerceCatalog = exports.catalogFromTools = exports.analyzeToolCatalog = exports.toBacktrackTrace = exports.verdictFor = exports.suspectLabel = exports.stepOutputText = exports.runAblationProbe = exports.probeFlipped = exports.localizeContextBug = exports.llmEdgeWeigher = exports.llmCallIdsFromEvents = exports.formatContextBugReport = exports.defaultSuspectClassifier = exports.defaultOutcomeComparator = exports.CONTEXT_BISECT_DEFAULTS = exports.bisectCulprits = exports.applyAblations = exports.ablationForSuspect = exports.traceDebugAgent = exports.SelfExplainBinding = exports.buildSelfExplainToolProvider = void 0;
|
|
35
|
+
exports.structuralProximity = exports.scoreMargin = exports.scoreInfluence = exports.ratioStrategy = exports.rankingConfidence = exports.persistence = exports.pairwiseSimilarity = exports.marginStrategy = exports.finalAnswerSimilarity = exports.embeddingCache = exports.EmbeddingCache = exports.DEFAULT_SHORTLIST_BAND = exports.DEFAULT_PERSISTENCE_THRESHOLD = exports.DEFAULT_MARGIN_THRESHOLD = exports.DEFAULT_INFLUENCE_WEIGHTS = exports.DEFAULT_CLEAR_WINNER_RATIO = exports.DEFAULT_CLEAR_WINNER_MARGIN = exports.contentHash = exports.compositeScore = exports.averageRelevancy = exports.adaptWeights = exports.typedEmit = exports.agentThinkingTrace = exports.toolLineageRecorder = exports.attachStatus = exports.LoggingDomains = exports.attachLogging = exports.skillRecorder = exports.permissionRecorder = exports.memoryRecorder = exports.evalRecorder = exports.contextEvaluatedRecorder = exports.toolsRecorder = exports.costRecorder = exports.LiveAgentTurnTracker = exports.LiveToolTracker = exports.LiveLLMTracker = exports.LiveStateRecorder = exports.liveStateRecorder = exports.buildStepGraph = exports.attachFlowchart = exports.runStepRecorder = exports.RunStepRecorder = exports.buildRunSteps = exports.BoundaryRecorder = exports.boundaryRecorder = exports.agentRecorder = exports.compositionRecorder = exports.streamRecorder = exports.ContextRecorder = void 0;
|
|
36
|
+
exports.toolChoiceRecorder = exports.buildChoiceContext = exports.saysWhatNotWhenRule = exports.runToolLintCli = exports.optionalParamRule = exports.MOCK_EMBEDDER_CALIBRATION = exports.formatToolCatalogReport = exports.enumInProseRule = exports.differentiationHint = exports.descriptionRule = exports.defaultStructuralRules = exports.DEFAULT_WHEN_CUES = exports.DEFAULT_WATCH_BAND = exports.DEFAULT_OMISSION_CUES = exports.DEFAULT_CONFUSABILITY_THRESHOLD = exports.confusabilityText = exports.coerceCatalog = exports.catalogFromTools = exports.analyzeToolCatalog = exports.toBacktrackTrace = exports.verdictFor = exports.suspectLabel = exports.stepOutputText = exports.runAblationProbe = exports.probeFlipped = exports.localizeContextBug = exports.llmEdgeWeigher = exports.llmCallIdsFromEvents = exports.formatContextBugReport = exports.findDroppedContext = exports.defaultSuspectClassifier = exports.defaultOutcomeComparator = exports.CONTEXT_BISECT_DEFAULTS = exports.bisectCulprits = exports.applyAblations = exports.ablationForSuspect = exports.traceDebugAgent = exports.SelfExplainBinding = exports.buildSelfExplainToolProvider = exports.buildSelfExplainSkill = exports.traceToolpack = exports.TOOLPACK_HARD_CAPS = exports.NO_COMPLETED_RUN_MESSAGE = exports.lazyTraceToolpack = exports.callTraceTool = void 0;
|
|
37
37
|
// Tier 1 — context + stream
|
|
38
38
|
var ContextRecorder_js_1 = require("./recorders/core/ContextRecorder.js");
|
|
39
39
|
Object.defineProperty(exports, "ContextRecorder", { enumerable: true, get: function () { return ContextRecorder_js_1.ContextRecorder; } });
|
|
@@ -103,14 +103,20 @@ Object.defineProperty(exports, "adaptWeights", { enumerable: true, get: function
|
|
|
103
103
|
Object.defineProperty(exports, "averageRelevancy", { enumerable: true, get: function () { return index_js_1.averageRelevancy; } });
|
|
104
104
|
Object.defineProperty(exports, "compositeScore", { enumerable: true, get: function () { return index_js_1.compositeScore; } });
|
|
105
105
|
Object.defineProperty(exports, "contentHash", { enumerable: true, get: function () { return index_js_1.contentHash; } });
|
|
106
|
+
Object.defineProperty(exports, "DEFAULT_CLEAR_WINNER_MARGIN", { enumerable: true, get: function () { return index_js_1.DEFAULT_CLEAR_WINNER_MARGIN; } });
|
|
107
|
+
Object.defineProperty(exports, "DEFAULT_CLEAR_WINNER_RATIO", { enumerable: true, get: function () { return index_js_1.DEFAULT_CLEAR_WINNER_RATIO; } });
|
|
106
108
|
Object.defineProperty(exports, "DEFAULT_INFLUENCE_WEIGHTS", { enumerable: true, get: function () { return index_js_1.DEFAULT_INFLUENCE_WEIGHTS; } });
|
|
107
109
|
Object.defineProperty(exports, "DEFAULT_MARGIN_THRESHOLD", { enumerable: true, get: function () { return index_js_1.DEFAULT_MARGIN_THRESHOLD; } });
|
|
108
110
|
Object.defineProperty(exports, "DEFAULT_PERSISTENCE_THRESHOLD", { enumerable: true, get: function () { return index_js_1.DEFAULT_PERSISTENCE_THRESHOLD; } });
|
|
111
|
+
Object.defineProperty(exports, "DEFAULT_SHORTLIST_BAND", { enumerable: true, get: function () { return index_js_1.DEFAULT_SHORTLIST_BAND; } });
|
|
109
112
|
Object.defineProperty(exports, "EmbeddingCache", { enumerable: true, get: function () { return index_js_1.EmbeddingCache; } });
|
|
110
113
|
Object.defineProperty(exports, "embeddingCache", { enumerable: true, get: function () { return index_js_1.embeddingCache; } });
|
|
111
114
|
Object.defineProperty(exports, "finalAnswerSimilarity", { enumerable: true, get: function () { return index_js_1.finalAnswerSimilarity; } });
|
|
115
|
+
Object.defineProperty(exports, "marginStrategy", { enumerable: true, get: function () { return index_js_1.marginStrategy; } });
|
|
112
116
|
Object.defineProperty(exports, "pairwiseSimilarity", { enumerable: true, get: function () { return index_js_1.pairwiseSimilarity; } });
|
|
113
117
|
Object.defineProperty(exports, "persistence", { enumerable: true, get: function () { return index_js_1.persistence; } });
|
|
118
|
+
Object.defineProperty(exports, "rankingConfidence", { enumerable: true, get: function () { return index_js_1.rankingConfidence; } });
|
|
119
|
+
Object.defineProperty(exports, "ratioStrategy", { enumerable: true, get: function () { return index_js_1.ratioStrategy; } });
|
|
114
120
|
Object.defineProperty(exports, "scoreInfluence", { enumerable: true, get: function () { return index_js_1.scoreInfluence; } });
|
|
115
121
|
Object.defineProperty(exports, "scoreMargin", { enumerable: true, get: function () { return index_js_1.scoreMargin; } });
|
|
116
122
|
Object.defineProperty(exports, "structuralProximity", { enumerable: true, get: function () { return index_js_1.structuralProximity; } });
|
|
@@ -145,6 +151,7 @@ Object.defineProperty(exports, "bisectCulprits", { enumerable: true, get: functi
|
|
|
145
151
|
Object.defineProperty(exports, "CONTEXT_BISECT_DEFAULTS", { enumerable: true, get: function () { return index_js_4.CONTEXT_BISECT_DEFAULTS; } });
|
|
146
152
|
Object.defineProperty(exports, "defaultOutcomeComparator", { enumerable: true, get: function () { return index_js_4.defaultOutcomeComparator; } });
|
|
147
153
|
Object.defineProperty(exports, "defaultSuspectClassifier", { enumerable: true, get: function () { return index_js_4.defaultSuspectClassifier; } });
|
|
154
|
+
Object.defineProperty(exports, "findDroppedContext", { enumerable: true, get: function () { return index_js_4.findDroppedContext; } });
|
|
148
155
|
Object.defineProperty(exports, "formatContextBugReport", { enumerable: true, get: function () { return index_js_4.formatContextBugReport; } });
|
|
149
156
|
Object.defineProperty(exports, "llmCallIdsFromEvents", { enumerable: true, get: function () { return index_js_4.llmCallIdsFromEvents; } });
|
|
150
157
|
Object.defineProperty(exports, "llmEdgeWeigher", { enumerable: true, get: function () { return index_js_4.llmEdgeWeigher; } });
|
package/dist/observe.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observe.js","sourceRoot":"","sources":["../src/observe.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;;;;A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AAkB,OAAA;AAClB,2HAAA,kBAAkB,OAAA"}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* claims; slice completeness is bounded by tracking — and says so.
|
|
16
16
|
*/
|
|
17
17
|
export { llmEdgeWeigher, stepOutputText, type LlmEdgeWeigherHandle, type LlmEdgeWeigherOptions, type RankedParentEdge, } from './llmEdgeWeigher.js';
|
|
18
|
+
export { findDroppedContext, type ContextUnit, type DroppedUnit, type MissingContextResult, } from './missingContext.js';
|
|
18
19
|
export { defaultSuspectClassifier, formatContextBugReport, llmCallIdsFromEvents, localizeContextBug, suspectLabel, type ClassifyContext, type LocalizeContextBugOptions, type SuspectClassifier, type SuspectSeed, } from './localize.js';
|
|
19
20
|
export { toBacktrackTrace, type BacktrackCustodyHop, type BacktrackHop, type BacktrackSuspectCard, type BacktrackTrace, type BacktrackTrail, type ToBacktrackTraceOptions, } from './toBacktrackTrace.js';
|
|
20
21
|
export { ablationForSuspect, applyAblations, defaultOutcomeComparator, probeFlipped, runAblationProbe, verdictFor, type AblationTargets, type ProbeConfig, } from './ablation.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/context-bisect/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACL,cAAc,EACd,cAAc,EACd,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,GACtB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,YAAY,EACZ,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,WAAW,GACjB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,gBAAgB,EAChB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,uBAAuB,GAC7B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,wBAAwB,EACxB,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,WAAW,GACjB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,cAAc,EACd,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACnB,KAAK,eAAe,GACrB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,uBAAuB,EACvB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,WAAW,GACjB,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/context-bisect/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACL,cAAc,EACd,cAAc,EACd,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,GACtB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,kBAAkB,EAClB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,oBAAoB,GAC1B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,YAAY,EACZ,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,WAAW,GACjB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,gBAAgB,EAChB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,uBAAuB,GAC7B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,wBAAwB,EACxB,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,WAAW,GACjB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,cAAc,EACd,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACnB,KAAK,eAAe,GACrB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,uBAAuB,EACvB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,WAAW,GACjB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* missingContext — interface #3: find context that was AVAILABLE but never
|
|
3
|
+
* reached the model (RFC-003).
|
|
4
|
+
*
|
|
5
|
+
* The localizer's influence ranking (#1) + ablation (#2) handle culprits that
|
|
6
|
+
* are PRESENT in the context. They are blind to the opposite failure: a needed
|
|
7
|
+
* unit that was *dropped* — truncated out of the window, or never selected —
|
|
8
|
+
* so the model never saw it. You cannot ablate what isn't there.
|
|
9
|
+
*
|
|
10
|
+
* This finder is the cheap, exact, deterministic half of that case: a SET
|
|
11
|
+
* DIFFERENCE over unit ids. The library tracks context as identified units
|
|
12
|
+
* (each injection / memory entry / tool result has a stable id), so "what got
|
|
13
|
+
* dropped" is `available − sent` — no embeddings, no LLM, O(n).
|
|
14
|
+
*
|
|
15
|
+
* Causal confirmation is the MIRROR of ablation: RESTORATION. Add a dropped
|
|
16
|
+
* unit back, re-run, and an outcome flip is the causal proof. Like ablation,
|
|
17
|
+
* the re-run is consumer-supplied (the library doesn't own your agent loop);
|
|
18
|
+
* see `findDroppedContext` docs + example 10 for the pattern.
|
|
19
|
+
*
|
|
20
|
+
* Honest claim: a dropped unit is a CANDIDATE missing-context culprit, never a
|
|
21
|
+
* confirmed cause — most dropped context is correctly dropped. Only restoration
|
|
22
|
+
* makes a causal claim.
|
|
23
|
+
*/
|
|
24
|
+
/** One unit of context, identified by a stable id (injection id, memory id,
|
|
25
|
+
* tool-result id, ...). `content` is optional — carried through for display
|
|
26
|
+
* and for the restoration re-run. */
|
|
27
|
+
export interface ContextUnit {
|
|
28
|
+
readonly id: string;
|
|
29
|
+
readonly content?: string;
|
|
30
|
+
}
|
|
31
|
+
/** A unit that was available for the turn but never reached the model. */
|
|
32
|
+
export interface DroppedUnit {
|
|
33
|
+
readonly id: string;
|
|
34
|
+
readonly content?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface MissingContextResult {
|
|
37
|
+
/**
|
|
38
|
+
* Units available for the turn that did NOT reach the model (`available −
|
|
39
|
+
* sent`, matched by id, input order preserved). Each is a CANDIDATE
|
|
40
|
+
* missing-context culprit — confirm by restoration, never assume.
|
|
41
|
+
*/
|
|
42
|
+
readonly dropped: readonly DroppedUnit[];
|
|
43
|
+
/** Distinct available units considered. */
|
|
44
|
+
readonly availableCount: number;
|
|
45
|
+
/** Distinct sent units that reached the model. */
|
|
46
|
+
readonly sentCount: number;
|
|
47
|
+
/** True when anything was dropped — a missing-context bug is possible. */
|
|
48
|
+
readonly anyDropped: boolean;
|
|
49
|
+
/** Human-readable explanation. PRESENTATION ONLY — read `dropped` /
|
|
50
|
+
* `anyDropped` as data, never parse this string. */
|
|
51
|
+
readonly reason: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Find context that was available for a turn but never reached the model —
|
|
55
|
+
* `available − sent` by id. Pure, deterministic, O(n); no model or embedder.
|
|
56
|
+
*
|
|
57
|
+
* Ids are assumed stable and unique per side (duplicates are de-duplicated,
|
|
58
|
+
* first occurrence wins). Units in `sent` but not `available` are ignored.
|
|
59
|
+
*
|
|
60
|
+
* Confirm a candidate causally by RESTORATION (the mirror of ablation): add the
|
|
61
|
+
* dropped unit back into the context and re-run; an outcome flip is the proof.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* const { dropped, anyDropped } = findDroppedContext(assembled, sentToModel);
|
|
65
|
+
* if (anyDropped) {
|
|
66
|
+
* for (const unit of dropped) {
|
|
67
|
+
* if (await rerunWith(unit).outcomeFlips()) report(unit); // restoration = causal
|
|
68
|
+
* }
|
|
69
|
+
* }
|
|
70
|
+
*/
|
|
71
|
+
export declare function findDroppedContext(available: readonly ContextUnit[], sent: readonly ContextUnit[]): MissingContextResult;
|
|
72
|
+
//# sourceMappingURL=missingContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"missingContext.d.ts","sourceRoot":"","sources":["../../../../src/lib/context-bisect/missingContext.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;sCAEsC;AACtC,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,0EAA0E;AAC1E,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;IACzC,2CAA2C;IAC3C,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,kDAAkD;IAClD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,0EAA0E;IAC1E,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B;yDACqD;IACrD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,SAAS,WAAW,EAAE,EACjC,IAAI,EAAE,SAAS,WAAW,EAAE,GAC3B,oBAAoB,CAoBtB"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* rankingConfidence — honesty marker for an influence ranking (RFC-003 honesty
|
|
3
|
+
* marker; influence-core block D6). Internal concept: "attributability".
|
|
4
|
+
*
|
|
5
|
+
* Pattern: pure, embedder-free function over a `scoreInfluence` result.
|
|
6
|
+
* Deterministic; no I/O.
|
|
7
|
+
* Role: `src/lib/influence-core/` leaf. The honesty companion to the
|
|
8
|
+
* four-signal scorer: it says when the ranking is a SHORTLIST,
|
|
9
|
+
* not a verdict.
|
|
10
|
+
*
|
|
11
|
+
* ## Why this exists (the measured blind spot)
|
|
12
|
+
*
|
|
13
|
+
* Output-similarity influence ranks sources by how much they resemble the
|
|
14
|
+
* final answer. That is structurally blind to ABSENCE / CROWDING bugs: a
|
|
15
|
+
* culprit that caused the error by *displacing* context (history truncation,
|
|
16
|
+
* context dilution) need not resemble the answer — so it ranks low, or below
|
|
17
|
+
* an innocent that the answer happens to talk about. The tell is not a low
|
|
18
|
+
* absolute score; it is a FLAT top — no source clearly dominates. This
|
|
19
|
+
* function reports that flatness honestly so consumers escalate to ablation
|
|
20
|
+
* (the causal tier) instead of trusting a confident-but-wrong rank-1.
|
|
21
|
+
*
|
|
22
|
+
* Honest claim (RFC-002 §2 discipline): `clearWinner` is a proxy for "the
|
|
23
|
+
* ranking has a clear lead", never "the lead is the cause". A clear lead can
|
|
24
|
+
* still be an innocent the answer rationalizes over — only ablation makes
|
|
25
|
+
* causal claims.
|
|
26
|
+
*/
|
|
27
|
+
import type { ConfidenceStrategy, InfluenceScore, RankingConfidence } from './types.js';
|
|
28
|
+
/**
|
|
29
|
+
* Default strategy: ABSOLUTE top-2 gap `s0 − s1 >= threshold`. Simple and
|
|
30
|
+
* interpretable, but embedder-relative (the gap scale depends on the embedding
|
|
31
|
+
* geometry). Use `ratioStrategy` for cross-embedder transfer.
|
|
32
|
+
*/
|
|
33
|
+
export declare function marginStrategy(threshold?: number): ConfidenceStrategy;
|
|
34
|
+
/**
|
|
35
|
+
* Scale-invariant strategy: top-2 gap as a FRACTION of the top score,
|
|
36
|
+
* `(s0 − s1) / |s0| >= threshold`. Transfers across embedders / answer lengths
|
|
37
|
+
* where the absolute margin does not. A zero (or all-equal) top is never a
|
|
38
|
+
* clear winner.
|
|
39
|
+
*/
|
|
40
|
+
export declare function ratioStrategy(threshold?: number): ConfidenceStrategy;
|
|
41
|
+
export interface RankingConfidenceOptions {
|
|
42
|
+
/**
|
|
43
|
+
* The decisiveness rule. Default: `marginStrategy(clearWinnerMargin)`.
|
|
44
|
+
* When set, it WINS — `clearWinnerMargin` is ignored. Bring your own
|
|
45
|
+
* (e.g. entropy / dispersion) or use the shipped `ratioStrategy`.
|
|
46
|
+
*/
|
|
47
|
+
readonly strategy?: ConfidenceStrategy;
|
|
48
|
+
/** Threshold for the DEFAULT margin strategy (ignored when `strategy` is
|
|
49
|
+
* set). Default: `DEFAULT_CLEAR_WINNER_MARGIN` (0.05). */
|
|
50
|
+
readonly clearWinnerMargin?: number;
|
|
51
|
+
/** Score band below the top defining the shortlist to double-check.
|
|
52
|
+
* Default: `DEFAULT_SHORTLIST_BAND` (0.1). Recommended >=
|
|
53
|
+
* `clearWinnerMargin` so the shortlist is at least as wide as the
|
|
54
|
+
* winning gap (the function also guarantees the runner-up is shortlisted
|
|
55
|
+
* when there is no clear winner, so a smaller value is safe). */
|
|
56
|
+
readonly shortlistBand?: number;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Assess whether an influence ranking has a clear winner to trust as a lead,
|
|
60
|
+
* or is too close to call and should be confirmed by ablation.
|
|
61
|
+
*
|
|
62
|
+
* Guarantees (relied on by the localizer): the returned `shortlist` always
|
|
63
|
+
* contains `lead` when there is one, and — when there is NO clear winner and
|
|
64
|
+
* there are ≥2 suspects — always contains the runner-up too (so ablation over
|
|
65
|
+
* the shortlist covers the real culprit even if it ranked below an innocent).
|
|
66
|
+
*
|
|
67
|
+
* @param scores `scoreInfluence` output (any order — re-sorted defensively).
|
|
68
|
+
* Ids are assumed unique (as `scoreInfluence` enforces); the
|
|
69
|
+
* shortlist is de-duplicated defensively regardless.
|
|
70
|
+
* @throws Error on negative or NaN options.
|
|
71
|
+
*/
|
|
72
|
+
export declare function rankingConfidence(scores: readonly InfluenceScore[], options?: RankingConfidenceOptions): RankingConfidence;
|
|
73
|
+
//# sourceMappingURL=attributability.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attributability.d.ts","sourceRoot":"","sources":["../../../../src/lib/influence-core/attributability.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AASxF;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,SAAS,GAAE,MAAoC,GAAG,kBAAkB,CAMlG;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,SAAS,GAAE,MAAmC,GAAG,kBAAkB,CAWhG;AAED,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IACvC;+DAC2D;IAC3D,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACpC;;;;sEAIkE;IAClE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAeD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,SAAS,cAAc,EAAE,EACjC,OAAO,GAAE,wBAA6B,GACrC,iBAAiB,CA0EnB"}
|
|
@@ -24,8 +24,9 @@
|
|
|
24
24
|
* embedding-geometry PROXY — semantic alignment, never model internals
|
|
25
25
|
* and never causal attribution.
|
|
26
26
|
*/
|
|
27
|
-
export type { CandidateScore, EmbedArgs, EmbedBatchArgs, Embedder, EvidenceInput, InfluenceScore, InfluenceWeights, MarginCandidate, MarginResult, PairwiseSimilarityResult, SignalScores, SimilarityItem, SimilarityPair, } from './types.js';
|
|
28
|
-
export { DEFAULT_INFLUENCE_WEIGHTS, DEFAULT_MARGIN_THRESHOLD, DEFAULT_PERSISTENCE_THRESHOLD, } from './types.js';
|
|
27
|
+
export type { CandidateScore, ConfidenceStrategy, EmbedArgs, EmbedBatchArgs, Embedder, EvidenceInput, InfluenceScore, InfluenceWeights, MarginCandidate, MarginResult, PairwiseSimilarityResult, RankingConfidence, SignalScores, SimilarityItem, SimilarityPair, } from './types.js';
|
|
28
|
+
export { DEFAULT_CLEAR_WINNER_MARGIN, DEFAULT_CLEAR_WINNER_RATIO, DEFAULT_INFLUENCE_WEIGHTS, DEFAULT_MARGIN_THRESHOLD, DEFAULT_PERSISTENCE_THRESHOLD, DEFAULT_SHORTLIST_BAND, } from './types.js';
|
|
29
|
+
export { marginStrategy, rankingConfidence, ratioStrategy, type RankingConfidenceOptions, } from './attributability.js';
|
|
29
30
|
export { contentHash, EmbeddingCache, embeddingCache, type EmbeddingCacheOptions, type EmbeddingCacheStats, } from './cache.js';
|
|
30
31
|
export { adaptWeights, averageRelevancy, compositeScore, finalAnswerSimilarity, persistence, scoreInfluence, structuralProximity, type ScoreInfluenceArgs, } from './signals.js';
|
|
31
32
|
export { pairwiseSimilarity, type PairwiseSimilarityArgs } from './similarity.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/influence-core/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,YAAY,EACV,cAAc,EACd,SAAS,EACT,cAAc,EACd,QAAQ,EACR,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,wBAAwB,EACxB,YAAY,EACZ,cAAc,EACd,cAAc,GACf,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,6BAA6B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/influence-core/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,SAAS,EACT,cAAc,EACd,QAAQ,EACR,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,wBAAwB,EACxB,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,cAAc,GACf,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,EACxB,6BAA6B,EAC7B,sBAAsB,GACvB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,KAAK,wBAAwB,GAC9B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,WAAW,EACX,cAAc,EACd,cAAc,EACd,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,GACzB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,qBAAqB,EACrB,WAAW,EACX,cAAc,EACd,mBAAmB,EACnB,KAAK,kBAAkB,GACxB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,kBAAkB,EAAE,KAAK,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAElF,OAAO,EAAE,WAAW,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -46,6 +46,101 @@ export declare const DEFAULT_INFLUENCE_WEIGHTS: InfluenceWeights;
|
|
|
46
46
|
export declare const DEFAULT_PERSISTENCE_THRESHOLD = 0.3;
|
|
47
47
|
/** RFC-002 §4 default: margins below this flag the choice as `narrow`. */
|
|
48
48
|
export declare const DEFAULT_MARGIN_THRESHOLD = 0.05;
|
|
49
|
+
/**
|
|
50
|
+
* RFC-003 default: an influence ranking whose top-1 vs top-2 score margin is
|
|
51
|
+
* below this has NO clear winner — a shortlist, not a verdict. Escalate to
|
|
52
|
+
* ablation.
|
|
53
|
+
*
|
|
54
|
+
* UNCALIBRATED proxy starting point, chosen for interpretability. `margin`
|
|
55
|
+
* is an ABSOLUTE difference on the same scale as `scoreInfluence`'s composite
|
|
56
|
+
* (S ∈ ≈[−0.7, 1]), so this threshold is EMBEDDER-RELATIVE — recalibrate by
|
|
57
|
+
* sweeping clear-winner vs flat rankings on your embedder. The numeric
|
|
58
|
+
* coincidence with `DEFAULT_MARGIN_THRESHOLD` is NOT a shared derivation: that
|
|
59
|
+
* one measures `scoreMargin`'s chosen-vs-not-chosen distribution, a different
|
|
60
|
+
* statistic.
|
|
61
|
+
*/
|
|
62
|
+
export declare const DEFAULT_CLEAR_WINNER_MARGIN = 0.05;
|
|
63
|
+
/**
|
|
64
|
+
* RFC-003 default: when there is no clear winner, suspects scoring within this
|
|
65
|
+
* band of the top form the shortlist ablation should COVER (the culprit may be
|
|
66
|
+
* any of them — or, for absence bugs, none). UNCALIBRATED proxy; embedder-
|
|
67
|
+
* relative (see `DEFAULT_CLEAR_WINNER_MARGIN`).
|
|
68
|
+
*/
|
|
69
|
+
export declare const DEFAULT_SHORTLIST_BAND = 0.1;
|
|
70
|
+
/**
|
|
71
|
+
* RFC-003 default for `ratioStrategy`: the top-2 gap as a FRACTION of the top
|
|
72
|
+
* score `(s0 − s1) / |s0|`. Unlike the absolute margin this is scale-invariant,
|
|
73
|
+
* so it transfers across embedders / answer lengths. UNCALIBRATED proxy.
|
|
74
|
+
*/
|
|
75
|
+
export declare const DEFAULT_CLEAR_WINNER_RATIO = 0.05;
|
|
76
|
+
/**
|
|
77
|
+
* Pluggable rule for "does one source clearly win this ranking?" — the
|
|
78
|
+
* decisiveness test inside `rankingConfidence`. The library ships
|
|
79
|
+
* `marginStrategy` (default, absolute gap) and `ratioStrategy` (scale-
|
|
80
|
+
* invariant); consumers may bring their own (e.g. entropy / dispersion). The
|
|
81
|
+
* framework around it — always shortlisting the lead, covering the runner-up
|
|
82
|
+
* when there is no clear winner, malformed-score robustness — is NOT the
|
|
83
|
+
* strategy's concern; the strategy only judges the clean, all-finite case.
|
|
84
|
+
*/
|
|
85
|
+
export interface ConfidenceStrategy {
|
|
86
|
+
/** Identifies the rule — shown in `reason`, and the key on a benchmark
|
|
87
|
+
* leaderboard of strategies. */
|
|
88
|
+
readonly name: string;
|
|
89
|
+
/**
|
|
90
|
+
* Given the FINITE scores sorted DESCENDING (length >= 2), decide whether
|
|
91
|
+
* one source clearly dominates. Pure and deterministic.
|
|
92
|
+
*/
|
|
93
|
+
isClearWinner(rankedScores: readonly number[]): boolean;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Confidence in an influence ranking (`scoreInfluence` output) — the honesty
|
|
97
|
+
* companion to the scorer.
|
|
98
|
+
*
|
|
99
|
+
* Output-similarity influence is a PROXY: it ranks sources by how much they
|
|
100
|
+
* resemble the final answer. It is structurally BLIND to absence/crowding bugs
|
|
101
|
+
* — a culprit that caused the error by *displacing* context (history
|
|
102
|
+
* truncation, context dilution) need not resemble the answer at all, so it can
|
|
103
|
+
* rank low or off the top. This result makes that honesty explicit: when no
|
|
104
|
+
* source clearly dominates, the ranking is a SHORTLIST to confirm by ablation,
|
|
105
|
+
* never a verdict. Mirrors the causal slice's incompleteness markers — the
|
|
106
|
+
* library says what its proxy cannot see.
|
|
107
|
+
*/
|
|
108
|
+
export interface RankingConfidence {
|
|
109
|
+
/**
|
|
110
|
+
* True when one source clearly dominates (`margin >= clearWinnerMargin`),
|
|
111
|
+
* so the ranking can be trusted as a LEAD. False = treat as shortlist +
|
|
112
|
+
* ablate. (A single suspect is trivially a clear winner — by absence of
|
|
113
|
+
* alternatives, not strength of signal.) NOTE: this is the inverse of the
|
|
114
|
+
* sibling `MarginResult.flags.narrow`. Honesty: a clear winner means the
|
|
115
|
+
* proxy has a clear top, NOT that the top is the cause — a high-similarity
|
|
116
|
+
* innocent the answer rationalizes over can win; ablation is the only causal
|
|
117
|
+
* confirmation in either branch.
|
|
118
|
+
*/
|
|
119
|
+
readonly clearWinner: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* `score(#1) − score(#2)`, an ABSOLUTE difference on the composite-score
|
|
122
|
+
* scale (embedder-relative). `undefined` when fewer than 2 suspects, when
|
|
123
|
+
* all scores are malformed, or when the runner-up score is unavailable
|
|
124
|
+
* (a clean top over a malformed #2). Read `clearWinner` to disambiguate.
|
|
125
|
+
*/
|
|
126
|
+
readonly margin: number | undefined;
|
|
127
|
+
/** Id of the top-ranked suspect (the lead). `undefined` only when there are
|
|
128
|
+
* none. Under an exact top tie this is the input-order first and not
|
|
129
|
+
* meaningful (there is no clear winner anyway). */
|
|
130
|
+
readonly lead: string | undefined;
|
|
131
|
+
/**
|
|
132
|
+
* Suspects within the band of the top score — the set ablation should COVER.
|
|
133
|
+
* CONSUME ONLY WHEN `clearWinner` IS FALSE; when there is a clear winner this
|
|
134
|
+
* is informational (the band near the top), not an ablation worklist. Always
|
|
135
|
+
* includes `lead` when present, and — when no clear winner with ≥2 suspects —
|
|
136
|
+
* the runner-up too. De-duplicated.
|
|
137
|
+
*/
|
|
138
|
+
readonly shortlist: readonly string[];
|
|
139
|
+
/** Human-readable explanation for narratives / reports. PRESENTATION ONLY —
|
|
140
|
+
* read `clearWinner` / `margin` / `shortlist` as data, never parse this
|
|
141
|
+
* string. */
|
|
142
|
+
readonly reason: string;
|
|
143
|
+
}
|
|
49
144
|
/** The four signal values for one evidence item (paper Eq. 1–4). */
|
|
50
145
|
export interface SignalScores {
|
|
51
146
|
/** FA — cosine(evidence, finalAnswer). Range [-1, 1]. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/influence-core/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAKH,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAE3F;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,oCAAoC;IACpC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,8BAA8B;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,uCAAuC;IACvC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,mEAAmE;AACnE,eAAO,MAAM,yBAAyB,EAAE,gBAKtC,CAAC;AAEH,yDAAyD;AACzD,eAAO,MAAM,6BAA6B,MAAM,CAAC;AAEjD,0EAA0E;AAC1E,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAE7C,oEAAoE;AACpE,MAAM,WAAW,YAAY;IAC3B,yDAAyD;IACzD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,oEAAoE;IACpE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,qDAAqD;IACrD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;oEACoE;AACpE,MAAM,WAAW,aAAa;IAC5B,iEAAiE;IACjE,QAAQ,CAAC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