@babav/knowledge-core-client 0.46.0 → 0.48.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 +19 -0
- package/dist/index.js +8 -0
- package/package.json +1 -1
- package/src/index.ts +11 -0
package/dist/index.d.ts
CHANGED
|
@@ -1048,6 +1048,14 @@ export declare class KnowledgeCoreClient extends HttpBase {
|
|
|
1048
1048
|
* scoring). Returns the score (quality composite + sub-scores + gates + cost + latency) or a
|
|
1049
1049
|
* queued status. See also `benchmark.leaderboard`. */
|
|
1050
1050
|
benchmark: (id: UUID) => Promise<BenchmarkScore>;
|
|
1051
|
+
/** Materialize a leaderboard entry (by config_hash) into a PRODUCTION query profile owned by the
|
|
1052
|
+
* caller — the winning config becomes a real profile you can then use or tweak. eval_version
|
|
1053
|
+
* defaults to the current one. Pair with `benchmark.leaderboard` (pick a row -> its config_hash). */
|
|
1054
|
+
createFromLeaderboard: (b: {
|
|
1055
|
+
config_hash: string;
|
|
1056
|
+
name: string;
|
|
1057
|
+
eval_version?: string;
|
|
1058
|
+
}) => Promise<QueryProfile>;
|
|
1051
1059
|
};
|
|
1052
1060
|
/** Query-profile benchmark leaderboards — top-N system-swept profiles per eval version, per tier
|
|
1053
1061
|
* (client_quick | screening | full) and per category (quality | quality_cost | quality_latency).
|
|
@@ -1059,6 +1067,17 @@ export declare class KnowledgeCoreClient extends HttpBase {
|
|
|
1059
1067
|
category?: BenchmarkCategory;
|
|
1060
1068
|
limit?: number;
|
|
1061
1069
|
}) => Promise<Leaderboard>;
|
|
1070
|
+
/** Kick the NSGA-II sweep as the BENCHMARK TENANT (this client's own key — no admin key). The
|
|
1071
|
+
* benchmark tenant owns the bench corpora + eval-set; the sweep exercises candidate configs and
|
|
1072
|
+
* populates the leaderboards. Runs in the background — returns 202 immediately. */
|
|
1073
|
+
sweep: (b?: {
|
|
1074
|
+
scale?: "full" | "scoped";
|
|
1075
|
+
concurrency?: number;
|
|
1076
|
+
}) => Promise<{
|
|
1077
|
+
status: string;
|
|
1078
|
+
scale: string;
|
|
1079
|
+
concurrency: number | null;
|
|
1080
|
+
}>;
|
|
1062
1081
|
};
|
|
1063
1082
|
/** Ingestion profiles — the build-side config object (counterpart to query profiles): a tenant-owned,
|
|
1064
1083
|
* named bundle of pipeline config (chunking + embedding + sparse + quant). Unlike a query profile
|
package/dist/index.js
CHANGED
|
@@ -472,12 +472,20 @@ export class KnowledgeCoreClient extends HttpBase {
|
|
|
472
472
|
* scoring). Returns the score (quality composite + sub-scores + gates + cost + latency) or a
|
|
473
473
|
* queued status. See also `benchmark.leaderboard`. */
|
|
474
474
|
benchmark: (id) => this.request("POST", `/v1/query-profiles/${id}/benchmark`),
|
|
475
|
+
/** Materialize a leaderboard entry (by config_hash) into a PRODUCTION query profile owned by the
|
|
476
|
+
* caller — the winning config becomes a real profile you can then use or tweak. eval_version
|
|
477
|
+
* defaults to the current one. Pair with `benchmark.leaderboard` (pick a row -> its config_hash). */
|
|
478
|
+
createFromLeaderboard: (b) => this.request("POST", "/v1/query-profiles/from-leaderboard", { json: b }),
|
|
475
479
|
};
|
|
476
480
|
/** Query-profile benchmark leaderboards — top-N system-swept profiles per eval version, per tier
|
|
477
481
|
* (client_quick | screening | full) and per category (quality | quality_cost | quality_latency).
|
|
478
482
|
* Tenant-anonymous (keyed by config hash); never a customer config. */
|
|
479
483
|
benchmark = {
|
|
480
484
|
leaderboard: (q) => this.request("GET", "/v1/benchmark/leaderboard", { query: q }),
|
|
485
|
+
/** Kick the NSGA-II sweep as the BENCHMARK TENANT (this client's own key — no admin key). The
|
|
486
|
+
* benchmark tenant owns the bench corpora + eval-set; the sweep exercises candidate configs and
|
|
487
|
+
* populates the leaderboards. Runs in the background — returns 202 immediately. */
|
|
488
|
+
sweep: (b) => this.request("POST", "/v1/benchmark/sweep", { query: b }),
|
|
481
489
|
};
|
|
482
490
|
/** Ingestion profiles — the build-side config object (counterpart to query profiles): a tenant-owned,
|
|
483
491
|
* named bundle of pipeline config (chunking + embedding + sparse + quant). Unlike a query profile
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@babav/knowledge-core-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.48.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
|
@@ -1186,6 +1186,11 @@ export class KnowledgeCoreClient extends HttpBase {
|
|
|
1186
1186
|
* scoring). Returns the score (quality composite + sub-scores + gates + cost + latency) or a
|
|
1187
1187
|
* queued status. See also `benchmark.leaderboard`. */
|
|
1188
1188
|
benchmark: (id: UUID) => this.request<BenchmarkScore>("POST", `/v1/query-profiles/${id}/benchmark`),
|
|
1189
|
+
/** Materialize a leaderboard entry (by config_hash) into a PRODUCTION query profile owned by the
|
|
1190
|
+
* caller — the winning config becomes a real profile you can then use or tweak. eval_version
|
|
1191
|
+
* defaults to the current one. Pair with `benchmark.leaderboard` (pick a row -> its config_hash). */
|
|
1192
|
+
createFromLeaderboard: (b: { config_hash: string; name: string; eval_version?: string }) =>
|
|
1193
|
+
this.request<QueryProfile>("POST", "/v1/query-profiles/from-leaderboard", { json: b }),
|
|
1189
1194
|
};
|
|
1190
1195
|
|
|
1191
1196
|
/** Query-profile benchmark leaderboards — top-N system-swept profiles per eval version, per tier
|
|
@@ -1194,6 +1199,12 @@ export class KnowledgeCoreClient extends HttpBase {
|
|
|
1194
1199
|
benchmark = {
|
|
1195
1200
|
leaderboard: (q?: { eval_version?: string; tier?: BenchmarkTier; category?: BenchmarkCategory; limit?: number }) =>
|
|
1196
1201
|
this.request<Leaderboard>("GET", "/v1/benchmark/leaderboard", { query: q }),
|
|
1202
|
+
/** Kick the NSGA-II sweep as the BENCHMARK TENANT (this client's own key — no admin key). The
|
|
1203
|
+
* benchmark tenant owns the bench corpora + eval-set; the sweep exercises candidate configs and
|
|
1204
|
+
* populates the leaderboards. Runs in the background — returns 202 immediately. */
|
|
1205
|
+
sweep: (b?: { scale?: "full" | "scoped"; concurrency?: number }) =>
|
|
1206
|
+
this.request<{ status: string; scale: string; concurrency: number | null }>(
|
|
1207
|
+
"POST", "/v1/benchmark/sweep", { query: b }),
|
|
1197
1208
|
};
|
|
1198
1209
|
|
|
1199
1210
|
/** Ingestion profiles — the build-side config object (counterpart to query profiles): a tenant-owned,
|