@answerlayer/cli 0.1.18 → 0.1.19
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/README.md +3 -0
- package/package.json +1 -1
- package/skills/answerlayer/SKILL.md +2 -1
- package/src/cli.js +22 -3
package/README.md
CHANGED
|
@@ -271,6 +271,8 @@ answerlayer inquiry ask --connection <connection-id> --model claude-opus-4-6 "In
|
|
|
271
271
|
|
|
272
272
|
answerlayer evals suites create --name "Revenue checks" --connection <connection-id>
|
|
273
273
|
answerlayer evals cases create <suite-id> --title "Monthly revenue" --question "What was revenue last month?" --category Revenue --expected-sql "select sum(amount) from orders where ..." --oracle-sources '[{"kind":"external","title":"Revenue policy","url":"https://example.com/revenue-policy"}]'
|
|
274
|
+
answerlayer evals cases create <suite-id> --title "Unseen revenue check" --question "How much revenue did we make?" --partition holdout --expected-sql "select sum(amount) from orders"
|
|
275
|
+
answerlayer evals cases reveal <case-id> --json # admin-only, explicit, and audited
|
|
274
276
|
answerlayer evals runs create <suite-id> --label "Before prompt change"
|
|
275
277
|
answerlayer evals runs create <suite-id> --case <case-id> --case <case-id> --label "Focused smoke run"
|
|
276
278
|
answerlayer evals runs create <suite-id> --category Revenue --category Finance --case <case-id> --label "Focused category run"
|
|
@@ -280,6 +282,7 @@ answerlayer evals runs create-batch --suite <suite-id> --suite <suite-id> --conc
|
|
|
280
282
|
answerlayer evals runs update <run-id> --label "Prompt experiment B"
|
|
281
283
|
answerlayer evals runs compare <run-id> --baseline <baseline-run-id>
|
|
282
284
|
answerlayer evals runs analyze <run-id> --json
|
|
285
|
+
answerlayer generation start --connection <connection-id> --component-type metrics --eval-suite <suite-id> --eval-case <authoring-case-id> --prompt "Improve these concepts"
|
|
283
286
|
|
|
284
287
|
answerlayer dashboards create --title "Executive overview" --visibility org
|
|
285
288
|
answerlayer tiles create --title "Revenue" --source-type saved_query --source <saved-query-id>
|
package/package.json
CHANGED
|
@@ -175,7 +175,8 @@ to see exact flags before using one:
|
|
|
175
175
|
- `saved-queries` — list / get / create / execute reusable queries
|
|
176
176
|
- `semantic` — entities, relationships, measures, metrics, dimensions, filters
|
|
177
177
|
(most need `--connection <id>`)
|
|
178
|
-
- `evals` — create evaluation suites and cases, run them, compare runs, and retrieve evidence-backed failure analysis
|
|
178
|
+
- `evals` — create evaluation suites and partitioned cases, explicitly reveal protected oracles, run them, compare runs, and retrieve evidence-backed failure analysis
|
|
179
|
+
- `generation` — generate semantic components, optionally grounded by an eval suite's authoring cases; holdout and adversarial cases are rejected
|
|
179
180
|
- `dashboards`, `tiles` — build and read dashboards
|
|
180
181
|
- `documents` — upload business-context docs and link them to connections
|
|
181
182
|
- `connections` — create / test / inspect schema
|
package/src/cli.js
CHANGED
|
@@ -648,6 +648,7 @@ async function handleEvals(client, resource, positionals, parsed, io) {
|
|
|
648
648
|
body: await readData(parsed.flags, io, { ...evalCasePayload(parsed.flags), is_active: activeFlag(parsed.flags) }),
|
|
649
649
|
});
|
|
650
650
|
}
|
|
651
|
+
if (command === "reveal") return requestAndPrint(client, "POST", `${base}/cases/${encodeURIComponent(caseId)}/reveal`, parsed, io);
|
|
651
652
|
if (command === "delete") return requestAndPrint(client, "DELETE", `${base}/cases/${encodeURIComponent(caseId)}`, parsed, io);
|
|
652
653
|
throw usage(`Unknown evals cases command: ${command}`);
|
|
653
654
|
}
|
|
@@ -739,7 +740,14 @@ async function handleGeneration(client, command, positionals, parsed, io) {
|
|
|
739
740
|
const base = "/api/v1/semantic/jobs";
|
|
740
741
|
if (command === "start" || command === "create") {
|
|
741
742
|
return requestAndPrint(client, "POST", base, parsed, io, {
|
|
742
|
-
body: await readData(parsed.flags, io
|
|
743
|
+
body: await readData(parsed.flags, io, {
|
|
744
|
+
connection_id: firstValue(parsed.flags.connection),
|
|
745
|
+
component_type: firstValue(parsed.flags.componentType),
|
|
746
|
+
prompt: firstValue(parsed.flags.prompt),
|
|
747
|
+
model: firstValue(parsed.flags.model),
|
|
748
|
+
eval_suite_id: firstValue(parsed.flags.evalSuite),
|
|
749
|
+
eval_case_ids: optionalCsvOrRepeated(parsed.flags.evalCase),
|
|
750
|
+
}),
|
|
743
751
|
});
|
|
744
752
|
}
|
|
745
753
|
if (command === "list" || !command) {
|
|
@@ -1165,6 +1173,7 @@ function evalCasePayload(flags) {
|
|
|
1165
1173
|
title: firstValue(flags.title),
|
|
1166
1174
|
question: firstValue(flags.question),
|
|
1167
1175
|
category: firstValue(flags.category),
|
|
1176
|
+
partition: firstValue(flags.partition),
|
|
1168
1177
|
expected_answer: firstValue(flags.expectedAnswer),
|
|
1169
1178
|
expected_sql: firstValue(flags.expectedSql) || firstValue(flags.sql),
|
|
1170
1179
|
expected_values: parseJsonFlag(firstValue(flags.expectedValues), "expected-values"),
|
|
@@ -1437,6 +1446,7 @@ function normalizeFlagName(rawName) {
|
|
|
1437
1446
|
"--h": "h",
|
|
1438
1447
|
"--prompt": "prompt",
|
|
1439
1448
|
"--model": "model",
|
|
1449
|
+
"--component-type": "componentType",
|
|
1440
1450
|
"--use-semantic-layer": "useSemanticLayer",
|
|
1441
1451
|
"--no-semantic-layer": "noSemanticLayer",
|
|
1442
1452
|
"--no-demo": "noDemo",
|
|
@@ -1455,7 +1465,12 @@ function normalizeFlagName(rawName) {
|
|
|
1455
1465
|
"--baseline-run": "baseline",
|
|
1456
1466
|
"--case": "case",
|
|
1457
1467
|
"--case-id": "case",
|
|
1468
|
+
"--eval-suite": "evalSuite",
|
|
1469
|
+
"--eval-suite-id": "evalSuite",
|
|
1470
|
+
"--eval-case": "evalCase",
|
|
1471
|
+
"--eval-case-id": "evalCase",
|
|
1458
1472
|
"--category": "category",
|
|
1473
|
+
"--partition": "partition",
|
|
1459
1474
|
"--expected-answer": "expectedAnswer",
|
|
1460
1475
|
"--expected-sql": "expectedSql",
|
|
1461
1476
|
"--expected-values": "expectedValues",
|
|
@@ -1655,9 +1670,10 @@ Data products:
|
|
|
1655
1670
|
answerlayer semantic <entities|relationships|measures|metrics|dimensions|filters> list|get|create|update|delete|delete-all|generate
|
|
1656
1671
|
answerlayer inquiry models|ask|sessions|create-session|session|update-session|delete-session|turn
|
|
1657
1672
|
answerlayer evals suites list|create|get|update|delete
|
|
1658
|
-
answerlayer evals cases create|update|delete
|
|
1673
|
+
answerlayer evals cases create|update|reveal|delete
|
|
1659
1674
|
answerlayer evals runs list|create|create-batch|get|update|cancel|compare|analyze
|
|
1660
|
-
case create/update accept --category <name
|
|
1675
|
+
case create/update accept --category <name>,
|
|
1676
|
+
--partition <authoring|holdout|adversarial>, and
|
|
1661
1677
|
--oracle-sources '<JSON array>'
|
|
1662
1678
|
run create accepts --case <case-id> (repeat or comma-separate) and
|
|
1663
1679
|
--category <name> (repeat; category and case selectors are unioned),
|
|
@@ -1668,6 +1684,9 @@ Data products:
|
|
|
1668
1684
|
and --use-semantic-layer or --no-semantic-layer
|
|
1669
1685
|
update accepts --label <name>
|
|
1670
1686
|
answerlayer generation start|list|get|status|stream|cancel|questions|guidance|delete
|
|
1687
|
+
start accepts --connection, --component-type, --prompt, --model,
|
|
1688
|
+
--eval-suite, and repeatable or comma-separated --eval-case values;
|
|
1689
|
+
only authoring cases are accepted as generation context
|
|
1671
1690
|
answerlayer tiles list|get|create|update|data|delete
|
|
1672
1691
|
answerlayer dashboards list|get|create|update|delete|duplicate|manifest|attach-tile|move-tile|detach-tile|assignments|assign|unassign|tile-data
|
|
1673
1692
|
|