@babav/knowledge-core-client 0.55.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 CHANGED
@@ -609,6 +609,8 @@ export interface LeaderboardEntry {
609
609
  rank: number;
610
610
  config_hash: string;
611
611
  generation_model: string | null;
612
+ reranker: string | null;
613
+ label: string | null;
612
614
  composite_q: number | null;
613
615
  prod_cost_per_query_usd: number | null;
614
616
  p50_ms: number | null;
@@ -646,6 +648,30 @@ export interface RerankerComparison {
646
648
  eval_version: string;
647
649
  heads: RerankerHead[];
648
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
+ }
649
675
  export interface Tenant {
650
676
  id: UUID;
651
677
  name: string;
@@ -1120,6 +1146,14 @@ export declare class KnowledgeCoreClient extends HttpBase {
1120
1146
  rerankers: (q?: {
1121
1147
  eval_version?: string;
1122
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>;
1123
1157
  /** Kick the sweep as the BENCHMARK TENANT (this client's own key — no admin key). The benchmark
1124
1158
  * tenant owns the bench corpora + eval-set; the sweep FULL-scores the sensible config set and
1125
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.55.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
@@ -573,6 +573,8 @@ export interface LeaderboardEntry {
573
573
  rank: number;
574
574
  config_hash: string;
575
575
  generation_model: string | null;
576
+ reranker: string | null; // reranker_provider (contextual | cohere | voyage) — for the entry title
577
+ label: string | null; // display summary incl. reranker, e.g. "claude-opus-5 · cohere · standard 2/2"
576
578
  composite_q: number | null;
577
579
  prod_cost_per_query_usd: number | null;
578
580
  p50_ms: number | null;
@@ -611,6 +613,30 @@ export interface RerankerComparison {
611
613
  eval_version: string;
612
614
  heads: RerankerHead[];
613
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
+ }
614
640
 
615
641
  export interface Tenant {
616
642
  id: UUID;
@@ -1257,6 +1283,13 @@ export class KnowledgeCoreClient extends HttpBase {
1257
1283
  * tenant-anonymous. `heads` is empty when no reranker benchmark has run for the eval version. */
1258
1284
  rerankers: (q?: { eval_version?: string }) =>
1259
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 }),
1260
1293
  /** Kick the sweep as the BENCHMARK TENANT (this client's own key — no admin key). The benchmark
1261
1294
  * tenant owns the bench corpora + eval-set; the sweep FULL-scores the sensible config set and
1262
1295
  * populates the leaderboard. Runs in the background — returns 202 immediately. */