@datagrok/grokky 1.0.4 → 1.1.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/.claude/skills/deploy-grokky/SKILL.md +193 -0
- package/.grokignore +2 -0
- package/.turbo/turbo-build.log +24 -0
- package/.vscode/settings.json +16 -0
- package/CHANGELOG.md +151 -8
- package/CLAUDE.md +284 -0
- package/CREDITS.md +173 -0
- package/LICENSE.md +16 -0
- package/README.md +24 -0
- package/bdd/bdd.config.json +1 -0
- package/bdd/bindings/elements.ts +9 -0
- package/bdd/bindings/steps.ts +787 -0
- package/bdd/features/ai-panel/platform-work.feature +63 -0
- package/bdd/features/ai-panel/session.feature +69 -0
- package/bdd/features/ai-panel/table-work.feature +99 -0
- package/bdd/generated/ai-panel/platform-work.test.ts +103 -0
- package/bdd/generated/ai-panel/session.test.ts +100 -0
- package/bdd/generated/ai-panel/table-work.test.ts +150 -0
- package/bdd/package.json +1 -0
- package/bdd/tsconfig.json +13 -0
- package/css/ai.css +637 -49
- package/dist/package-test.js +4 -1707
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +742 -92317
- package/dist/package.js.map +1 -1
- package/dockerfiles/claude-runtime/.dockerignore +1 -0
- package/{.eslintrc.json → dockerfiles/claude-runtime/.eslintrc.json} +7 -16
- package/dockerfiles/claude-runtime/Dockerfile +73 -13
- package/dockerfiles/claude-runtime/agent/grokky_agent/__init__.py +0 -0
- package/dockerfiles/claude-runtime/agent/grokky_agent/__main__.py +80 -0
- package/dockerfiles/claude-runtime/agent/grokky_agent/browser_tools.py +180 -0
- package/dockerfiles/claude-runtime/agent/grokky_agent/config.py +26 -0
- package/dockerfiles/claude-runtime/agent/grokky_agent/formats.py +155 -0
- package/dockerfiles/claude-runtime/agent/grokky_agent/guard.py +87 -0
- package/dockerfiles/claude-runtime/agent/grokky_agent/hermes.py +212 -0
- package/dockerfiles/claude-runtime/agent/grokky_agent/hermes.yaml +45 -0
- package/dockerfiles/claude-runtime/agent/grokky_agent/hermes_plugin/__init__.py +8 -0
- package/dockerfiles/claude-runtime/agent/grokky_agent/hermes_plugin/plugin.yaml +3 -0
- package/dockerfiles/claude-runtime/agent/grokky_agent/protocol.py +174 -0
- package/dockerfiles/claude-runtime/agent/grokky_agent/providers/__init__.py +21 -0
- package/dockerfiles/claude-runtime/agent/grokky_agent/providers/anthropic.py +21 -0
- package/dockerfiles/claude-runtime/agent/grokky_agent/providers/azure.py +46 -0
- package/dockerfiles/claude-runtime/agent/grokky_agent/providers/base.py +127 -0
- package/dockerfiles/claude-runtime/agent/grokky_agent/providers/bedrock.py +46 -0
- package/dockerfiles/claude-runtime/agent/grokky_agent/providers/custom.py +40 -0
- package/dockerfiles/claude-runtime/agent/grokky_agent/providers/databricks.py +54 -0
- package/dockerfiles/claude-runtime/agent/grokky_agent/providers/openai_platform.py +41 -0
- package/dockerfiles/claude-runtime/agent/grokky_agent/providers/openrouter.py +46 -0
- package/dockerfiles/claude-runtime/agent/grokky_agent/session.py +471 -0
- package/dockerfiles/claude-runtime/agent/grokky_agent/skills.py +44 -0
- package/dockerfiles/claude-runtime/agent/grokky_agent/structured.py +40 -0
- package/dockerfiles/claude-runtime/container.json +2 -2
- package/dockerfiles/claude-runtime/entrypoint.sh +20 -0
- package/dockerfiles/claude-runtime/package-lock.json +1721 -306
- package/dockerfiles/claude-runtime/package.json +20 -5
- package/dockerfiles/claude-runtime/plugin/.claude-plugin/plugin.json +5 -0
- package/dockerfiles/claude-runtime/plugin/skills/datagrok-calc-column/SKILL.md +92 -0
- package/dockerfiles/claude-runtime/plugin/skills/datagrok-chem-data/SKILL.md +250 -0
- package/dockerfiles/claude-runtime/plugin/skills/datagrok-chem-toolkit/SKILL.md +395 -0
- package/dockerfiles/claude-runtime/plugin/skills/datagrok-df-and-columns/SKILL.md +454 -0
- package/dockerfiles/claude-runtime/plugin/skills/datagrok-entities/SKILL.md +38 -0
- package/dockerfiles/claude-runtime/plugin/skills/datagrok-exec/SKILL.md +209 -0
- package/dockerfiles/claude-runtime/plugin/skills/datagrok-filtering/SKILL.md +185 -0
- package/dockerfiles/claude-runtime/plugin/skills/datagrok-grid-customization/SKILL.md +270 -0
- package/dockerfiles/claude-runtime/plugin/skills/datagrok-projects/SKILL.md +100 -0
- package/dockerfiles/claude-runtime/plugin/skills/datagrok-selection/SKILL.md +344 -0
- package/dockerfiles/claude-runtime/plugin/skills/datagrok-undo/SKILL.md +78 -0
- package/dockerfiles/claude-runtime/plugin/skills/datagrok-viewers/SKILL.md +303 -0
- package/dockerfiles/claude-runtime/pyproject.toml +18 -0
- package/dockerfiles/claude-runtime/src/agent/pool.ts +411 -0
- package/dockerfiles/claude-runtime/src/agent/turn.ts +153 -0
- package/dockerfiles/claude-runtime/src/constants.ts +20 -0
- package/dockerfiles/claude-runtime/src/credentials.ts +45 -0
- package/dockerfiles/claude-runtime/src/grounding.ts +104 -0
- package/dockerfiles/claude-runtime/src/help-index.ts +118 -0
- package/dockerfiles/claude-runtime/src/privileges.ts +8 -0
- package/dockerfiles/claude-runtime/src/prompts.ts +211 -0
- package/dockerfiles/claude-runtime/src/server.ts +134 -234
- package/dockerfiles/claude-runtime/src/session.ts +328 -0
- package/dockerfiles/claude-runtime/src/shared-api-client.ts +112 -0
- package/dockerfiles/claude-runtime/src/stream-filter.ts +80 -0
- package/dockerfiles/claude-runtime/src/sync/home-files.ts +80 -0
- package/dockerfiles/claude-runtime/src/sync/orchestrator.ts +214 -0
- package/dockerfiles/claude-runtime/src/sync/packages.ts +145 -0
- package/dockerfiles/claude-runtime/src/sync/shared-connections.ts +87 -0
- package/dockerfiles/claude-runtime/src/sync/workspace.ts +68 -0
- package/dockerfiles/claude-runtime/src/tasks.ts +124 -0
- package/dockerfiles/claude-runtime/src/tool-summary.ts +66 -0
- package/dockerfiles/claude-runtime/src/types.ts +142 -23
- package/dockerfiles/claude-runtime/src/user/installed-packages.ts +17 -0
- package/dockerfiles/claude-runtime/src/user/staged-workspace.ts +80 -0
- package/dockerfiles/claude-runtime/src/user/user-dir.ts +108 -0
- package/dockerfiles/claude-runtime/src/verify.ts +136 -0
- package/dockerfiles/claude-runtime/src/watchdog.ts +115 -0
- package/dockerfiles/claude-runtime/test/credentials.test.js +43 -0
- package/dockerfiles/claude-runtime/test/grounding.test.js +191 -0
- package/dockerfiles/claude-runtime/test/help-index.test.js +115 -0
- package/dockerfiles/claude-runtime/test/plugin-skills.test.js +57 -0
- package/dockerfiles/claude-runtime/test/prompts.test.js +62 -0
- package/dockerfiles/claude-runtime/test/reaper.test.js +60 -0
- package/dockerfiles/claude-runtime/test/stream-filter.test.js +132 -0
- package/dockerfiles/claude-runtime/test/tasks.test.js +74 -0
- package/dockerfiles/claude-runtime/test/user-dir.test.js +71 -0
- package/dockerfiles/claude-runtime/test/verify.test.js +187 -0
- package/dockerfiles/claude-runtime/test/watchdog.test.js +43 -0
- package/dockerfiles/mcp-server/.eslintrc.json +39 -0
- package/dockerfiles/mcp-server/Dockerfile +10 -2
- package/dockerfiles/mcp-server/package-lock.json +1743 -98
- package/dockerfiles/mcp-server/package.json +27 -5
- package/dockerfiles/mcp-server/src/api-client.ts +123 -66
- package/dockerfiles/mcp-server/src/format.ts +51 -0
- package/dockerfiles/mcp-server/src/index.ts +44 -113
- package/dockerfiles/mcp-server/src/ops.ts +325 -0
- package/dockerfiles/mcp-server/src/shared-api-client.ts +81 -0
- package/dockerfiles/mcp-server/test/format.test.js +62 -0
- package/dockerfiles/mcp-server/test/ops.test.js +84 -0
- package/dockerfiles/mcp-server/test/shared-api-client.test.js +35 -0
- package/dockerfiles/queue/Dockerfile +2 -0
- package/dockerfiles/queue/container.json +7 -0
- package/docs/AUDIT-2026-08-03.md +1064 -0
- package/docs/BENCHMARK.md +292 -0
- package/docs/CLAUDE_CODE_FLOW.md +746 -0
- package/docs/EXAMPLES.md +82 -0
- package/docs/FEATURES.md +71 -0
- package/docs/IMPLEMENTATION.md +128 -0
- package/docs/LATENCY.md +170 -0
- package/docs/VISION.md +36 -0
- package/files/benchmark/suite.yaml +404 -0
- package/files/scripts/process-cro-results.md +14 -0
- package/files/suggestions.yaml +344 -0
- package/package.json +39 -97
- package/src/ai/ai-window.ts +157 -0
- package/src/ai/benchmark/benchmark.ts +737 -0
- package/src/ai/db-view-functions.ts +56 -0
- package/src/ai/engine.ts +98 -0
- package/src/ai/gemma-engine.ts +81 -0
- package/src/ai/panel.ts +1385 -0
- package/src/ai/prompt-suggestions.ts +209 -0
- package/src/ai/search/combined-search.ts +244 -0
- package/src/{llm-utils → ai/search}/query-matching.ts +46 -167
- package/src/{llm-utils → ai}/storage.ts +0 -1
- package/src/ai/table-tools.ts +145 -0
- package/src/ai/ui.ts +720 -0
- package/src/ai/usage-limiter.ts +105 -0
- package/src/ai/view-tools.ts +352 -0
- package/src/claude/ai-feature.ts +16 -0
- package/src/claude/exec-blocks.ts +176 -0
- package/src/claude/queue-task.ts +84 -0
- package/src/claude/runtime-client.ts +310 -0
- package/src/claude/turn-log.ts +114 -0
- package/src/claude/undoable.ts +105 -0
- package/src/{llm-utils → db}/db-index-tools.ts +24 -32
- package/src/db/sql-tools.ts +336 -0
- package/src/depr/LLM-client.ts +251 -0
- package/src/depr/ai-panel.ts +174 -0
- package/src/depr/chatgpt-assistant.ts +257 -0
- package/src/depr/creds.ts +30 -0
- package/src/depr/deepwikiclient.ts +118 -0
- package/src/depr/indexes/dg-repository-index.ts +266 -0
- package/src/depr/interfaces.ts +170 -0
- package/src/depr/is-help-request.ts +39 -0
- package/src/depr/prompt-engine.ts +52 -0
- package/src/depr/rendering-tools.ts +103 -0
- package/src/depr/script-tools.ts +785 -0
- package/src/depr/tableview-tools.ts +746 -0
- package/src/depr/viewers-ai.ts +67 -0
- package/src/package-api.ts +87 -28
- package/src/package-test.ts +1 -0
- package/src/package.g.ts +98 -48
- package/src/package.ts +211 -157
- package/src/polyfills.ts +12 -0
- package/src/utils.ts +128 -0
- package/tsconfig.json +8 -70
- package/webpack.config.js +3 -49
- package/.eslintignore +0 -2
- package/src/ai-panel.ts +0 -174
- package/src/claude-code/claude-panel.ts +0 -34
- package/src/claude-code/claude-runtime-client.ts +0 -148
- package/src/llm-utils/LLM-client.ts +0 -251
- package/src/llm-utils/combined-search.ts +0 -162
- package/src/llm-utils/creds.ts +0 -30
- package/src/llm-utils/deepwikiclient.ts +0 -118
- package/src/llm-utils/indexes/dg-repository-index.ts +0 -266
- package/src/llm-utils/panel.ts +0 -866
- package/src/llm-utils/script-tools.ts +0 -784
- package/src/llm-utils/sql-tools.ts +0 -840
- package/src/llm-utils/tableview-tools.ts +0 -704
- package/src/llm-utils/ui.ts +0 -315
- package/src/prompt-engine/chatgpt-assistant.ts +0 -257
- package/src/prompt-engine/interfaces.ts +0 -170
- package/src/prompt-engine/prompt-engine.ts +0 -52
- package/src/prompt-engine/rendering-tools.ts +0 -103
- package/src/prompts/is-help-request.ts +0 -26
- package/src/viewers-ai.ts +0 -67
- /package/src/{llm-utils → db}/indexes/biologics-index.ts +0 -0
- /package/src/{llm-utils → db}/indexes/chembl-index.ts +0 -0
- /package/src/{llm-utils → db}/query-meta-utils.ts +0 -0
- /package/src/{llm-utils/depr → depr}/AI-API-providers/openai-chat-completions-provider.ts +0 -0
- /package/src/{llm-utils/depr → depr}/AI-API-providers/openai-responses-provider.ts +0 -0
- /package/src/{llm-utils/depr → depr}/AI-API-providers/types.ts +0 -0
- /package/src/{llm-utils/depr → depr}/depr.ts +0 -0
- /package/src/{llm-utils/depr → depr}/embeddings.ts +0 -0
- /package/src/{llm-utils/depr → depr}/sql-utils.ts +0 -0
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
# Grokky latency/accuracy benchmark suite — see docs/BENCHMARK.md
|
|
2
|
+
#
|
|
3
|
+
# Each entry is one prompt sent through the real runtime pipeline (workspace context +
|
|
4
|
+
# view tools, exactly like the panel). Fields:
|
|
5
|
+
# category : grouping for the report
|
|
6
|
+
# (help | visualization | analysis | codegen | multitool | query | entities)
|
|
7
|
+
# difficulty : trivial | standard | hard (default standard) — drives the per-difficulty rollup.
|
|
8
|
+
# Lets a model comparison be read per tier rather than as one blended number,
|
|
9
|
+
# which is what showed the cheap tier losing on latency, not just accuracy.
|
|
10
|
+
# prompt : the user message
|
|
11
|
+
# table : demo table opened as the workspace before the turn. Resolves to
|
|
12
|
+
# System:DemoFiles/<table>.csv — so nested paths are written `chem/SPGI`.
|
|
13
|
+
# `randomWalk` is special-cased to grok.data.demo.randomWalk().
|
|
14
|
+
# assert : deterministic check, run AFTER the turn (following a settle delay). A single JS
|
|
15
|
+
# expression; truthy = pass. `await` is allowed. In scope:
|
|
16
|
+
# view — the TableView the turn ran against
|
|
17
|
+
# t — view.dataFrame
|
|
18
|
+
# before — {cols:[names], viewers:n, tableViews:n} snapshot taken pre-turn
|
|
19
|
+
# (note: `viewers` counts the grid, so a fresh view is 1)
|
|
20
|
+
# opened — how many new table views appeared during the turn
|
|
21
|
+
# openedViews — those TableViews themselves
|
|
22
|
+
# tools — bare tool names the turn called, in order
|
|
23
|
+
# rubric : grading rubric for a judge (used for free-text answers)
|
|
24
|
+
# A prompt may have assert, rubric, or both. Prompts with neither are latency-only.
|
|
25
|
+
#
|
|
26
|
+
# ASSERTION POLICY. Assert what was ASKED FOR, not that something happened. An existence check
|
|
27
|
+
# ("a scatter plot exists") passes on a half-right answer, which flattens the accuracy axis and
|
|
28
|
+
# makes a cheap-vs-strong comparison meaningless. Bind the columns: `v.props.xColumnName`
|
|
29
|
+
# reads the live look including defaults, so it is safe to read even when unset.
|
|
30
|
+
# Prefer self-referential ground truth (recompute the expected count from `t`) over hardcoded
|
|
31
|
+
# numbers, so the suite survives a demo-file refresh.
|
|
32
|
+
#
|
|
33
|
+
# Chem prompts need the Chem package installed. Ones marked SLOW may exceed the 120s turn cap.
|
|
34
|
+
|
|
35
|
+
# ======================================================================== trivial
|
|
36
|
+
# A cheap model should hold every one of these. 0-2 tool round-trips, no ambiguity.
|
|
37
|
+
|
|
38
|
+
- category: analysis
|
|
39
|
+
difficulty: trivial
|
|
40
|
+
prompt: How many rows and columns does this table have?
|
|
41
|
+
table: demog
|
|
42
|
+
rubric: >
|
|
43
|
+
Pass if it states both counts and they match 5850 rows and 11 columns. Fail on either
|
|
44
|
+
number wrong, or if it gives no numbers.
|
|
45
|
+
|
|
46
|
+
- category: analysis
|
|
47
|
+
difficulty: trivial
|
|
48
|
+
prompt: Select every row.
|
|
49
|
+
table: demog
|
|
50
|
+
assert: t.selection.trueCount === t.rowCount
|
|
51
|
+
|
|
52
|
+
- category: analysis
|
|
53
|
+
difficulty: trivial
|
|
54
|
+
prompt: Rename the AGE column to "Age (years)".
|
|
55
|
+
table: demog
|
|
56
|
+
assert: t.columns.contains('Age (years)') && !t.columns.contains('AGE')
|
|
57
|
+
|
|
58
|
+
- category: visualization
|
|
59
|
+
difficulty: trivial
|
|
60
|
+
prompt: Add a histogram of the AGE column.
|
|
61
|
+
table: demog
|
|
62
|
+
assert: Array.from(view.viewers).some(v => v.type === DG.VIEWER.HISTOGRAM && v.props.valueColumnName === 'AGE')
|
|
63
|
+
|
|
64
|
+
- category: visualization
|
|
65
|
+
difficulty: trivial
|
|
66
|
+
prompt: Add a scatter plot of HEIGHT versus WEIGHT.
|
|
67
|
+
table: demog
|
|
68
|
+
# Either axis assignment is a fair reading of "HEIGHT versus WEIGHT".
|
|
69
|
+
assert: Array.from(view.viewers).some(v => v.type === DG.VIEWER.SCATTER_PLOT && [v.props.xColumnName, v.props.yColumnName].sort().join() === 'HEIGHT,WEIGHT')
|
|
70
|
+
|
|
71
|
+
- category: visualization
|
|
72
|
+
difficulty: trivial
|
|
73
|
+
prompt: Add a box plot of WEIGHT split by SEX.
|
|
74
|
+
table: demog
|
|
75
|
+
assert: Array.from(view.viewers).some(v => v.type === DG.VIEWER.BOX_PLOT && v.props.valueColumnName === 'WEIGHT' && (v.props.categoryColumnNames || []).indexOf('SEX') >= 0)
|
|
76
|
+
|
|
77
|
+
- category: visualization
|
|
78
|
+
difficulty: trivial
|
|
79
|
+
prompt: Sort the grid by AGE, largest first.
|
|
80
|
+
table: demog
|
|
81
|
+
# `grid.sortByColumns = [...]` is a read-only getter — assigning to it is a silent no-op,
|
|
82
|
+
# so this also catches the model reaching for the wrong API.
|
|
83
|
+
assert: view.grid.sortByColumns.length === 1 && view.grid.sortByColumns[0].name === 'AGE' && view.grid.sortTypes[0] === false
|
|
84
|
+
|
|
85
|
+
- category: visualization
|
|
86
|
+
difficulty: trivial
|
|
87
|
+
prompt: Hide the RACE column.
|
|
88
|
+
table: demog
|
|
89
|
+
# Hide, not drop: the column must still exist in the dataframe.
|
|
90
|
+
assert: view.grid.col('RACE').visible === false && t.columns.contains('RACE')
|
|
91
|
+
|
|
92
|
+
- category: analysis
|
|
93
|
+
difficulty: trivial
|
|
94
|
+
prompt: Color-code the WEIGHT column with a linear colour scheme.
|
|
95
|
+
table: demog
|
|
96
|
+
assert: t.getCol('WEIGHT').meta.colors.getType() === DG.COLOR_CODING_TYPE.LINEAR
|
|
97
|
+
|
|
98
|
+
# ======================================================================== standard
|
|
99
|
+
|
|
100
|
+
- category: help
|
|
101
|
+
prompt: What semantic types can Datagrok automatically detect in a column?
|
|
102
|
+
rubric: >
|
|
103
|
+
Pass if the answer names several concrete semantic types (e.g. Molecule, Macromolecule,
|
|
104
|
+
and how detectors assign them). Fail if it refuses, is empty, or is off-topic.
|
|
105
|
+
|
|
106
|
+
- category: help
|
|
107
|
+
prompt: How do I create a scatter plot in Datagrok?
|
|
108
|
+
rubric: >
|
|
109
|
+
Pass if it explains a real way to add a scatter plot (viewer menu / Add viewer / API).
|
|
110
|
+
Fail if it invents non-existent UI or is empty.
|
|
111
|
+
|
|
112
|
+
- category: help
|
|
113
|
+
prompt: What file formats can I import as a table into Datagrok?
|
|
114
|
+
rubric: >
|
|
115
|
+
Pass if it lists several real importable formats (CSV, Excel, etc.). Fail if empty or wrong.
|
|
116
|
+
|
|
117
|
+
- category: help
|
|
118
|
+
prompt: How does Datagrok decide that a column contains molecules?
|
|
119
|
+
rubric: >
|
|
120
|
+
Pass if it references semantic-type detection / SMILES/molblock parsing. Fail if empty or wrong.
|
|
121
|
+
|
|
122
|
+
- category: visualization
|
|
123
|
+
prompt: Add a bar chart of the average WEIGHT for each RACE.
|
|
124
|
+
table: demog
|
|
125
|
+
assert: Array.from(view.viewers).some(v => v.type === DG.VIEWER.BAR_CHART && v.props.splitColumnName === 'RACE' && v.props.valueColumnName === 'WEIGHT' && String(v.props.valueAggrType).toLowerCase() === 'avg')
|
|
126
|
+
|
|
127
|
+
- category: visualization
|
|
128
|
+
prompt: Add a pie chart of the SEX column.
|
|
129
|
+
table: demog
|
|
130
|
+
assert: Array.from(view.viewers).some(v => v.type === DG.VIEWER.PIE_CHART && v.props.categoryColumnName === 'SEX')
|
|
131
|
+
|
|
132
|
+
- category: analysis
|
|
133
|
+
prompt: Add a calculated column equal to WEIGHT divided by HEIGHT squared.
|
|
134
|
+
table: demog
|
|
135
|
+
# Must be a real formula column, not a hand-filled loop, and the values must be right.
|
|
136
|
+
assert: t.columns.names().filter(n => !before.cols.includes(n)).some(n => t.getCol(n).meta.formula != null && Math.abs(t.getCol(n).get(0) - t.getCol('WEIGHT').get(0) / Math.pow(t.getCol('HEIGHT').get(0), 2)) < 1e-6)
|
|
137
|
+
|
|
138
|
+
- category: analysis
|
|
139
|
+
prompt: Select all rows where AGE is greater than 50.
|
|
140
|
+
table: demog
|
|
141
|
+
# Exact count, recomputed from the data — "some rows are selected" passed on almost anything.
|
|
142
|
+
assert: t.selection.trueCount === t.getCol('AGE').toList().filter(v => v > 50).length
|
|
143
|
+
|
|
144
|
+
- category: analysis
|
|
145
|
+
prompt: Filter the table to show only female patients.
|
|
146
|
+
table: demog
|
|
147
|
+
assert: t.filter.trueCount === t.getCol('SEX').toList().filter(v => v === 'F').length
|
|
148
|
+
|
|
149
|
+
- category: analysis
|
|
150
|
+
prompt: What is the average WEIGHT across all patients?
|
|
151
|
+
table: demog
|
|
152
|
+
rubric: >
|
|
153
|
+
Pass if the answer states a single average weight as a number (demog weights are ~60-90).
|
|
154
|
+
Fail if it gives no number or an obviously wrong magnitude.
|
|
155
|
+
|
|
156
|
+
- category: analysis
|
|
157
|
+
prompt: How many patients are missing a HEIGHT value? Add a boolean column flagging them.
|
|
158
|
+
table: demog
|
|
159
|
+
assert: t.columns.names().filter(n => !before.cols.includes(n)).some(n => t.getCol(n).type === DG.COLUMN_TYPE.BOOL && t.getCol(n).toList().filter(Boolean).length === t.getCol('HEIGHT').stats.missingValueCount)
|
|
160
|
+
|
|
161
|
+
- category: codegen
|
|
162
|
+
prompt: Write and run code to add a column with the natural log of WEIGHT.
|
|
163
|
+
table: demog
|
|
164
|
+
assert: t.columns.names().filter(n => !before.cols.includes(n)).some(n => Math.abs(t.getCol(n).get(0) - Math.log(t.getCol('WEIGHT').get(0))) < 1e-6)
|
|
165
|
+
|
|
166
|
+
- category: codegen
|
|
167
|
+
prompt: Generate and run JavaScript that builds a small table with columns x and y (5 rows) and opens it.
|
|
168
|
+
assert: openedViews.some(v => v.dataFrame.rowCount === 5 && v.dataFrame.columns.contains('x') && v.dataFrame.columns.contains('y'))
|
|
169
|
+
|
|
170
|
+
- category: codegen
|
|
171
|
+
prompt: Using code, count how many patients are older than 60 and tell me the number.
|
|
172
|
+
table: demog
|
|
173
|
+
rubric: >
|
|
174
|
+
Pass ONLY if the answer reports a single integer count and it equals 878. Fail if it gives
|
|
175
|
+
no number, gives a range, or reports two different numbers in the same answer.
|
|
176
|
+
|
|
177
|
+
- category: multitool
|
|
178
|
+
prompt: Add a histogram of AGE, then select the patients older than 60.
|
|
179
|
+
table: demog
|
|
180
|
+
assert: Array.from(view.viewers).some(v => v.type === DG.VIEWER.HISTOGRAM && v.props.valueColumnName === 'AGE') && t.selection.trueCount === t.getCol('AGE').toList().filter(v => v > 60).length
|
|
181
|
+
|
|
182
|
+
- category: multitool
|
|
183
|
+
prompt: Add a scatter plot of HEIGHT versus WEIGHT and color the points by SEX.
|
|
184
|
+
table: demog
|
|
185
|
+
# The colour half was previously unverified, making this a duplicate of the plain scatter prompt.
|
|
186
|
+
assert: Array.from(view.viewers).some(v => v.type === DG.VIEWER.SCATTER_PLOT && [v.props.xColumnName, v.props.yColumnName].sort().join() === 'HEIGHT,WEIGHT' && v.props.colorColumnName === 'SEX')
|
|
187
|
+
|
|
188
|
+
- category: analysis
|
|
189
|
+
prompt: Rename the three walk columns to X, Y and Z, then plot Y against X coloured by Z.
|
|
190
|
+
table: randomWalk
|
|
191
|
+
# The source columns are named `#0`, `#1`, `#2` — a stress test for name quoting.
|
|
192
|
+
assert: "['X','Y','Z'].every(n => t.columns.contains(n)) && Array.from(view.viewers).some(v => v.type === DG.VIEWER.SCATTER_PLOT && v.props.xColumnName === 'X' && v.props.yColumnName === 'Y' && v.props.colorColumnName === 'Z')"
|
|
193
|
+
|
|
194
|
+
- category: query
|
|
195
|
+
prompt: What database connections do I have access to, and what kind of data can I query?
|
|
196
|
+
rubric: >
|
|
197
|
+
Pass if it describes the user's available connections or explains how to browse them.
|
|
198
|
+
Fail if it hallucinates specific databases it cannot know or is empty.
|
|
199
|
+
|
|
200
|
+
# ======================================================================== hard
|
|
201
|
+
# Multi-step, or targeting a documented trap where skipping the skill produces a
|
|
202
|
+
# DETECTABLY wrong state rather than a plausible one.
|
|
203
|
+
|
|
204
|
+
- category: multitool
|
|
205
|
+
difficulty: hard
|
|
206
|
+
prompt: Add a scatter plot of HEIGHT vs WEIGHT coloured by SEX, sort the grid by AGE descending, then select the patients over 60.
|
|
207
|
+
table: demog
|
|
208
|
+
assert: Array.from(view.viewers).some(v => v.type === DG.VIEWER.SCATTER_PLOT && v.props.colorColumnName === 'SEX') && view.grid.sortByColumns[0] && view.grid.sortByColumns[0].name === 'AGE' && view.grid.sortTypes[0] === false && t.selection.trueCount === t.getCol('AGE').toList().filter(v => v > 60).length
|
|
209
|
+
|
|
210
|
+
- category: analysis
|
|
211
|
+
difficulty: hard
|
|
212
|
+
prompt: Clear the filter and deselect everything.
|
|
213
|
+
table: demog
|
|
214
|
+
# Opposite polarities in one turn: a filter clears with setAll(TRUE), a selection with setAll(FALSE).
|
|
215
|
+
# Getting them the same way round is the single most common failure in this area.
|
|
216
|
+
assert: t.filter.trueCount === t.rowCount && t.selection.trueCount === 0
|
|
217
|
+
|
|
218
|
+
- category: analysis
|
|
219
|
+
difficulty: hard
|
|
220
|
+
prompt: Hide the rows where AGE is over 70 — don't delete them, just hide them.
|
|
221
|
+
table: demog
|
|
222
|
+
# Two traps: non-destructive (no row removal), and inverted polarity (KEEP where age <= 70).
|
|
223
|
+
# Missing numerics are `undefined` from toList() and a 2.68e-34 sentinel from get() — only
|
|
224
|
+
# isNone() identifies them. A row with unknown AGE is not "over 70", so it stays visible.
|
|
225
|
+
assert: t.rowCount === before.rowCount && t.filter.trueCount === (() => { const c = t.getCol('AGE'); let n = 0; for (let i = 0; i < t.rowCount; i++) if (c.isNone(i) || c.get(i) <= 70) n++; return n; })()
|
|
226
|
+
|
|
227
|
+
- category: analysis
|
|
228
|
+
difficulty: hard
|
|
229
|
+
prompt: Select the 10 heaviest patients.
|
|
230
|
+
table: demog
|
|
231
|
+
# get() on a missing numeric returns a 2.68e-34 sentinel, not null — filter with isNone().
|
|
232
|
+
assert: t.selection.trueCount === 10 && (() => { const c = t.getCol('WEIGHT'); const vals = []; for (let i = 0; i < t.rowCount; i++) if (!c.isNone(i)) vals.push(c.get(i)); vals.sort((a,b) => b-a); return t.selection.getSelectedIndexes().every(i => !c.isNone(i) && c.get(i) >= vals[9]); })()
|
|
233
|
+
|
|
234
|
+
- category: analysis
|
|
235
|
+
difficulty: hard
|
|
236
|
+
prompt: Select every patient older than 60, then open just those rows as a new table.
|
|
237
|
+
table: demog
|
|
238
|
+
assert: t.selection.trueCount > 0 && openedViews.some(v => v.dataFrame.rowCount === t.selection.trueCount)
|
|
239
|
+
|
|
240
|
+
- category: analysis
|
|
241
|
+
difficulty: hard
|
|
242
|
+
prompt: Work out the average HEIGHT and WEIGHT and the patient count for every RACE and SEX combination, and open the result as a new table.
|
|
243
|
+
table: demog
|
|
244
|
+
# 4 races x 2 sexes = 8 groups, recomputed rather than hardcoded.
|
|
245
|
+
assert: openedViews.some(v => v.dataFrame.rowCount === new Set(t.getCol('RACE').toList().map((r,i) => r + '|' + t.getCol('SEX').get(i))).size && v.dataFrame.columns.length >= 4)
|
|
246
|
+
|
|
247
|
+
- category: analysis
|
|
248
|
+
difficulty: hard
|
|
249
|
+
prompt: Pivot the demographics so there is one row per RACE, one column per SEX, showing the average AGE. Open it as a new table.
|
|
250
|
+
table: demog
|
|
251
|
+
assert: openedViews.some(v => v.dataFrame.rowCount === t.getCol('RACE').stats.uniqueCount && v.dataFrame.columns.length >= 3)
|
|
252
|
+
|
|
253
|
+
- category: multitool
|
|
254
|
+
difficulty: hard
|
|
255
|
+
prompt: Add a BMI column computed as WEIGHT divided by height in metres squared, colour-code it linearly, and show me a histogram of it.
|
|
256
|
+
table: demog
|
|
257
|
+
assert: t.columns.names().filter(n => !before.cols.includes(n)).some(n => t.getCol(n).meta.colors.getType() === DG.COLOR_CODING_TYPE.LINEAR && Array.from(view.viewers).some(v => v.type === DG.VIEWER.HISTOGRAM && v.props.valueColumnName === n))
|
|
258
|
+
|
|
259
|
+
- category: multitool
|
|
260
|
+
difficulty: hard
|
|
261
|
+
prompt: Eighteen beers have no ABV recorded. Tell me how many there are, delete those rows, then show a histogram of ABV.
|
|
262
|
+
table: beer
|
|
263
|
+
# Here "delete" really is destructive — the mirror image of the hide-don't-delete prompt above.
|
|
264
|
+
assert: t.getCol('ABV').stats.missingValueCount === 0 && t.rowCount === before.rowCount - 18 && Array.from(view.viewers).some(v => v.type === DG.VIEWER.HISTOGRAM && v.props.valueColumnName === 'ABV')
|
|
265
|
+
|
|
266
|
+
- category: multitool
|
|
267
|
+
difficulty: hard
|
|
268
|
+
prompt: Filter the beers down to Pale Ales, then add a scatter plot of IBU vs ABV that keeps showing all styles for comparison.
|
|
269
|
+
table: beer
|
|
270
|
+
# rowSource defaults to 'Filtered', so 'All' is a real, non-default state change.
|
|
271
|
+
assert: t.filter.trueCount < t.rowCount && Array.from(view.viewers).some(v => v.type === DG.VIEWER.SCATTER_PLOT && String(v.props.rowSource) === 'All')
|
|
272
|
+
|
|
273
|
+
- category: multitool
|
|
274
|
+
difficulty: hard
|
|
275
|
+
prompt: Select the 20 most bitter beers, then add a bar chart of average ABV by Style Family that only uses the selected rows.
|
|
276
|
+
table: beer
|
|
277
|
+
assert: t.selection.trueCount === 20 && Array.from(view.viewers).some(v => v.type === DG.VIEWER.BAR_CHART && String(v.props.rowSource) === 'Selected' && v.props.splitColumnName === 'Style Family')
|
|
278
|
+
|
|
279
|
+
- category: analysis
|
|
280
|
+
difficulty: hard
|
|
281
|
+
prompt: Open the Filters panel with filters on Style Family, Origin and ABV, and narrow ABV to between 5 and 8.
|
|
282
|
+
table: beer
|
|
283
|
+
# A histogram filter needs BOTH min and max — supplying one silently does nothing.
|
|
284
|
+
# Judged per row over KNOWN values only: whether a range filter also keeps missing-ABV rows is
|
|
285
|
+
# platform policy, not something the prompt asked about, and asserting a total count silently
|
|
286
|
+
# made that policy the pass/fail criterion (the model's 75 was exactly the 57 in range plus the
|
|
287
|
+
# 18 rows with no ABV). This demands the range be applied correctly and stays out of that.
|
|
288
|
+
assert: Array.from(view.viewers).some(v => v.type === DG.VIEWER.FILTERS) && t.filter.trueCount > 0 && (() => { const c = t.getCol('ABV'); for (let i = 0; i < t.rowCount; i++) { if (c.isNone(i)) continue; const inRange = c.get(i) >= 5 && c.get(i) <= 8; if (t.filter.get(i) !== inRange) return false; } return true; })()
|
|
289
|
+
|
|
290
|
+
- category: visualization
|
|
291
|
+
difficulty: hard
|
|
292
|
+
prompt: Freeze the first two columns, hide DEMOG and CONTROL, and make the rows 40 pixels tall.
|
|
293
|
+
table: demog
|
|
294
|
+
# Deliberately "freeze" rather than "pin": GridColumn has pin()/unpin() but no isPinned getter,
|
|
295
|
+
# so pinning cannot be asserted.
|
|
296
|
+
assert: view.grid.col('DEMOG').visible === false && view.grid.col('CONTROL').visible === false && view.grid.props.frozenColumns === 2 && view.grid.props.rowHeight === 40
|
|
297
|
+
|
|
298
|
+
- category: query
|
|
299
|
+
difficulty: hard
|
|
300
|
+
prompt: List my database connections.
|
|
301
|
+
# Entities must be rendered as cards, never prose-listed — assert on the path taken.
|
|
302
|
+
assert: tools.includes('datagrok_show_entities')
|
|
303
|
+
|
|
304
|
+
- category: multitool
|
|
305
|
+
difficulty: hard
|
|
306
|
+
prompt: Calculate molecular weight, cLogP and hydrogen-bond donors for the structures, then plot LogP against MW coloured by HBD.
|
|
307
|
+
table: chem/SPGI
|
|
308
|
+
# SPGI has no MW/LogP/HBD columns of its own, so these names are collision-free.
|
|
309
|
+
assert: "['MW','LogP','HBD'].every(n => t.col(n) != null) && Array.from(view.viewers).some(v => v.type === DG.VIEWER.SCATTER_PLOT && v.props.colorColumnName === 'HBD')"
|
|
310
|
+
|
|
311
|
+
- category: multitool
|
|
312
|
+
difficulty: hard
|
|
313
|
+
prompt: Flag any compound that trips a PAINS structural alert, select those, and pull them out into their own table.
|
|
314
|
+
table: chem/SPGI
|
|
315
|
+
assert: t.columns.names().some(n => n.indexOf('PAINS') === 0) && t.selection.trueCount > 0 && openedViews.some(v => v.dataFrame.rowCount === t.selection.trueCount)
|
|
316
|
+
|
|
317
|
+
- category: analysis
|
|
318
|
+
difficulty: hard
|
|
319
|
+
prompt: How many of these compounds contain a piperidine ring (C1CCNCC1)? Filter to them and open the hits as a separate table.
|
|
320
|
+
table: chem/SPGI
|
|
321
|
+
# The substructure filter reads a molblock — passing raw SMILES silently matches ZERO rows,
|
|
322
|
+
# so the rowCount > 0 clause is load-bearing.
|
|
323
|
+
assert: openedViews.some(v => v.dataFrame.rowCount > 0 && v.dataFrame.rowCount < t.rowCount)
|
|
324
|
+
|
|
325
|
+
# ======================================================================== entities (server-side)
|
|
326
|
+
# Coverage for the datagrok MCP surface — the five domain tools (datagrok_functions,
|
|
327
|
+
# datagrok_files, datagrok_projects, datagrok_spaces, datagrok_platform), each dispatching on an
|
|
328
|
+
# `op`. The suite had NO coverage here, so the 32-tool -> 5-tool consolidation would have been
|
|
329
|
+
# unmeasurable: a prefix saving that quietly broke server-side work would still have scored 39/44.
|
|
330
|
+
#
|
|
331
|
+
# These asserts read the SERVER (grok.dapi), not the view, and anything they create they delete —
|
|
332
|
+
# a benchmark arm runs these 3x and must not litter the instance.
|
|
333
|
+
|
|
334
|
+
- category: entities
|
|
335
|
+
difficulty: trivial
|
|
336
|
+
prompt: Which user account am I signed in as on this Datagrok server?
|
|
337
|
+
rubric: >
|
|
338
|
+
Pass if it names the signed-in account — a login, email, or full name that it got from the
|
|
339
|
+
server this turn. Fail if it says it cannot tell, describes how one would find out, or
|
|
340
|
+
invents a placeholder name.
|
|
341
|
+
|
|
342
|
+
- category: entities
|
|
343
|
+
difficulty: trivial
|
|
344
|
+
prompt: List the data connections on this server and show them as cards.
|
|
345
|
+
# Entities are rendered as interactive cards, never prose-listed — assert on the path taken.
|
|
346
|
+
assert: tools.includes('datagrok_show_entities')
|
|
347
|
+
|
|
348
|
+
- category: entities
|
|
349
|
+
difficulty: standard
|
|
350
|
+
prompt: What files are in the System:DemoFiles connector? Show them.
|
|
351
|
+
assert: tools.includes('datagrok_show_entities')
|
|
352
|
+
|
|
353
|
+
- category: entities
|
|
354
|
+
difficulty: standard
|
|
355
|
+
prompt: Read the file System:DemoFiles/demog.csv from the server and tell me its column headers.
|
|
356
|
+
# Ground truth checked against the live server; demog.csv is a fixed demo file.
|
|
357
|
+
rubric: >
|
|
358
|
+
Pass if it lists the real headers — USUBJID, AGE, SEX, RACE, DIS_POP, HEIGHT, WEIGHT, DEMOG,
|
|
359
|
+
CONTROL, STARTED, SEVERITY. Allow a subset only if it says it is showing part of the list.
|
|
360
|
+
Fail on invented column names.
|
|
361
|
+
|
|
362
|
+
- category: entities
|
|
363
|
+
difficulty: standard
|
|
364
|
+
prompt: Search the server for functions whose name mentions "molecularWeight" and tell me which package each comes from.
|
|
365
|
+
# Verified against the live instance: OligoBatchCalculator:molecularWeight exists, and there is
|
|
366
|
+
# NO Chem:molecularWeight — inventing the obvious-sounding Chem one is the failure to catch.
|
|
367
|
+
rubric: >
|
|
368
|
+
Pass if it names OligoBatchCalculator:molecularWeight (or clearly attributes molecularWeight
|
|
369
|
+
to the OligoBatchCalculator package). Fail if it invents a function such as
|
|
370
|
+
Chem:molecularWeight, or answers without naming any concrete function.
|
|
371
|
+
|
|
372
|
+
- category: entities
|
|
373
|
+
difficulty: standard
|
|
374
|
+
prompt: What spaces exist on this server?
|
|
375
|
+
rubric: >
|
|
376
|
+
Pass if it reports the spaces it found by name, or clearly states that there are none.
|
|
377
|
+
Fail if it invents space names, or explains what spaces are instead of listing them.
|
|
378
|
+
|
|
379
|
+
- category: entities
|
|
380
|
+
difficulty: standard
|
|
381
|
+
prompt: What operations can you perform on spaces here?
|
|
382
|
+
# Progressive disclosure: the tool description lists only op NAMES, so a real answer requires
|
|
383
|
+
# calling datagrok_spaces with no `op` to get the catalog. Answering from the menu alone is
|
|
384
|
+
# fine too — what must not happen is a generic essay about spaces.
|
|
385
|
+
rubric: >
|
|
386
|
+
Pass if it enumerates concrete operations on spaces — at least three of: list, get, create,
|
|
387
|
+
delete, create a subspace, list children, add/remove an entity, read/write/delete a file in
|
|
388
|
+
space storage. Fail if it only describes what spaces are, or lists operations it cannot do.
|
|
389
|
+
|
|
390
|
+
- category: entities
|
|
391
|
+
difficulty: hard
|
|
392
|
+
prompt: Create a project named "Grokky Bench Project" with the description "temporary benchmark artifact".
|
|
393
|
+
# Creates real server state, so the assert is also the cleanup — an arm runs this 3x.
|
|
394
|
+
assert: >
|
|
395
|
+
(await (async () => {
|
|
396
|
+
const hits = await grok.dapi.projects.filter('Grokky Bench Project').list();
|
|
397
|
+
const mine = hits.filter((p) => p.name === 'Grokky Bench Project');
|
|
398
|
+
for (const p of mine) {
|
|
399
|
+
try {
|
|
400
|
+
await grok.dapi.projects.delete(p);
|
|
401
|
+
} catch (e) { /* leave it for the next run rather than fail the assert */ }
|
|
402
|
+
}
|
|
403
|
+
return mine.length > 0;
|
|
404
|
+
})())
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Process CRO Results
|
|
2
|
+
|
|
3
|
+
Triage a freshly returned CRO assay: standardize compounds, separate known from novel hits, flag liabilities, score the promising ones, and hand off a shared project for review.
|
|
4
|
+
|
|
5
|
+
Work through the steps below in order. After each one, post a one-line status update to chat.
|
|
6
|
+
|
|
7
|
+
1. Open the dataset containing molecular structures.
|
|
8
|
+
2. Standardize structures — canonicalize SMILES and strip salts.
|
|
9
|
+
3. Flag structural alerts on all rows: PAINS, BMS, SureChEMBL. Add a `Flags` column.
|
|
10
|
+
4. For unflagged rows, score toxicity risks and drug-likeness (Lipinski).
|
|
11
|
+
5. Build a chemical space map (t-SNE/UMAP on Morgan fingerprints), colored by Lipinski violations.
|
|
12
|
+
6. Create a project named "CRO Triage {today}".
|
|
13
|
+
7. Share the project with the `toxicology-review` group at View access.
|
|
14
|
+
8. Share the project in the chat.
|