veryfront 0.1.946 → 0.1.948
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/esm/deno.js +1 -1
- package/esm/src/eval/index.d.ts +2 -0
- package/esm/src/eval/index.d.ts.map +1 -1
- package/esm/src/eval/index.js +1 -0
- package/esm/src/eval/judges.d.ts +28 -0
- package/esm/src/eval/judges.d.ts.map +1 -0
- package/esm/src/eval/judges.js +199 -0
- package/esm/src/integrations/schema.d.ts +4 -4
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +1 -1
package/esm/deno.js
CHANGED
package/esm/src/eval/index.d.ts
CHANGED
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
import "../../_dnt.polyfills.js";
|
|
46
46
|
export { datasets } from "./datasets.js";
|
|
47
47
|
export { evalAgent, isEvalDefinition } from "./factory.js";
|
|
48
|
+
export { judges } from "./judges.js";
|
|
48
49
|
export { metrics } from "./metrics.js";
|
|
49
50
|
export { createEvalReport, summarizeEvalRecords } from "./report.js";
|
|
50
51
|
export { compareEvalReports } from "./baseline.js";
|
|
@@ -52,6 +53,7 @@ export { runEval } from "./runner.js";
|
|
|
52
53
|
export { deriveEvalId, discoverEvals, findEvalById } from "./discovery.js";
|
|
53
54
|
export { createEvalSourceDocument, getEvalEditableFieldSchema, getEvalRunSchema, getEvalSourceDocumentSchema, getEvalSourcePatchSchema, getEvalSourceReferenceSchema, getEvalStudioCapabilitySchema, } from "./studio.js";
|
|
54
55
|
export type { DiscoveredEval, EvalDiscoveryOptions, EvalDiscoveryResult } from "./discovery.js";
|
|
56
|
+
export type { EvalLlmGroundednessJudgeOptions } from "./judges.js";
|
|
55
57
|
export type { EvalAgentAdapter, EvalAgentAdapterContext, EvalAgentAdapterResult, EvalAgentInput, EvalAnswerGroundednessMetricOptions, EvalCheckContext, EvalDataset, EvalDatasetLoadContext, EvalDefinition, EvalDurationSummary, EvalExample, EvalExampleInput, EvalExpect, EvalExpectation, EvalFailedExampleSummary, EvalFlakeSummary, EvalGateFailureSummary, EvalKnowledgeExpectedSource, EvalKnowledgeMrrMetricOptions, EvalKnowledgeRetrievalMetricOptions, EvalMetric, EvalMetricContext, EvalMetricDeltaSummary, EvalMetricFamily, EvalMetricResult, EvalMetricSummary, EvalMetricThreshold, EvalRecord, EvalReport, EvalReportComparison, EvalReportExportConfig, EvalReportSummary, EvalSeverity, EvalSource, EvalTargetKind, EvalToolCall, EvalToolCallCountOptions, EvalToolCallMatchOptions, EvalToolCallStatus, EvalToolInputMatchMode, EvalTrace, EvalUsage, EvalUsageSummary, RunEvalOptions, } from "./types.js";
|
|
56
58
|
export type { CreateEvalSourceDocumentOptions, EvalEditableField, EvalRun, EvalSourceDocument, EvalSourcePatch, EvalSourceReference, EvalStudioCapability, } from "./studio.js";
|
|
57
59
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/eval/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,OAAO,yBAAyB,CAAC;AAGjC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,gBAAgB,EAChB,2BAA2B,EAC3B,wBAAwB,EACxB,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,aAAa,CAAC;AAErB,YAAY,EAAE,cAAc,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAChG,YAAY,EACV,gBAAgB,EAChB,uBAAuB,EACvB,sBAAsB,EACtB,cAAc,EACd,mCAAmC,EACnC,gBAAgB,EAChB,WAAW,EACX,sBAAsB,EACtB,cAAc,EACd,mBAAmB,EACnB,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,wBAAwB,EACxB,gBAAgB,EAChB,sBAAsB,EACtB,2BAA2B,EAC3B,6BAA6B,EAC7B,mCAAmC,EACnC,UAAU,EACV,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACV,UAAU,EACV,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACV,cAAc,EACd,YAAY,EACZ,wBAAwB,EACxB,wBAAwB,EACxB,kBAAkB,EAClB,sBAAsB,EACtB,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,cAAc,GACf,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,+BAA+B,EAC/B,iBAAiB,EACjB,OAAO,EACP,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/eval/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,OAAO,yBAAyB,CAAC;AAGjC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,gBAAgB,EAChB,2BAA2B,EAC3B,wBAAwB,EACxB,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,aAAa,CAAC;AAErB,YAAY,EAAE,cAAc,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAChG,YAAY,EAAE,+BAA+B,EAAE,MAAM,aAAa,CAAC;AAEnE,YAAY,EACV,gBAAgB,EAChB,uBAAuB,EACvB,sBAAsB,EACtB,cAAc,EACd,mCAAmC,EACnC,gBAAgB,EAChB,WAAW,EACX,sBAAsB,EACtB,cAAc,EACd,mBAAmB,EACnB,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,wBAAwB,EACxB,gBAAgB,EAChB,sBAAsB,EACtB,2BAA2B,EAC3B,6BAA6B,EAC7B,mCAAmC,EACnC,UAAU,EACV,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACV,UAAU,EACV,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACV,cAAc,EACd,YAAY,EACZ,wBAAwB,EACxB,wBAAwB,EACxB,kBAAkB,EAClB,sBAAsB,EACtB,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,cAAc,GACf,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,+BAA+B,EAC/B,iBAAiB,EACjB,OAAO,EACP,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,aAAa,CAAC"}
|
package/esm/src/eval/index.js
CHANGED
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
import "../../_dnt.polyfills.js";
|
|
46
46
|
export { datasets } from "./datasets.js";
|
|
47
47
|
export { evalAgent, isEvalDefinition } from "./factory.js";
|
|
48
|
+
export { judges } from "./judges.js";
|
|
48
49
|
export { metrics } from "./metrics.js";
|
|
49
50
|
export { createEvalReport, summarizeEvalRecords } from "./report.js";
|
|
50
51
|
export { compareEvalReports } from "./baseline.js";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type ModelRuntime } from "../provider/index.js";
|
|
2
|
+
import type { EvalAnswerGroundednessMetricOptions } from "./types.js";
|
|
3
|
+
type GroundednessJudge = NonNullable<EvalAnswerGroundednessMetricOptions["judge"]>;
|
|
4
|
+
/** Options for the built-in LLM groundedness judge. */
|
|
5
|
+
export interface EvalLlmGroundednessJudgeOptions {
|
|
6
|
+
/** Model id or runtime used to judge answer grounding. Defaults to the runtime auto model. */
|
|
7
|
+
model?: string | ModelRuntime;
|
|
8
|
+
/** Minimum score required for the judge to pass. Defaults to 0.8. */
|
|
9
|
+
threshold?: number;
|
|
10
|
+
/** Maximum retrieved evidence characters included in the judge prompt. Defaults to 12000. */
|
|
11
|
+
maxEvidenceChars?: number;
|
|
12
|
+
/** Maximum judge response tokens. Defaults to 800. */
|
|
13
|
+
maxOutputTokens?: number;
|
|
14
|
+
/** Judge model temperature. Defaults to 0 for repeatability. */
|
|
15
|
+
temperature?: number;
|
|
16
|
+
/** Provider-specific options forwarded to the model runtime. */
|
|
17
|
+
providerOptions?: Record<string, unknown>;
|
|
18
|
+
}
|
|
19
|
+
declare function createLlmGroundednessJudge(options?: EvalLlmGroundednessJudgeOptions): GroundednessJudge;
|
|
20
|
+
/** Built-in judge factories for semantic eval metrics. */
|
|
21
|
+
export declare const judges: {
|
|
22
|
+
readonly llm: {
|
|
23
|
+
/** Create an LLM judge for `metrics.answer.groundedness`. */
|
|
24
|
+
readonly groundedness: typeof createLlmGroundednessJudge;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=judges.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"judges.d.ts","sourceRoot":"","sources":["../../../src/src/eval/judges.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAgB,MAAM,sBAAsB,CAAC;AAGvE,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,YAAY,CAAC;AAEtE,KAAK,iBAAiB,GAAG,WAAW,CAAC,mCAAmC,CAAC,OAAO,CAAC,CAAC,CAAC;AAEnF,uDAAuD;AACvD,MAAM,WAAW,+BAA+B;IAC9C,8FAA8F;IAC9F,KAAK,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAC9B,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6FAA6F;IAC7F,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,sDAAsD;IACtD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC3C;AAyLD,iBAAS,0BAA0B,CACjC,OAAO,GAAE,+BAAoC,GAC5C,iBAAiB,CAoBnB;AAED,0DAA0D;AAC1D,eAAO,MAAM,MAAM;;QAEf,6DAA6D;;;CAGvD,CAAC"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { resolveRuntimeModel } from "../agent/runtime/model-resolution.js";
|
|
2
|
+
import { resolveModel } from "../provider/index.js";
|
|
3
|
+
import { generateText } from "../runtime/runtime-bridge.js";
|
|
4
|
+
const DEFAULT_JUDGE_MODEL = "auto";
|
|
5
|
+
const DEFAULT_THRESHOLD = 0.8;
|
|
6
|
+
const DEFAULT_MAX_EVIDENCE_CHARS = 12_000;
|
|
7
|
+
const DEFAULT_MAX_OUTPUT_TOKENS = 800;
|
|
8
|
+
function asJson(value) {
|
|
9
|
+
try {
|
|
10
|
+
return JSON.stringify(value, null, 2);
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
return String(value);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function clampScore(score) {
|
|
17
|
+
if (!Number.isFinite(score))
|
|
18
|
+
return 0;
|
|
19
|
+
return Math.max(0, Math.min(1, score));
|
|
20
|
+
}
|
|
21
|
+
function resolveJudgeModel(model) {
|
|
22
|
+
if (model && typeof model === "object")
|
|
23
|
+
return model;
|
|
24
|
+
return resolveModel(resolveRuntimeModel(model ?? DEFAULT_JUDGE_MODEL));
|
|
25
|
+
}
|
|
26
|
+
function truncate(value, maxChars) {
|
|
27
|
+
if (value.length <= maxChars)
|
|
28
|
+
return value;
|
|
29
|
+
return `${value.slice(0, Math.max(0, maxChars - 24))}\n[truncated]`;
|
|
30
|
+
}
|
|
31
|
+
function buildEvidenceBlock(evidence, sources, maxChars) {
|
|
32
|
+
const entries = evidence.length > 0 ? evidence : ["No retrieved evidence was provided."];
|
|
33
|
+
const sourceBlock = sources.length > 0
|
|
34
|
+
? sources.map((source, index) => `- [source ${index + 1}] ${source}`).join("\n")
|
|
35
|
+
: "- none";
|
|
36
|
+
const evidenceBlock = entries.map((entry, index) => `[evidence ${index + 1}]\n${entry}`).join("\n\n");
|
|
37
|
+
const block = `Retrieved sources:
|
|
38
|
+
${sourceBlock}
|
|
39
|
+
|
|
40
|
+
Evidence snippets:
|
|
41
|
+
${evidenceBlock}`;
|
|
42
|
+
return truncate(block, maxChars);
|
|
43
|
+
}
|
|
44
|
+
function buildGroundednessPrompt(input, options) {
|
|
45
|
+
return `Evaluate whether an agent answer is grounded in retrieved evidence.
|
|
46
|
+
|
|
47
|
+
Rubric:
|
|
48
|
+
${input.rubric}
|
|
49
|
+
|
|
50
|
+
Rules:
|
|
51
|
+
- Grade only against the evidence and the reference.
|
|
52
|
+
- Treat unsupported factual claims, unsupported instructions, or missing required actions as failures.
|
|
53
|
+
- Do not reward keyword overlap by itself. Judge semantic support.
|
|
54
|
+
- Use score 1.0 only when all material claims are supported and the answer satisfies the reference.
|
|
55
|
+
- Use score 0.8 for mostly grounded answers with only minor omissions.
|
|
56
|
+
- Use score 0.5 for partially grounded answers with material omissions.
|
|
57
|
+
- Use score 0.0 for ungrounded, contradictory, or non-responsive answers.
|
|
58
|
+
- Pass only when score is at least ${options.threshold}.
|
|
59
|
+
|
|
60
|
+
Return only valid JSON with this shape:
|
|
61
|
+
{
|
|
62
|
+
"score": 0.0,
|
|
63
|
+
"pass": false,
|
|
64
|
+
"explanation": "Short reason.",
|
|
65
|
+
"unsupportedClaims": ["claim not supported by evidence"],
|
|
66
|
+
"missingEvidence": ["required point missing from the answer"]
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
Input:
|
|
70
|
+
${asJson(input.input)}
|
|
71
|
+
|
|
72
|
+
Reference:
|
|
73
|
+
${asJson(input.reference)}
|
|
74
|
+
|
|
75
|
+
Metadata:
|
|
76
|
+
${asJson(input.metadata)}
|
|
77
|
+
|
|
78
|
+
Answer:
|
|
79
|
+
${asJson(input.output)}
|
|
80
|
+
|
|
81
|
+
Evidence:
|
|
82
|
+
${buildEvidenceBlock(input.evidence, input.sources, options.maxEvidenceChars)}
|
|
83
|
+
`;
|
|
84
|
+
}
|
|
85
|
+
function stripJsonFence(value) {
|
|
86
|
+
const trimmed = value.trim();
|
|
87
|
+
if (!trimmed.startsWith("```"))
|
|
88
|
+
return trimmed;
|
|
89
|
+
return trimmed.replace(/^```(?:json)?\s*/i, "").replace(/\s*```$/, "").trim();
|
|
90
|
+
}
|
|
91
|
+
function extractJsonObject(value) {
|
|
92
|
+
const stripped = stripJsonFence(value);
|
|
93
|
+
try {
|
|
94
|
+
JSON.parse(stripped);
|
|
95
|
+
return stripped;
|
|
96
|
+
}
|
|
97
|
+
catch {
|
|
98
|
+
// Continue and extract the first balanced object from explanatory text.
|
|
99
|
+
}
|
|
100
|
+
const start = stripped.indexOf("{");
|
|
101
|
+
if (start === -1)
|
|
102
|
+
return null;
|
|
103
|
+
let depth = 0;
|
|
104
|
+
let inString = false;
|
|
105
|
+
let escaped = false;
|
|
106
|
+
for (let index = start; index < stripped.length; index++) {
|
|
107
|
+
const char = stripped[index];
|
|
108
|
+
if (escaped) {
|
|
109
|
+
escaped = false;
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
if (inString && char === "\\") {
|
|
113
|
+
escaped = true;
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
if (char === '"') {
|
|
117
|
+
inString = !inString;
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
if (inString)
|
|
121
|
+
continue;
|
|
122
|
+
if (char === "{")
|
|
123
|
+
depth += 1;
|
|
124
|
+
if (char === "}")
|
|
125
|
+
depth -= 1;
|
|
126
|
+
if (depth === 0)
|
|
127
|
+
return stripped.slice(start, index + 1);
|
|
128
|
+
}
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
function stringList(value) {
|
|
132
|
+
if (!Array.isArray(value))
|
|
133
|
+
return [];
|
|
134
|
+
return value.filter((item) => typeof item === "string" && item.trim() !== "");
|
|
135
|
+
}
|
|
136
|
+
function parseJudgeResponse(text, threshold) {
|
|
137
|
+
const json = extractJsonObject(text);
|
|
138
|
+
if (!json) {
|
|
139
|
+
return {
|
|
140
|
+
score: 0,
|
|
141
|
+
pass: false,
|
|
142
|
+
explanation: "LLM judge did not return valid JSON.",
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
try {
|
|
146
|
+
const parsed = JSON.parse(json);
|
|
147
|
+
const score = clampScore(typeof parsed.score === "number" ? parsed.score : 0);
|
|
148
|
+
const modelPass = typeof parsed.pass === "boolean" ? parsed.pass : true;
|
|
149
|
+
const unsupportedClaims = stringList(parsed.unsupportedClaims);
|
|
150
|
+
const missingEvidence = stringList(parsed.missingEvidence);
|
|
151
|
+
const details = [
|
|
152
|
+
typeof parsed.explanation === "string" && parsed.explanation.trim()
|
|
153
|
+
? parsed.explanation.trim()
|
|
154
|
+
: "LLM judge returned a structured groundedness score.",
|
|
155
|
+
...(unsupportedClaims.length > 0
|
|
156
|
+
? [`Unsupported claims: ${unsupportedClaims.join("; ")}`]
|
|
157
|
+
: []),
|
|
158
|
+
...(missingEvidence.length > 0 ? [`Missing evidence: ${missingEvidence.join("; ")}`] : []),
|
|
159
|
+
];
|
|
160
|
+
return {
|
|
161
|
+
score,
|
|
162
|
+
pass: modelPass && score >= threshold,
|
|
163
|
+
explanation: details.join(" "),
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
catch {
|
|
167
|
+
return {
|
|
168
|
+
score: 0,
|
|
169
|
+
pass: false,
|
|
170
|
+
explanation: "LLM judge returned malformed JSON.",
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
function createLlmGroundednessJudge(options = {}) {
|
|
175
|
+
const threshold = options.threshold ?? DEFAULT_THRESHOLD;
|
|
176
|
+
const maxEvidenceChars = options.maxEvidenceChars ?? DEFAULT_MAX_EVIDENCE_CHARS;
|
|
177
|
+
const maxOutputTokens = options.maxOutputTokens ?? DEFAULT_MAX_OUTPUT_TOKENS;
|
|
178
|
+
return async (input) => {
|
|
179
|
+
const model = resolveJudgeModel(options.model);
|
|
180
|
+
const response = await generateText({
|
|
181
|
+
model,
|
|
182
|
+
messages: [{
|
|
183
|
+
role: "user",
|
|
184
|
+
content: buildGroundednessPrompt(input, { threshold, maxEvidenceChars }),
|
|
185
|
+
}],
|
|
186
|
+
maxOutputTokens,
|
|
187
|
+
temperature: options.temperature ?? 0,
|
|
188
|
+
...(options.providerOptions ? { providerOptions: options.providerOptions } : {}),
|
|
189
|
+
});
|
|
190
|
+
return parseJudgeResponse(response.text, threshold);
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
/** Built-in judge factories for semantic eval metrics. */
|
|
194
|
+
export const judges = {
|
|
195
|
+
llm: {
|
|
196
|
+
/** Create an LLM judge for `metrics.answer.groundedness`. */
|
|
197
|
+
groundedness: createLlmGroundednessJudge,
|
|
198
|
+
},
|
|
199
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { InferSchema } from "../extensions/schema/index.js";
|
|
2
|
-
export declare const getIntegrationNameSchema: () => import("../internal-agents/schema.js").Schema<"close" | "render" | "openai" | "cohere" | "github" | "cloudflare" | "square" | "anthropic" | "linear" | "gmail" | "slack" | "calendar" | "jira" | "notion" | "servicenow" | "confluence" | "gitlab" | "outlook" | "teams" | "figma" | "sap" | "sheets" | "airtable" | "supabase" | "neon" | "sharepoint" | "stripe" | "salesforce" | "twitter" | "onedrive" | "bitbucket" | "sentry" | "posthog" | "persona" | "zendesk" | "asana" | "harvest" | "hubspot" | "monday" | "zoom" | "trello" | "box" | "shopify" | "clickup" | "intercom" | "pipedrive" | "mailchimp" | "webex" | "freshdesk" | "quickbooks" | "xero" | "drive" | "docs-google" | "snowflake" | "mixpanel" | "twilio" | "aws" | "todoist" | "calendly" | "google-analytics" | "klaviyo" | "datadog" | "paypal" | "activecampaign" | "algolia" | "amplitude" | "apollo" | "ashby" | "attio" | "basecamp" | "brevo" | "circleci" | "coda" | "dialpad" | "digitalocean" | "exa" | "fathom" | "firecrawl" | "fireflies" | "folk" | "gemini" | "gong" | "google-chat" | "gusto" | "jotform" | "lever" | "metabase" | "
|
|
2
|
+
export declare const getIntegrationNameSchema: () => import("../internal-agents/schema.js").Schema<"close" | "render" | "openai" | "cohere" | "github" | "cloudflare" | "square" | "anthropic" | "mistral" | "linear" | "gmail" | "slack" | "calendar" | "jira" | "notion" | "servicenow" | "confluence" | "gitlab" | "outlook" | "teams" | "figma" | "sap" | "sheets" | "airtable" | "supabase" | "neon" | "sharepoint" | "stripe" | "salesforce" | "twitter" | "onedrive" | "bitbucket" | "sentry" | "posthog" | "persona" | "zendesk" | "asana" | "harvest" | "hubspot" | "monday" | "zoom" | "trello" | "box" | "shopify" | "clickup" | "intercom" | "pipedrive" | "mailchimp" | "webex" | "freshdesk" | "quickbooks" | "xero" | "drive" | "docs-google" | "snowflake" | "mixpanel" | "twilio" | "aws" | "todoist" | "calendly" | "google-analytics" | "klaviyo" | "datadog" | "paypal" | "activecampaign" | "algolia" | "amplitude" | "apollo" | "ashby" | "attio" | "basecamp" | "brevo" | "circleci" | "coda" | "dialpad" | "digitalocean" | "exa" | "fathom" | "firecrawl" | "fireflies" | "folk" | "gemini" | "gong" | "google-chat" | "gusto" | "jotform" | "lever" | "metabase" | "pagerduty" | "perplexity" | "productboard" | "razorpay" | "resend" | "salesflare" | "segment" | "sendgrid" | "shortcut" | "tavily" | "typeform" | "apify" | "assemblyai" | "axiom" | "betterstack" | "browserbase" | "buildkite" | "checkly" | "clickhouse" | "deepgram" | "elevenlabs" | "fal" | "fireworks-ai" | "fly-io" | "grafana-cloud" | "groq" | "heroku" | "huggingface" | "langfuse" | "langsmith" | "launchdarkly" | "mongodb-atlas" | "netlify" | "new-relic" | "openrouter" | "pinecone" | "planetscale" | "qdrant" | "railway" | "redis-cloud" | "replicate" | "snyk" | "stability-ai" | "together-ai" | "vercel" | "weaviate" | "bamboohr" | "cal-com" | "customer-io" | "discord" | "docusign" | "gocardless" | "google-bigquery" | "google-contacts" | "help-scout" | "telegram" | "whatsapp" | "woocommerce" | "zoho-crm" | "adyen" | "azure-blob-storage" | "bigcommerce" | "brave-search" | "chargebee" | "databricks" | "deel" | "front" | "google-cloud-storage" | "google-forms" | "gorgias" | "greenhouse" | "guru" | "mollie" | "paddle" | "pandadoc" | "personio" | "portkey" | "power-bi" | "ramp" | "rippling" | "serpapi" | "shopware" | "surveymonkey" | "tally" | "wix" | "workable" | "azure" | "azure-document-intelligence" | "billbee" | "cleverreach" | "datev" | "factorial" | "finapi" | "gcp" | "hetzner" | "ionos" | "klarna" | "lexoffice" | "mindee" | "moss" | "neo4j" | "north-data" | "qonto" | "sendcloud" | "sevdesk" | "skribble" | "stackit" | "trusted-shops" | "unstructured" | "unzer" | "voyage-ai" | "xentral" | "alphavantage" | "daytona" | "e2b" | "polygon" | "sprites">;
|
|
3
3
|
/** Zod schema for integration name. */
|
|
4
|
-
export declare const IntegrationNameSchema: import("../internal-agents/schema.js").Schema<"close" | "render" | "openai" | "cohere" | "github" | "cloudflare" | "square" | "anthropic" | "linear" | "gmail" | "slack" | "calendar" | "jira" | "notion" | "servicenow" | "confluence" | "gitlab" | "outlook" | "teams" | "figma" | "sap" | "sheets" | "airtable" | "supabase" | "neon" | "sharepoint" | "stripe" | "salesforce" | "twitter" | "onedrive" | "bitbucket" | "sentry" | "posthog" | "persona" | "zendesk" | "asana" | "harvest" | "hubspot" | "monday" | "zoom" | "trello" | "box" | "shopify" | "clickup" | "intercom" | "pipedrive" | "mailchimp" | "webex" | "freshdesk" | "quickbooks" | "xero" | "drive" | "docs-google" | "snowflake" | "mixpanel" | "twilio" | "aws" | "todoist" | "calendly" | "google-analytics" | "klaviyo" | "datadog" | "paypal" | "activecampaign" | "algolia" | "amplitude" | "apollo" | "ashby" | "attio" | "basecamp" | "brevo" | "circleci" | "coda" | "dialpad" | "digitalocean" | "exa" | "fathom" | "firecrawl" | "fireflies" | "folk" | "gemini" | "gong" | "google-chat" | "gusto" | "jotform" | "lever" | "metabase" | "
|
|
4
|
+
export declare const IntegrationNameSchema: import("../internal-agents/schema.js").Schema<"close" | "render" | "openai" | "cohere" | "github" | "cloudflare" | "square" | "anthropic" | "mistral" | "linear" | "gmail" | "slack" | "calendar" | "jira" | "notion" | "servicenow" | "confluence" | "gitlab" | "outlook" | "teams" | "figma" | "sap" | "sheets" | "airtable" | "supabase" | "neon" | "sharepoint" | "stripe" | "salesforce" | "twitter" | "onedrive" | "bitbucket" | "sentry" | "posthog" | "persona" | "zendesk" | "asana" | "harvest" | "hubspot" | "monday" | "zoom" | "trello" | "box" | "shopify" | "clickup" | "intercom" | "pipedrive" | "mailchimp" | "webex" | "freshdesk" | "quickbooks" | "xero" | "drive" | "docs-google" | "snowflake" | "mixpanel" | "twilio" | "aws" | "todoist" | "calendly" | "google-analytics" | "klaviyo" | "datadog" | "paypal" | "activecampaign" | "algolia" | "amplitude" | "apollo" | "ashby" | "attio" | "basecamp" | "brevo" | "circleci" | "coda" | "dialpad" | "digitalocean" | "exa" | "fathom" | "firecrawl" | "fireflies" | "folk" | "gemini" | "gong" | "google-chat" | "gusto" | "jotform" | "lever" | "metabase" | "pagerduty" | "perplexity" | "productboard" | "razorpay" | "resend" | "salesflare" | "segment" | "sendgrid" | "shortcut" | "tavily" | "typeform" | "apify" | "assemblyai" | "axiom" | "betterstack" | "browserbase" | "buildkite" | "checkly" | "clickhouse" | "deepgram" | "elevenlabs" | "fal" | "fireworks-ai" | "fly-io" | "grafana-cloud" | "groq" | "heroku" | "huggingface" | "langfuse" | "langsmith" | "launchdarkly" | "mongodb-atlas" | "netlify" | "new-relic" | "openrouter" | "pinecone" | "planetscale" | "qdrant" | "railway" | "redis-cloud" | "replicate" | "snyk" | "stability-ai" | "together-ai" | "vercel" | "weaviate" | "bamboohr" | "cal-com" | "customer-io" | "discord" | "docusign" | "gocardless" | "google-bigquery" | "google-contacts" | "help-scout" | "telegram" | "whatsapp" | "woocommerce" | "zoho-crm" | "adyen" | "azure-blob-storage" | "bigcommerce" | "brave-search" | "chargebee" | "databricks" | "deel" | "front" | "google-cloud-storage" | "google-forms" | "gorgias" | "greenhouse" | "guru" | "mollie" | "paddle" | "pandadoc" | "personio" | "portkey" | "power-bi" | "ramp" | "rippling" | "serpapi" | "shopware" | "surveymonkey" | "tally" | "wix" | "workable" | "azure" | "azure-document-intelligence" | "billbee" | "cleverreach" | "datev" | "factorial" | "finapi" | "gcp" | "hetzner" | "ionos" | "klarna" | "lexoffice" | "mindee" | "moss" | "neo4j" | "north-data" | "qonto" | "sendcloud" | "sevdesk" | "skribble" | "stackit" | "trusted-shops" | "unstructured" | "unzer" | "voyage-ai" | "xentral" | "alphavantage" | "daytona" | "e2b" | "polygon" | "sprites">;
|
|
5
5
|
/**
|
|
6
6
|
* Every registered integration name. The single source of truth for catalog
|
|
7
7
|
* surfaces (CLI validation, MCP listings) — derive from this instead of
|
|
@@ -529,7 +529,7 @@ export declare const IntegrationPromptSchema: import("../internal-agents/schema.
|
|
|
529
529
|
icon: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
530
530
|
}>>;
|
|
531
531
|
export declare const getIntegrationConfigSchema: () => import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
532
|
-
name: import("../internal-agents/schema.js").Schema<"close" | "render" | "openai" | "cohere" | "github" | "cloudflare" | "square" | "anthropic" | "linear" | "gmail" | "slack" | "calendar" | "jira" | "notion" | "servicenow" | "confluence" | "gitlab" | "outlook" | "teams" | "figma" | "sap" | "sheets" | "airtable" | "supabase" | "neon" | "sharepoint" | "stripe" | "salesforce" | "twitter" | "onedrive" | "bitbucket" | "sentry" | "posthog" | "persona" | "zendesk" | "asana" | "harvest" | "hubspot" | "monday" | "zoom" | "trello" | "box" | "shopify" | "clickup" | "intercom" | "pipedrive" | "mailchimp" | "webex" | "freshdesk" | "quickbooks" | "xero" | "drive" | "docs-google" | "snowflake" | "mixpanel" | "twilio" | "aws" | "todoist" | "calendly" | "google-analytics" | "klaviyo" | "datadog" | "paypal" | "activecampaign" | "algolia" | "amplitude" | "apollo" | "ashby" | "attio" | "basecamp" | "brevo" | "circleci" | "coda" | "dialpad" | "digitalocean" | "exa" | "fathom" | "firecrawl" | "fireflies" | "folk" | "gemini" | "gong" | "google-chat" | "gusto" | "jotform" | "lever" | "metabase" | "
|
|
532
|
+
name: import("../internal-agents/schema.js").Schema<"close" | "render" | "openai" | "cohere" | "github" | "cloudflare" | "square" | "anthropic" | "mistral" | "linear" | "gmail" | "slack" | "calendar" | "jira" | "notion" | "servicenow" | "confluence" | "gitlab" | "outlook" | "teams" | "figma" | "sap" | "sheets" | "airtable" | "supabase" | "neon" | "sharepoint" | "stripe" | "salesforce" | "twitter" | "onedrive" | "bitbucket" | "sentry" | "posthog" | "persona" | "zendesk" | "asana" | "harvest" | "hubspot" | "monday" | "zoom" | "trello" | "box" | "shopify" | "clickup" | "intercom" | "pipedrive" | "mailchimp" | "webex" | "freshdesk" | "quickbooks" | "xero" | "drive" | "docs-google" | "snowflake" | "mixpanel" | "twilio" | "aws" | "todoist" | "calendly" | "google-analytics" | "klaviyo" | "datadog" | "paypal" | "activecampaign" | "algolia" | "amplitude" | "apollo" | "ashby" | "attio" | "basecamp" | "brevo" | "circleci" | "coda" | "dialpad" | "digitalocean" | "exa" | "fathom" | "firecrawl" | "fireflies" | "folk" | "gemini" | "gong" | "google-chat" | "gusto" | "jotform" | "lever" | "metabase" | "pagerduty" | "perplexity" | "productboard" | "razorpay" | "resend" | "salesflare" | "segment" | "sendgrid" | "shortcut" | "tavily" | "typeform" | "apify" | "assemblyai" | "axiom" | "betterstack" | "browserbase" | "buildkite" | "checkly" | "clickhouse" | "deepgram" | "elevenlabs" | "fal" | "fireworks-ai" | "fly-io" | "grafana-cloud" | "groq" | "heroku" | "huggingface" | "langfuse" | "langsmith" | "launchdarkly" | "mongodb-atlas" | "netlify" | "new-relic" | "openrouter" | "pinecone" | "planetscale" | "qdrant" | "railway" | "redis-cloud" | "replicate" | "snyk" | "stability-ai" | "together-ai" | "vercel" | "weaviate" | "bamboohr" | "cal-com" | "customer-io" | "discord" | "docusign" | "gocardless" | "google-bigquery" | "google-contacts" | "help-scout" | "telegram" | "whatsapp" | "woocommerce" | "zoho-crm" | "adyen" | "azure-blob-storage" | "bigcommerce" | "brave-search" | "chargebee" | "databricks" | "deel" | "front" | "google-cloud-storage" | "google-forms" | "gorgias" | "greenhouse" | "guru" | "mollie" | "paddle" | "pandadoc" | "personio" | "portkey" | "power-bi" | "ramp" | "rippling" | "serpapi" | "shopware" | "surveymonkey" | "tally" | "wix" | "workable" | "azure" | "azure-document-intelligence" | "billbee" | "cleverreach" | "datev" | "factorial" | "finapi" | "gcp" | "hetzner" | "ionos" | "klarna" | "lexoffice" | "mindee" | "moss" | "neo4j" | "north-data" | "qonto" | "sendcloud" | "sevdesk" | "skribble" | "stackit" | "trusted-shops" | "unstructured" | "unzer" | "voyage-ai" | "xentral" | "alphavantage" | "daytona" | "e2b" | "polygon" | "sprites">;
|
|
533
533
|
displayName: import("../internal-agents/schema.js").Schema<string>;
|
|
534
534
|
icon: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
535
535
|
description: import("../internal-agents/schema.js").Schema<string>;
|
|
@@ -693,7 +693,7 @@ export declare const getIntegrationConfigSchema: () => import("../internal-agent
|
|
|
693
693
|
}>>;
|
|
694
694
|
/** Zod schema for integration config. */
|
|
695
695
|
export declare const IntegrationConfigSchema: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
696
|
-
name: import("../internal-agents/schema.js").Schema<"close" | "render" | "openai" | "cohere" | "github" | "cloudflare" | "square" | "anthropic" | "linear" | "gmail" | "slack" | "calendar" | "jira" | "notion" | "servicenow" | "confluence" | "gitlab" | "outlook" | "teams" | "figma" | "sap" | "sheets" | "airtable" | "supabase" | "neon" | "sharepoint" | "stripe" | "salesforce" | "twitter" | "onedrive" | "bitbucket" | "sentry" | "posthog" | "persona" | "zendesk" | "asana" | "harvest" | "hubspot" | "monday" | "zoom" | "trello" | "box" | "shopify" | "clickup" | "intercom" | "pipedrive" | "mailchimp" | "webex" | "freshdesk" | "quickbooks" | "xero" | "drive" | "docs-google" | "snowflake" | "mixpanel" | "twilio" | "aws" | "todoist" | "calendly" | "google-analytics" | "klaviyo" | "datadog" | "paypal" | "activecampaign" | "algolia" | "amplitude" | "apollo" | "ashby" | "attio" | "basecamp" | "brevo" | "circleci" | "coda" | "dialpad" | "digitalocean" | "exa" | "fathom" | "firecrawl" | "fireflies" | "folk" | "gemini" | "gong" | "google-chat" | "gusto" | "jotform" | "lever" | "metabase" | "
|
|
696
|
+
name: import("../internal-agents/schema.js").Schema<"close" | "render" | "openai" | "cohere" | "github" | "cloudflare" | "square" | "anthropic" | "mistral" | "linear" | "gmail" | "slack" | "calendar" | "jira" | "notion" | "servicenow" | "confluence" | "gitlab" | "outlook" | "teams" | "figma" | "sap" | "sheets" | "airtable" | "supabase" | "neon" | "sharepoint" | "stripe" | "salesforce" | "twitter" | "onedrive" | "bitbucket" | "sentry" | "posthog" | "persona" | "zendesk" | "asana" | "harvest" | "hubspot" | "monday" | "zoom" | "trello" | "box" | "shopify" | "clickup" | "intercom" | "pipedrive" | "mailchimp" | "webex" | "freshdesk" | "quickbooks" | "xero" | "drive" | "docs-google" | "snowflake" | "mixpanel" | "twilio" | "aws" | "todoist" | "calendly" | "google-analytics" | "klaviyo" | "datadog" | "paypal" | "activecampaign" | "algolia" | "amplitude" | "apollo" | "ashby" | "attio" | "basecamp" | "brevo" | "circleci" | "coda" | "dialpad" | "digitalocean" | "exa" | "fathom" | "firecrawl" | "fireflies" | "folk" | "gemini" | "gong" | "google-chat" | "gusto" | "jotform" | "lever" | "metabase" | "pagerduty" | "perplexity" | "productboard" | "razorpay" | "resend" | "salesflare" | "segment" | "sendgrid" | "shortcut" | "tavily" | "typeform" | "apify" | "assemblyai" | "axiom" | "betterstack" | "browserbase" | "buildkite" | "checkly" | "clickhouse" | "deepgram" | "elevenlabs" | "fal" | "fireworks-ai" | "fly-io" | "grafana-cloud" | "groq" | "heroku" | "huggingface" | "langfuse" | "langsmith" | "launchdarkly" | "mongodb-atlas" | "netlify" | "new-relic" | "openrouter" | "pinecone" | "planetscale" | "qdrant" | "railway" | "redis-cloud" | "replicate" | "snyk" | "stability-ai" | "together-ai" | "vercel" | "weaviate" | "bamboohr" | "cal-com" | "customer-io" | "discord" | "docusign" | "gocardless" | "google-bigquery" | "google-contacts" | "help-scout" | "telegram" | "whatsapp" | "woocommerce" | "zoho-crm" | "adyen" | "azure-blob-storage" | "bigcommerce" | "brave-search" | "chargebee" | "databricks" | "deel" | "front" | "google-cloud-storage" | "google-forms" | "gorgias" | "greenhouse" | "guru" | "mollie" | "paddle" | "pandadoc" | "personio" | "portkey" | "power-bi" | "ramp" | "rippling" | "serpapi" | "shopware" | "surveymonkey" | "tally" | "wix" | "workable" | "azure" | "azure-document-intelligence" | "billbee" | "cleverreach" | "datev" | "factorial" | "finapi" | "gcp" | "hetzner" | "ionos" | "klarna" | "lexoffice" | "mindee" | "moss" | "neo4j" | "north-data" | "qonto" | "sendcloud" | "sevdesk" | "skribble" | "stackit" | "trusted-shops" | "unstructured" | "unzer" | "voyage-ai" | "xentral" | "alphavantage" | "daytona" | "e2b" | "polygon" | "sprites">;
|
|
697
697
|
displayName: import("../internal-agents/schema.js").Schema<string>;
|
|
698
698
|
icon: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
699
699
|
description: import("../internal-agents/schema.js").Schema<string>;
|