@dalmia/calibrate-mcp 0.0.85 → 0.0.86
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/bin/mcp-server.js +124 -31
- package/bin/mcp-server.js.map +19 -14
- package/esm/funcs/annotationTasksGetAgreement.js +1 -6
- package/esm/funcs/annotationTasksGetAgreement.js.map +1 -1
- package/esm/landing-page.js +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.js +1 -1
- package/esm/mcp-server/tools/annotationTasksGetAgreement.js +1 -1
- package/esm/models/annotatorresponse.d.ts +2 -0
- package/esm/models/annotatorresponse.d.ts.map +1 -1
- package/esm/models/annotatorresponse.js +3 -0
- package/esm/models/annotatorresponse.js.map +1 -1
- package/esm/models/answersummary.d.ts +8 -0
- package/esm/models/answersummary.d.ts.map +1 -0
- package/esm/models/answersummary.js +10 -0
- package/esm/models/answersummary.js.map +1 -0
- package/esm/models/evaluatoragreement.d.ts +41 -0
- package/esm/models/evaluatoragreement.d.ts.map +1 -0
- package/esm/models/evaluatoragreement.js +42 -0
- package/esm/models/evaluatoragreement.js.map +1 -0
- package/esm/models/evaluatorswithhumansblock.d.ts +7 -0
- package/esm/models/evaluatorswithhumansblock.d.ts.map +1 -0
- package/esm/models/evaluatorswithhumansblock.js +9 -0
- package/esm/models/evaluatorswithhumansblock.js.map +1 -0
- package/esm/models/humanagreementblock.d.ts +0 -3
- package/esm/models/humanagreementblock.d.ts.map +1 -1
- package/esm/models/humanagreementblock.js +0 -2
- package/esm/models/humanagreementblock.js.map +1 -1
- package/esm/models/interannotatoragreement.d.ts +34 -0
- package/esm/models/interannotatoragreement.d.ts.map +1 -0
- package/esm/models/interannotatoragreement.js +34 -0
- package/esm/models/interannotatoragreement.js.map +1 -0
- package/esm/models/kappaofanswerkind.d.ts +60 -0
- package/esm/models/kappaofanswerkind.d.ts.map +1 -0
- package/esm/models/kappaofanswerkind.js +52 -0
- package/esm/models/kappaofanswerkind.js.map +1 -0
- package/esm/models/taskagreementannotationtaskstaskuuidagreementgetop.d.ts +0 -20
- package/esm/models/taskagreementannotationtaskstaskuuidagreementgetop.d.ts.map +1 -1
- package/esm/models/taskagreementannotationtaskstaskuuidagreementgetop.js +0 -15
- package/esm/models/taskagreementannotationtaskstaskuuidagreementgetop.js.map +1 -1
- package/esm/models/taskagreementresponse.d.ts +4 -5
- package/esm/models/taskagreementresponse.d.ts.map +1 -1
- package/esm/models/taskagreementresponse.js +6 -6
- package/esm/models/taskagreementresponse.js.map +1 -1
- package/esm/tool-names.js +1 -1
- package/esm/tool-names.js.map +1 -1
- package/package.json +1 -1
- package/src/funcs/annotationTasksGetAgreement.ts +1 -6
- package/src/landing-page.ts +1 -1
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/mcp-server/tools/annotationTasksGetAgreement.ts +1 -1
- package/src/models/annotatorresponse.ts +9 -0
- package/src/models/answersummary.ts +19 -0
- package/src/models/evaluatoragreement.ts +85 -0
- package/src/models/evaluatorswithhumansblock.ts +21 -0
- package/src/models/humanagreementblock.ts +0 -5
- package/src/models/interannotatoragreement.ts +69 -0
- package/src/models/kappaofanswerkind.ts +101 -0
- package/src/models/taskagreementannotationtaskstaskuuidagreementgetop.ts +0 -28
- package/src/models/taskagreementresponse.ts +14 -9
- package/src/tool-names.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taskagreementannotationtaskstaskuuidagreementgetop.js","sourceRoot":"","sources":["../../src/models/taskagreementannotationtaskstaskuuidagreementgetop.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"taskagreementannotationtaskstaskuuidagreementgetop.js","sourceRoot":"","sources":["../../src/models/taskagreementannotationtaskstaskuuidagreementgetop.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAEL,6BAA6B,GAC9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAEL,+BAA+B,GAChC,MAAM,4BAA4B,CAAC;AAOpC,MAAM,CAAC,MAAM,iEAAiE,GACP,CAAC,CAAC,MAAM,CAC3E;IACE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;IAC3D,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC1C,CACF,CAAC;AAMJ,MAAM,CAAC,MAAM,kEAAkE,GACP,CAAC,CAAC,KAAK,CAC3E;IACE,+BAA+B;IAC/B,6BAA6B;CAC9B,CACF,CAAC"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
|
+
import { EvaluatorAgreement } from "./evaluatoragreement.js";
|
|
3
|
+
import { EvaluatorsWithHumansBlock } from "./evaluatorswithhumansblock.js";
|
|
2
4
|
import { HumanAgreementBlock } from "./humanagreementblock.js";
|
|
3
5
|
export type TaskAgreementResponse = {
|
|
4
6
|
task_id: string;
|
|
5
|
-
bucket: string;
|
|
6
|
-
days: number;
|
|
7
7
|
human_human: HumanAgreementBlock;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}>;
|
|
8
|
+
evaluators_with_humans: EvaluatorsWithHumansBlock;
|
|
9
|
+
evaluators: Array<EvaluatorAgreement>;
|
|
11
10
|
AdditionalProperties?: {
|
|
12
11
|
[k: string]: any;
|
|
13
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taskagreementresponse.d.ts","sourceRoot":"","sources":["../../src/models/taskagreementresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"taskagreementresponse.d.ts","sourceRoot":"","sources":["../../src/models/taskagreementresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EACL,kBAAkB,EAEnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,yBAAyB,EAE1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,mBAAmB,EAGpB,MAAM,0BAA0B,CAAC;AAElC,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,mBAAmB,CAAC;IACjC,sBAAsB,EAAE,yBAAyB,CAAC;IAClD,UAAU,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACtC,oBAAoB,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CAC7C,CAAC;AAEF,eAAO,MAAM,+BAA+B,EAAE,CAAC,CAAC,OAAO,CAAC,qBAAqB,CAY1E,CAAC;AAEJ,eAAO,MAAM,uCAAuC,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAcjE,CAAC"}
|
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as z from "zod";
|
|
5
5
|
import { collectExtraKeys as collectExtraKeys$ } from "../lib/schemas.js";
|
|
6
|
+
import { EvaluatorAgreement$zodSchema, } from "./evaluatoragreement.js";
|
|
7
|
+
import { EvaluatorsWithHumansBlock$zodSchema, } from "./evaluatorswithhumansblock.js";
|
|
6
8
|
import { HumanAgreementBlock$zodSchema, HumanAgreementBlock$zodSchemaOutbound, } from "./humanagreementblock.js";
|
|
7
9
|
export const TaskAgreementResponse$zodSchema = collectExtraKeys$(z.object({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
evaluators: z.array(z.record(z.string(), z.any())).describe("Agreement between each evaluator and the annotators, plus that evaluator's own results and the human results, one entry per linked evaluator"),
|
|
10
|
+
evaluators: z.array(EvaluatorAgreement$zodSchema).describe("Agreement between each evaluator and the annotators, plus that evaluator's own results and the human results, one entry per linked evaluator"),
|
|
11
|
+
evaluators_with_humans: EvaluatorsWithHumansBlock$zodSchema,
|
|
11
12
|
human_human: HumanAgreementBlock$zodSchema,
|
|
12
13
|
task_id: z.string().describe("ID of the task"),
|
|
13
14
|
}).catchall(z.any()), "AdditionalProperties", true);
|
|
14
15
|
export const TaskAgreementResponse$zodSchemaOutbound = z.object({
|
|
15
16
|
AdditionalProperties: z.record(z.string(), z.any()).optional(),
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
evaluators: z.array(z.record(z.string(), z.any())),
|
|
17
|
+
evaluators: z.array(EvaluatorAgreement$zodSchema),
|
|
18
|
+
evaluators_with_humans: EvaluatorsWithHumansBlock$zodSchema,
|
|
19
19
|
human_human: HumanAgreementBlock$zodSchemaOutbound,
|
|
20
20
|
task_id: z.string(),
|
|
21
21
|
}).transform((v) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taskagreementresponse.js","sourceRoot":"","sources":["../../src/models/taskagreementresponse.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,gBAAgB,IAAI,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAEL,
|
|
1
|
+
{"version":3,"file":"taskagreementresponse.js","sourceRoot":"","sources":["../../src/models/taskagreementresponse.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,gBAAgB,IAAI,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAEL,4BAA4B,GAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,mCAAmC,GACpC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAEL,6BAA6B,EAC7B,qCAAqC,GACtC,MAAM,0BAA0B,CAAC;AAUlC,MAAM,CAAC,MAAM,+BAA+B,GAC1C,iBAAiB,CACf,CAAC,CAAC,MAAM,CAAC;IACP,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC,QAAQ,CACxD,8IAA8I,CAC/I;IACD,sBAAsB,EAAE,mCAAmC;IAC3D,WAAW,EAAE,6BAA6B;IAC1C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;CAC/C,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,EACpB,sBAAsB,EACtB,IAAI,CACL,CAAC;AAEJ,MAAM,CAAC,MAAM,uCAAuC,GAAmB,CAAC,CAAC,MAAM,CAC7E;IACE,oBAAoB,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC9D,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,4BAA4B,CAAC;IACjD,sBAAsB,EAAE,mCAAmC;IAC3D,WAAW,EAAE,qCAAqC;IAClD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;CACpB,CACF,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IAChB,MAAM,EAAE,oBAAoB,EAAE,GAAG,IAAI,EAAE,GAAG,CAAC,CAAC;IAC5C,OAAO;QACL,GAAG,IAAI;QACP,GAAG,oBAAoB;KACxB,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/esm/tool-names.js
CHANGED
|
@@ -158,7 +158,7 @@ export const toolNames = [
|
|
|
158
158
|
},
|
|
159
159
|
{
|
|
160
160
|
"name": "get-annotation-agreement",
|
|
161
|
-
"description": "Get human-vs-human and human-vs-evaluator agreement metrics for a task, with a
|
|
161
|
+
"description": "Get human-vs-human and human-vs-evaluator agreement metrics for a task, with a chance-corrected kappa for each evaluator.\n"
|
|
162
162
|
},
|
|
163
163
|
{
|
|
164
164
|
"name": "get-annotation-summary",
|
package/esm/tool-names.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-names.js","sourceRoot":"","sources":["../src/tool-names.ts"],"names":[],"mappings":"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
|
|
1
|
+
{"version":3,"file":"tool-names.js","sourceRoot":"","sources":["../src/tool-names.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { CalibrateMcpCore } from "../core.js";
|
|
6
|
-
import {
|
|
6
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
7
7
|
import { compactMap } from "../lib/primitives.js";
|
|
8
8
|
import { safeParse } from "../lib/schemas.js";
|
|
9
9
|
import { RequestOptions } from "../lib/sdks.js";
|
|
@@ -96,10 +96,6 @@ async function $do(
|
|
|
96
96
|
const path$ = pathToFunc("/annotation-tasks/{task_uuid}/agreement")(
|
|
97
97
|
pathParams$,
|
|
98
98
|
);
|
|
99
|
-
const query$ = encodeFormQuery({
|
|
100
|
-
"bucket": payload$.bucket,
|
|
101
|
-
"days": payload$.days,
|
|
102
|
-
});
|
|
103
99
|
|
|
104
100
|
const headers$ = new Headers(compactMap({
|
|
105
101
|
Accept: "application/json",
|
|
@@ -136,7 +132,6 @@ async function $do(
|
|
|
136
132
|
baseURL: options?.serverURL,
|
|
137
133
|
path: path$,
|
|
138
134
|
headers: headers$,
|
|
139
|
-
query: query$,
|
|
140
135
|
body: body$,
|
|
141
136
|
userAgent: client$._options.userAgent,
|
|
142
137
|
timeoutMs: options?.timeoutMs || client$._options.timeoutMs
|
package/src/landing-page.ts
CHANGED
|
@@ -930,7 +930,7 @@ http_headers = { "api-key-auth" = "YOUR_API_KEY_AUTH" }`;
|
|
|
930
930
|
<h1>Instructions</h1>
|
|
931
931
|
<p>One-click installation for Claude Desktop users</p>
|
|
932
932
|
<div class="instruction-item">
|
|
933
|
-
<a href="https://github.com/dalmia/calibrate-mcp/releases/download/v0.0.
|
|
933
|
+
<a href="https://github.com/dalmia/calibrate-mcp/releases/download/v0.0.86/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
|
|
934
934
|
📥 Download MCP Bundle
|
|
935
935
|
</a>
|
|
936
936
|
</div>
|
package/src/lib/config.ts
CHANGED
|
@@ -65,8 +65,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
export const SDK_METADATA = {
|
|
66
66
|
language: "typescript",
|
|
67
67
|
openapiDocVersion: "0.1.0",
|
|
68
|
-
sdkVersion: "0.0.
|
|
68
|
+
sdkVersion: "0.0.86",
|
|
69
69
|
genVersion: "2.915.1",
|
|
70
70
|
userAgent:
|
|
71
|
-
"speakeasy-sdk/mcp-typescript 0.0.
|
|
71
|
+
"speakeasy-sdk/mcp-typescript 0.0.86 2.915.1 0.1.0 @dalmia/calibrate-mcp",
|
|
72
72
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -13,7 +13,7 @@ const args = {
|
|
|
13
13
|
export const tool$annotationTasksGetAgreement: ToolDefinition<typeof args> = {
|
|
14
14
|
name: "get-annotation-agreement",
|
|
15
15
|
description:
|
|
16
|
-
`Get human-vs-human and human-vs-evaluator agreement metrics for a task, with a
|
|
16
|
+
`Get human-vs-human and human-vs-evaluator agreement metrics for a task, with a chance-corrected kappa for each evaluator.
|
|
17
17
|
`,
|
|
18
18
|
scopes: ["read"],
|
|
19
19
|
annotations: {
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
KappaOfAnswerKind,
|
|
8
|
+
KappaOfAnswerKind$zodSchema,
|
|
9
|
+
} from "./kappaofanswerkind.js";
|
|
6
10
|
|
|
7
11
|
export type AnnotatorResponse = {
|
|
8
12
|
uuid: string;
|
|
@@ -12,6 +16,7 @@ export type AnnotatorResponse = {
|
|
|
12
16
|
jobs_count?: number | null | undefined;
|
|
13
17
|
current_agreement?: number | null | undefined;
|
|
14
18
|
pair_count?: number | null | undefined;
|
|
19
|
+
kappa_by_kind?: Array<KappaOfAnswerKind> | null | undefined;
|
|
15
20
|
};
|
|
16
21
|
|
|
17
22
|
export const AnnotatorResponse$zodSchema: z.ZodType<AnnotatorResponse> = z
|
|
@@ -25,6 +30,10 @@ export const AnnotatorResponse$zodSchema: z.ZodType<AnnotatorResponse> = z
|
|
|
25
30
|
jobs_count: z.int().nullable().optional().describe(
|
|
26
31
|
"Number of labelling jobs assigned to this annotator",
|
|
27
32
|
),
|
|
33
|
+
kappa_by_kind: z.array(KappaOfAnswerKind$zodSchema).nullable().optional()
|
|
34
|
+
.describe(
|
|
35
|
+
"Agreement with the other annotators and its kappa, one entry for each kind of answer compared, binary answers first. The kinds are never combined into one kappa",
|
|
36
|
+
),
|
|
28
37
|
name: z.string().describe("Annotator name"),
|
|
29
38
|
pair_count: z.int().nullable().optional().describe(
|
|
30
39
|
"Number of comparable annotation pairs behind the current agreement score",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
export type AnswerSummary = {
|
|
8
|
+
count: number;
|
|
9
|
+
true_count: number | null;
|
|
10
|
+
mean: number | null;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const AnswerSummary$zodSchema: z.ZodType<AnswerSummary> = z.object({
|
|
14
|
+
count: z.int().describe("How many answers there are"),
|
|
15
|
+
mean: z.number().nullable().describe("Mean of the rating answers"),
|
|
16
|
+
true_count: z.int().nullable().describe(
|
|
17
|
+
"How many pass/fail answers are a pass",
|
|
18
|
+
),
|
|
19
|
+
});
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
import { AnswerSummary, AnswerSummary$zodSchema } from "./answersummary.js";
|
|
8
|
+
import {
|
|
9
|
+
InterAnnotatorAgreement,
|
|
10
|
+
InterAnnotatorAgreement$zodSchema,
|
|
11
|
+
} from "./interannotatoragreement.js";
|
|
12
|
+
|
|
13
|
+
export const EvaluatorAgreementKappaType = {
|
|
14
|
+
Fleiss: "fleiss",
|
|
15
|
+
LinearWeightedFleiss: "linear_weighted_fleiss",
|
|
16
|
+
Cohen: "cohen",
|
|
17
|
+
LinearWeightedCohen: "linear_weighted_cohen",
|
|
18
|
+
} as const;
|
|
19
|
+
export type EvaluatorAgreementKappaType = ClosedEnum<
|
|
20
|
+
typeof EvaluatorAgreementKappaType
|
|
21
|
+
>;
|
|
22
|
+
|
|
23
|
+
export const EvaluatorAgreementKappaType$zodSchema = z.enum([
|
|
24
|
+
"fleiss",
|
|
25
|
+
"linear_weighted_fleiss",
|
|
26
|
+
"cohen",
|
|
27
|
+
"linear_weighted_cohen",
|
|
28
|
+
]);
|
|
29
|
+
|
|
30
|
+
export const EvaluatorAgreementKappaBlankReason = {
|
|
31
|
+
TooFewItems: "too_few_items",
|
|
32
|
+
EveryoneAgreed: "everyone_agreed",
|
|
33
|
+
} as const;
|
|
34
|
+
export type EvaluatorAgreementKappaBlankReason = ClosedEnum<
|
|
35
|
+
typeof EvaluatorAgreementKappaBlankReason
|
|
36
|
+
>;
|
|
37
|
+
|
|
38
|
+
export const EvaluatorAgreementKappaBlankReason$zodSchema = z.enum([
|
|
39
|
+
"too_few_items",
|
|
40
|
+
"everyone_agreed",
|
|
41
|
+
]);
|
|
42
|
+
|
|
43
|
+
export type EvaluatorAgreement = {
|
|
44
|
+
kappa: number | null;
|
|
45
|
+
kappa_type: EvaluatorAgreementKappaType | null;
|
|
46
|
+
kappa_blank_reason: EvaluatorAgreementKappaBlankReason | null;
|
|
47
|
+
chance_agreement: number | null;
|
|
48
|
+
evaluator_id: string;
|
|
49
|
+
name: string | null;
|
|
50
|
+
current: number | null;
|
|
51
|
+
pair_count: number;
|
|
52
|
+
inter_annotator: InterAnnotatorAgreement;
|
|
53
|
+
result: AnswerSummary;
|
|
54
|
+
human_result: AnswerSummary | null;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export const EvaluatorAgreement$zodSchema: z.ZodType<EvaluatorAgreement> = z
|
|
58
|
+
.object({
|
|
59
|
+
chance_agreement: z.number().nullable().describe(
|
|
60
|
+
"Agreement expected by chance alone, which `kappa` corrects for, on the same scale as the agreement",
|
|
61
|
+
),
|
|
62
|
+
current: z.number().nullable().describe(
|
|
63
|
+
"Current mean agreement between this evaluator's judge and the annotators",
|
|
64
|
+
),
|
|
65
|
+
evaluator_id: z.string().describe("ID of the evaluator"),
|
|
66
|
+
human_result: AnswerSummary$zodSchema.nullable().describe(
|
|
67
|
+
"The annotators' answers for this evaluator",
|
|
68
|
+
),
|
|
69
|
+
inter_annotator: InterAnnotatorAgreement$zodSchema,
|
|
70
|
+
kappa: z.number().nullable().describe(
|
|
71
|
+
"Agreement corrected for the agreement expected by chance, where 1 is perfect agreement, 0 is chance level, and below 0 is worse than chance",
|
|
72
|
+
),
|
|
73
|
+
kappa_blank_reason: EvaluatorAgreementKappaBlankReason$zodSchema.nullable()
|
|
74
|
+
.describe(
|
|
75
|
+
"Why `kappa` is blank when answers were compared:\n\n- `too_few_items`: every evaluator compared these answers on only one item, and one item cannot show the agreement expected by chance\n- `everyone_agreed`: every compared answer is the same, so agreement cannot be told apart from chance\n",
|
|
76
|
+
),
|
|
77
|
+
kappa_type: EvaluatorAgreementKappaType$zodSchema.nullable().describe(
|
|
78
|
+
"The kind of kappa reported in `kappa`:\n\n- `fleiss`: Fleiss' kappa between three or more annotators\n- `linear_weighted_fleiss`: Fleiss' kappa between three or more annotators, giving partial credit to close ratings\n- `cohen`: Cohen's kappa between exactly two annotators, between a judge and the annotators, or between one annotator and the others\n- `linear_weighted_cohen`: Cohen's kappa between exactly two annotators, between a judge and the annotators, or between one annotator and the others, giving partial credit to close ratings\n",
|
|
79
|
+
),
|
|
80
|
+
name: z.string().nullable().describe("Name of the evaluator"),
|
|
81
|
+
pair_count: z.int().describe(
|
|
82
|
+
"How many judge and annotator pairs the current value averages over",
|
|
83
|
+
),
|
|
84
|
+
result: AnswerSummary$zodSchema,
|
|
85
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
export type EvaluatorsWithHumansBlock = {
|
|
8
|
+
current: number | null;
|
|
9
|
+
pair_count: number;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const EvaluatorsWithHumansBlock$zodSchema: z.ZodType<
|
|
13
|
+
EvaluatorsWithHumansBlock
|
|
14
|
+
> = z.object({
|
|
15
|
+
current: z.number().nullable().describe(
|
|
16
|
+
"Current mean agreement between the evaluators and the annotators, weighted by how many pairs each evaluator compared",
|
|
17
|
+
),
|
|
18
|
+
pair_count: z.int().describe(
|
|
19
|
+
"How many evaluator and annotator pairs the current value averages over",
|
|
20
|
+
),
|
|
21
|
+
});
|
|
@@ -8,7 +8,6 @@ import { collectExtraKeys as collectExtraKeys$ } from "../lib/schemas.js";
|
|
|
8
8
|
export type HumanAgreementBlock = {
|
|
9
9
|
current: number | null;
|
|
10
10
|
pair_count: number;
|
|
11
|
-
series: Array<{ [k: string]: any }>;
|
|
12
11
|
AdditionalProperties?: { [k: string]: any };
|
|
13
12
|
};
|
|
14
13
|
|
|
@@ -21,9 +20,6 @@ export const HumanAgreementBlock$zodSchema: z.ZodType<HumanAgreementBlock> =
|
|
|
21
20
|
pair_count: z.int().describe(
|
|
22
21
|
"How many annotator pairs the current value averages over",
|
|
23
22
|
),
|
|
24
|
-
series: z.array(z.record(z.string(), z.any())).describe(
|
|
25
|
-
"Agreement over time, one point per time bucket",
|
|
26
|
-
),
|
|
27
23
|
}).catchall(z.any()),
|
|
28
24
|
"AdditionalProperties",
|
|
29
25
|
true,
|
|
@@ -33,7 +29,6 @@ export const HumanAgreementBlock$zodSchemaOutbound: z.ZodType<any> = z.object({
|
|
|
33
29
|
AdditionalProperties: z.record(z.string(), z.any()).optional(),
|
|
34
30
|
current: z.nullable(z.number()),
|
|
35
31
|
pair_count: z.int(),
|
|
36
|
-
series: z.array(z.record(z.string(), z.any())),
|
|
37
32
|
}).transform((v) => {
|
|
38
33
|
const { AdditionalProperties, ...rest } = v;
|
|
39
34
|
return {
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const InterAnnotatorAgreementKappaType = {
|
|
9
|
+
Fleiss: "fleiss",
|
|
10
|
+
LinearWeightedFleiss: "linear_weighted_fleiss",
|
|
11
|
+
Cohen: "cohen",
|
|
12
|
+
LinearWeightedCohen: "linear_weighted_cohen",
|
|
13
|
+
} as const;
|
|
14
|
+
export type InterAnnotatorAgreementKappaType = ClosedEnum<
|
|
15
|
+
typeof InterAnnotatorAgreementKappaType
|
|
16
|
+
>;
|
|
17
|
+
|
|
18
|
+
export const InterAnnotatorAgreementKappaType$zodSchema = z.enum([
|
|
19
|
+
"fleiss",
|
|
20
|
+
"linear_weighted_fleiss",
|
|
21
|
+
"cohen",
|
|
22
|
+
"linear_weighted_cohen",
|
|
23
|
+
]);
|
|
24
|
+
|
|
25
|
+
export const InterAnnotatorAgreementKappaBlankReason = {
|
|
26
|
+
TooFewItems: "too_few_items",
|
|
27
|
+
EveryoneAgreed: "everyone_agreed",
|
|
28
|
+
} as const;
|
|
29
|
+
export type InterAnnotatorAgreementKappaBlankReason = ClosedEnum<
|
|
30
|
+
typeof InterAnnotatorAgreementKappaBlankReason
|
|
31
|
+
>;
|
|
32
|
+
|
|
33
|
+
export const InterAnnotatorAgreementKappaBlankReason$zodSchema = z.enum([
|
|
34
|
+
"too_few_items",
|
|
35
|
+
"everyone_agreed",
|
|
36
|
+
]);
|
|
37
|
+
|
|
38
|
+
export type InterAnnotatorAgreement = {
|
|
39
|
+
kappa: number | null;
|
|
40
|
+
kappa_type: InterAnnotatorAgreementKappaType | null;
|
|
41
|
+
kappa_blank_reason: InterAnnotatorAgreementKappaBlankReason | null;
|
|
42
|
+
chance_agreement: number | null;
|
|
43
|
+
current: number | null;
|
|
44
|
+
pair_count: number;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const InterAnnotatorAgreement$zodSchema: z.ZodType<
|
|
48
|
+
InterAnnotatorAgreement
|
|
49
|
+
> = z.object({
|
|
50
|
+
chance_agreement: z.number().nullable().describe(
|
|
51
|
+
"Agreement expected by chance alone, which `kappa` corrects for, on the same scale as the agreement",
|
|
52
|
+
),
|
|
53
|
+
current: z.number().nullable().describe(
|
|
54
|
+
"Current mean pairwise agreement among annotators on this evaluator",
|
|
55
|
+
),
|
|
56
|
+
kappa: z.number().nullable().describe(
|
|
57
|
+
"Agreement corrected for the agreement expected by chance, where 1 is perfect agreement, 0 is chance level, and below 0 is worse than chance",
|
|
58
|
+
),
|
|
59
|
+
kappa_blank_reason: InterAnnotatorAgreementKappaBlankReason$zodSchema
|
|
60
|
+
.nullable().describe(
|
|
61
|
+
"Why `kappa` is blank when answers were compared:\n\n- `too_few_items`: every evaluator compared these answers on only one item, and one item cannot show the agreement expected by chance\n- `everyone_agreed`: every compared answer is the same, so agreement cannot be told apart from chance\n",
|
|
62
|
+
),
|
|
63
|
+
kappa_type: InterAnnotatorAgreementKappaType$zodSchema.nullable().describe(
|
|
64
|
+
"The kind of kappa reported in `kappa`:\n\n- `fleiss`: Fleiss' kappa between three or more annotators\n- `linear_weighted_fleiss`: Fleiss' kappa between three or more annotators, giving partial credit to close ratings\n- `cohen`: Cohen's kappa between exactly two annotators, between a judge and the annotators, or between one annotator and the others\n- `linear_weighted_cohen`: Cohen's kappa between exactly two annotators, between a judge and the annotators, or between one annotator and the others, giving partial credit to close ratings\n",
|
|
65
|
+
),
|
|
66
|
+
pair_count: z.int().describe(
|
|
67
|
+
"How many annotator pairs the current value averages over",
|
|
68
|
+
),
|
|
69
|
+
});
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const KappaOfAnswerKindKappaType = {
|
|
9
|
+
Fleiss: "fleiss",
|
|
10
|
+
LinearWeightedFleiss: "linear_weighted_fleiss",
|
|
11
|
+
Cohen: "cohen",
|
|
12
|
+
LinearWeightedCohen: "linear_weighted_cohen",
|
|
13
|
+
} as const;
|
|
14
|
+
export type KappaOfAnswerKindKappaType = ClosedEnum<
|
|
15
|
+
typeof KappaOfAnswerKindKappaType
|
|
16
|
+
>;
|
|
17
|
+
|
|
18
|
+
export const KappaOfAnswerKindKappaType$zodSchema = z.enum([
|
|
19
|
+
"fleiss",
|
|
20
|
+
"linear_weighted_fleiss",
|
|
21
|
+
"cohen",
|
|
22
|
+
"linear_weighted_cohen",
|
|
23
|
+
]);
|
|
24
|
+
|
|
25
|
+
export const KappaOfAnswerKindKappaBlankReason = {
|
|
26
|
+
TooFewItems: "too_few_items",
|
|
27
|
+
EveryoneAgreed: "everyone_agreed",
|
|
28
|
+
} as const;
|
|
29
|
+
export type KappaOfAnswerKindKappaBlankReason = ClosedEnum<
|
|
30
|
+
typeof KappaOfAnswerKindKappaBlankReason
|
|
31
|
+
>;
|
|
32
|
+
|
|
33
|
+
export const KappaOfAnswerKindKappaBlankReason$zodSchema = z.enum([
|
|
34
|
+
"too_few_items",
|
|
35
|
+
"everyone_agreed",
|
|
36
|
+
]);
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Which answers this entry covers:
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
*
|
|
43
|
+
* - `binary`: answers that either match or do not, such as pass or fail
|
|
44
|
+
* - `rating`: ratings on a scale
|
|
45
|
+
*/
|
|
46
|
+
export const AnswerKind = {
|
|
47
|
+
Binary: "binary",
|
|
48
|
+
Rating: "rating",
|
|
49
|
+
} as const;
|
|
50
|
+
/**
|
|
51
|
+
* Which answers this entry covers:
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
*
|
|
55
|
+
* - `binary`: answers that either match or do not, such as pass or fail
|
|
56
|
+
* - `rating`: ratings on a scale
|
|
57
|
+
*/
|
|
58
|
+
export type AnswerKind = ClosedEnum<typeof AnswerKind>;
|
|
59
|
+
|
|
60
|
+
export const AnswerKind$zodSchema = z.enum([
|
|
61
|
+
"binary",
|
|
62
|
+
"rating",
|
|
63
|
+
]).describe(
|
|
64
|
+
"Which answers this entry covers:\n\n- `binary`: answers that either match or do not, such as pass or fail\n- `rating`: ratings on a scale\n",
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
export type KappaOfAnswerKind = {
|
|
68
|
+
kappa: number | null;
|
|
69
|
+
kappa_type: KappaOfAnswerKindKappaType | null;
|
|
70
|
+
kappa_blank_reason: KappaOfAnswerKindKappaBlankReason | null;
|
|
71
|
+
chance_agreement: number | null;
|
|
72
|
+
answer_kind: AnswerKind;
|
|
73
|
+
agreement: number | null;
|
|
74
|
+
pair_count: number;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const KappaOfAnswerKind$zodSchema: z.ZodType<KappaOfAnswerKind> = z
|
|
78
|
+
.object({
|
|
79
|
+
agreement: z.number().nullable().describe(
|
|
80
|
+
"Mean agreement with the other annotators over the pairs `kappa` is worked out from, from 0 to 1. When `kappa_blank_reason` is `too_few_items`, over every compared pair of this kind",
|
|
81
|
+
),
|
|
82
|
+
answer_kind: AnswerKind$zodSchema.describe(
|
|
83
|
+
"Which answers this entry covers:\n\n- `binary`: answers that either match or do not, such as pass or fail\n- `rating`: ratings on a scale\n",
|
|
84
|
+
),
|
|
85
|
+
chance_agreement: z.number().nullable().describe(
|
|
86
|
+
"Agreement expected by chance alone, which `kappa` corrects for, on the same scale as the agreement",
|
|
87
|
+
),
|
|
88
|
+
kappa: z.number().nullable().describe(
|
|
89
|
+
"Agreement corrected for the agreement expected by chance, where 1 is perfect agreement, 0 is chance level, and below 0 is worse than chance",
|
|
90
|
+
),
|
|
91
|
+
kappa_blank_reason: KappaOfAnswerKindKappaBlankReason$zodSchema.nullable()
|
|
92
|
+
.describe(
|
|
93
|
+
"Why `kappa` is blank when answers were compared:\n\n- `too_few_items`: every evaluator compared these answers on only one item, and one item cannot show the agreement expected by chance\n- `everyone_agreed`: every compared answer is the same, so agreement cannot be told apart from chance\n",
|
|
94
|
+
),
|
|
95
|
+
kappa_type: KappaOfAnswerKindKappaType$zodSchema.nullable().describe(
|
|
96
|
+
"The kind of kappa reported in `kappa`:\n\n- `fleiss`: Fleiss' kappa between three or more annotators\n- `linear_weighted_fleiss`: Fleiss' kappa between three or more annotators, giving partial credit to close ratings\n- `cohen`: Cohen's kappa between exactly two annotators, between a judge and the annotators, or between one annotator and the others\n- `linear_weighted_cohen`: Cohen's kappa between exactly two annotators, between a judge and the annotators, or between one annotator and the others, giving partial credit to close ratings\n",
|
|
97
|
+
),
|
|
98
|
+
pair_count: z.int().describe(
|
|
99
|
+
"How many compared pairs `agreement` averages over",
|
|
100
|
+
),
|
|
101
|
+
});
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
-
import { ClosedEnum } from "../types/enums.js";
|
|
7
6
|
import {
|
|
8
7
|
HTTPValidationError,
|
|
9
8
|
HTTPValidationError$zodSchema,
|
|
@@ -13,41 +12,14 @@ import {
|
|
|
13
12
|
TaskAgreementResponse$zodSchema,
|
|
14
13
|
} from "./taskagreementresponse.js";
|
|
15
14
|
|
|
16
|
-
/**
|
|
17
|
-
* How to bucket points in the trend series
|
|
18
|
-
*/
|
|
19
|
-
export const Bucket = {
|
|
20
|
-
Week: "week",
|
|
21
|
-
Month: "month",
|
|
22
|
-
Year: "year",
|
|
23
|
-
} as const;
|
|
24
|
-
/**
|
|
25
|
-
* How to bucket points in the trend series
|
|
26
|
-
*/
|
|
27
|
-
export type Bucket = ClosedEnum<typeof Bucket>;
|
|
28
|
-
|
|
29
|
-
export const Bucket$zodSchema = z.enum([
|
|
30
|
-
"week",
|
|
31
|
-
"month",
|
|
32
|
-
"year",
|
|
33
|
-
]).describe("How to bucket points in the trend series");
|
|
34
|
-
|
|
35
15
|
export type TaskAgreementAnnotationTasksTaskUuidAgreementGetRequest = {
|
|
36
16
|
task_uuid: string;
|
|
37
|
-
bucket?: Bucket | undefined;
|
|
38
|
-
days?: number | undefined;
|
|
39
17
|
xAPIKey?: string | null | undefined;
|
|
40
18
|
};
|
|
41
19
|
|
|
42
20
|
export const TaskAgreementAnnotationTasksTaskUuidAgreementGetRequest$zodSchema:
|
|
43
21
|
z.ZodType<TaskAgreementAnnotationTasksTaskUuidAgreementGetRequest> = z.object(
|
|
44
22
|
{
|
|
45
|
-
bucket: Bucket$zodSchema.default("week").describe(
|
|
46
|
-
"How to bucket points in the trend series",
|
|
47
|
-
),
|
|
48
|
-
days: z.int().default(90).describe(
|
|
49
|
-
"Trailing window in days for the trend series",
|
|
50
|
-
),
|
|
51
23
|
task_uuid: z.string().describe("Annotation task to act on"),
|
|
52
24
|
xAPIKey: z.string().nullable().optional(),
|
|
53
25
|
},
|
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { collectExtraKeys as collectExtraKeys$ } from "../lib/schemas.js";
|
|
7
|
+
import {
|
|
8
|
+
EvaluatorAgreement,
|
|
9
|
+
EvaluatorAgreement$zodSchema,
|
|
10
|
+
} from "./evaluatoragreement.js";
|
|
11
|
+
import {
|
|
12
|
+
EvaluatorsWithHumansBlock,
|
|
13
|
+
EvaluatorsWithHumansBlock$zodSchema,
|
|
14
|
+
} from "./evaluatorswithhumansblock.js";
|
|
7
15
|
import {
|
|
8
16
|
HumanAgreementBlock,
|
|
9
17
|
HumanAgreementBlock$zodSchema,
|
|
@@ -12,21 +20,19 @@ import {
|
|
|
12
20
|
|
|
13
21
|
export type TaskAgreementResponse = {
|
|
14
22
|
task_id: string;
|
|
15
|
-
bucket: string;
|
|
16
|
-
days: number;
|
|
17
23
|
human_human: HumanAgreementBlock;
|
|
18
|
-
|
|
24
|
+
evaluators_with_humans: EvaluatorsWithHumansBlock;
|
|
25
|
+
evaluators: Array<EvaluatorAgreement>;
|
|
19
26
|
AdditionalProperties?: { [k: string]: any };
|
|
20
27
|
};
|
|
21
28
|
|
|
22
29
|
export const TaskAgreementResponse$zodSchema: z.ZodType<TaskAgreementResponse> =
|
|
23
30
|
collectExtraKeys$(
|
|
24
31
|
z.object({
|
|
25
|
-
|
|
26
|
-
days: z.int().describe("Length of the trailing window in days"),
|
|
27
|
-
evaluators: z.array(z.record(z.string(), z.any())).describe(
|
|
32
|
+
evaluators: z.array(EvaluatorAgreement$zodSchema).describe(
|
|
28
33
|
"Agreement between each evaluator and the annotators, plus that evaluator's own results and the human results, one entry per linked evaluator",
|
|
29
34
|
),
|
|
35
|
+
evaluators_with_humans: EvaluatorsWithHumansBlock$zodSchema,
|
|
30
36
|
human_human: HumanAgreementBlock$zodSchema,
|
|
31
37
|
task_id: z.string().describe("ID of the task"),
|
|
32
38
|
}).catchall(z.any()),
|
|
@@ -37,9 +43,8 @@ export const TaskAgreementResponse$zodSchema: z.ZodType<TaskAgreementResponse> =
|
|
|
37
43
|
export const TaskAgreementResponse$zodSchemaOutbound: z.ZodType<any> = z.object(
|
|
38
44
|
{
|
|
39
45
|
AdditionalProperties: z.record(z.string(), z.any()).optional(),
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
evaluators: z.array(z.record(z.string(), z.any())),
|
|
46
|
+
evaluators: z.array(EvaluatorAgreement$zodSchema),
|
|
47
|
+
evaluators_with_humans: EvaluatorsWithHumansBlock$zodSchema,
|
|
43
48
|
human_human: HumanAgreementBlock$zodSchemaOutbound,
|
|
44
49
|
task_id: z.string(),
|
|
45
50
|
},
|