@babav/knowledge-core-client 0.56.0 → 0.57.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/dist/index.d.ts +32 -0
- package/dist/index.js +6 -0
- package/package.json +1 -1
- package/src/index.ts +31 -0
package/dist/index.d.ts
CHANGED
|
@@ -648,6 +648,30 @@ export interface RerankerComparison {
|
|
|
648
648
|
eval_version: string;
|
|
649
649
|
heads: RerankerHead[];
|
|
650
650
|
}
|
|
651
|
+
/** One visual-pipeline arm measured in the visual benchmark (yield + independent graded quality). */
|
|
652
|
+
export interface VisualArm {
|
|
653
|
+
arm: string;
|
|
654
|
+
generation_model: string | null;
|
|
655
|
+
concept_model: string | null;
|
|
656
|
+
concept_mode: string | null;
|
|
657
|
+
visuals_per_query: number | null;
|
|
658
|
+
zero_visual_rate: number | null;
|
|
659
|
+
dropped: number | null;
|
|
660
|
+
avg_quality: number | null;
|
|
661
|
+
n_visuals_judged: number | null;
|
|
662
|
+
quality_judge: string | null;
|
|
663
|
+
quality_caveat: string | null;
|
|
664
|
+
avg_cost_per_query_usd: number | null;
|
|
665
|
+
p50_ms: number | null;
|
|
666
|
+
n_questions: number | null;
|
|
667
|
+
}
|
|
668
|
+
/** Visual-benchmark leaderboard (GET /v1/benchmark/visuals) — per visual-pipeline arm: yield,
|
|
669
|
+
* independent graded quality, cost, latency. `arms` is empty if no visual benchmark has run. */
|
|
670
|
+
export interface VisualComparison {
|
|
671
|
+
eval_version: string;
|
|
672
|
+
note: string | null;
|
|
673
|
+
arms: VisualArm[];
|
|
674
|
+
}
|
|
651
675
|
export interface Tenant {
|
|
652
676
|
id: UUID;
|
|
653
677
|
name: string;
|
|
@@ -1122,6 +1146,14 @@ export declare class KnowledgeCoreClient extends HttpBase {
|
|
|
1122
1146
|
rerankers: (q?: {
|
|
1123
1147
|
eval_version?: string;
|
|
1124
1148
|
}) => Promise<RerankerComparison>;
|
|
1149
|
+
/** Visual-benchmark leaderboard — per visual-pipeline arm (e.g. all-Flash vs all-Opus): yield
|
|
1150
|
+
* (visuals/query, zero-visual rate, drops), independent graded quality, cost, latency. Read-only,
|
|
1151
|
+
* tenant-anonymous. `arms` is empty when no visual benchmark has run. NOTE: quality is a Gemini
|
|
1152
|
+
* vision judge — a Gemini-family concept model (Flash) may be self-flattered, so cross-family arms
|
|
1153
|
+
* (Opus) are the cleaner quality figure (see each arm's `quality_caveat`). */
|
|
1154
|
+
visuals: (q?: {
|
|
1155
|
+
eval_version?: string;
|
|
1156
|
+
}) => Promise<VisualComparison>;
|
|
1125
1157
|
/** Kick the sweep as the BENCHMARK TENANT (this client's own key — no admin key). The benchmark
|
|
1126
1158
|
* tenant owns the bench corpora + eval-set; the sweep FULL-scores the sensible config set and
|
|
1127
1159
|
* populates the leaderboard. Runs in the background — returns 202 immediately. */
|
package/dist/index.js
CHANGED
|
@@ -487,6 +487,12 @@ export class KnowledgeCoreClient extends HttpBase {
|
|
|
487
487
|
* with quality (full-150 composite_q + delta) and measured end-to-end latency/cost. Read-only,
|
|
488
488
|
* tenant-anonymous. `heads` is empty when no reranker benchmark has run for the eval version. */
|
|
489
489
|
rerankers: (q) => this.request("GET", "/v1/benchmark/rerankers", { query: q }),
|
|
490
|
+
/** Visual-benchmark leaderboard — per visual-pipeline arm (e.g. all-Flash vs all-Opus): yield
|
|
491
|
+
* (visuals/query, zero-visual rate, drops), independent graded quality, cost, latency. Read-only,
|
|
492
|
+
* tenant-anonymous. `arms` is empty when no visual benchmark has run. NOTE: quality is a Gemini
|
|
493
|
+
* vision judge — a Gemini-family concept model (Flash) may be self-flattered, so cross-family arms
|
|
494
|
+
* (Opus) are the cleaner quality figure (see each arm's `quality_caveat`). */
|
|
495
|
+
visuals: (q) => this.request("GET", "/v1/benchmark/visuals", { query: q }),
|
|
490
496
|
/** Kick the sweep as the BENCHMARK TENANT (this client's own key — no admin key). The benchmark
|
|
491
497
|
* tenant owns the bench corpora + eval-set; the sweep FULL-scores the sensible config set and
|
|
492
498
|
* populates the leaderboard. Runs in the background — returns 202 immediately. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@babav/knowledge-core-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.57.0",
|
|
4
4
|
"description": "TypeScript client for the Babav Knowledge Core API (Deno + Node 18+, zero deps). Includes the babav.visual grammar TYPES at the ./visual subpath (types only; all visual rendering is server-side).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
package/src/index.ts
CHANGED
|
@@ -613,6 +613,30 @@ export interface RerankerComparison {
|
|
|
613
613
|
eval_version: string;
|
|
614
614
|
heads: RerankerHead[];
|
|
615
615
|
}
|
|
616
|
+
/** One visual-pipeline arm measured in the visual benchmark (yield + independent graded quality). */
|
|
617
|
+
export interface VisualArm {
|
|
618
|
+
arm: string; // e.g. "all_flash" | "all_opus"
|
|
619
|
+
generation_model: string | null;
|
|
620
|
+
concept_model: string | null;
|
|
621
|
+
concept_mode: string | null;
|
|
622
|
+
visuals_per_query: number | null; // yield: mean shipped visuals per query
|
|
623
|
+
zero_visual_rate: number | null; // fraction of queries that shipped no visual
|
|
624
|
+
dropped: number | null;
|
|
625
|
+
avg_quality: number | null; // 0..1, independent vision judge
|
|
626
|
+
n_visuals_judged: number | null;
|
|
627
|
+
quality_judge: string | null;
|
|
628
|
+
quality_caveat: string | null; // e.g. same-family-judge self-preference note
|
|
629
|
+
avg_cost_per_query_usd: number | null;
|
|
630
|
+
p50_ms: number | null;
|
|
631
|
+
n_questions: number | null;
|
|
632
|
+
}
|
|
633
|
+
/** Visual-benchmark leaderboard (GET /v1/benchmark/visuals) — per visual-pipeline arm: yield,
|
|
634
|
+
* independent graded quality, cost, latency. `arms` is empty if no visual benchmark has run. */
|
|
635
|
+
export interface VisualComparison {
|
|
636
|
+
eval_version: string;
|
|
637
|
+
note: string | null;
|
|
638
|
+
arms: VisualArm[];
|
|
639
|
+
}
|
|
616
640
|
|
|
617
641
|
export interface Tenant {
|
|
618
642
|
id: UUID;
|
|
@@ -1259,6 +1283,13 @@ export class KnowledgeCoreClient extends HttpBase {
|
|
|
1259
1283
|
* tenant-anonymous. `heads` is empty when no reranker benchmark has run for the eval version. */
|
|
1260
1284
|
rerankers: (q?: { eval_version?: string }) =>
|
|
1261
1285
|
this.request<RerankerComparison>("GET", "/v1/benchmark/rerankers", { query: q }),
|
|
1286
|
+
/** Visual-benchmark leaderboard — per visual-pipeline arm (e.g. all-Flash vs all-Opus): yield
|
|
1287
|
+
* (visuals/query, zero-visual rate, drops), independent graded quality, cost, latency. Read-only,
|
|
1288
|
+
* tenant-anonymous. `arms` is empty when no visual benchmark has run. NOTE: quality is a Gemini
|
|
1289
|
+
* vision judge — a Gemini-family concept model (Flash) may be self-flattered, so cross-family arms
|
|
1290
|
+
* (Opus) are the cleaner quality figure (see each arm's `quality_caveat`). */
|
|
1291
|
+
visuals: (q?: { eval_version?: string }) =>
|
|
1292
|
+
this.request<VisualComparison>("GET", "/v1/benchmark/visuals", { query: q }),
|
|
1262
1293
|
/** Kick the sweep as the BENCHMARK TENANT (this client's own key — no admin key). The benchmark
|
|
1263
1294
|
* tenant owns the bench corpora + eval-set; the sweep FULL-scores the sensible config set and
|
|
1264
1295
|
* populates the leaderboard. Runs in the background — returns 202 immediately. */
|