Skip to content

feat: hint field filtering in get-dataset-items description#1032

Open
RobertCrupa wants to merge 2 commits into
masterfrom
feat/dataset-items-field-filtering-hint
Open

feat: hint field filtering in get-dataset-items description#1032
RobertCrupa wants to merge 2 commits into
masterfrom
feat/dataset-items-field-filtering-hint

Conversation

@RobertCrupa

@RobertCrupa RobertCrupa commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

What

Nudges the get-dataset-items tool description to pass fields when only specific columns are needed, to reduce response size.

The hint is framed as optional ("when you only need specific columns") so the model does not under-fetch data the user actually asked for. It points only at get-dataset for discovering field names — a lightweight metadata call — not get-dataset-schema, which is often large and would blow out the context (the opposite of the goal here; see #986).

Why

Takeaway from the workflow eval work: dataset responses are often large, and selecting only the needed columns meaningfully cuts response size when the full row isn't required.

Verification

  • pnpm run type-check — clean
  • pnpm run lint — clean
  • pnpm run test:unit — clean
  • pnpm run format — clean
  • pnpm run check:agents — clean

@RobertCrupa RobertCrupa requested review from MQ37 and jirispilka June 26, 2026 11:07

@jirispilka jirispilka left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First I would not tell the model do this or this. There should be one preferred way.
Second, I would not even nudge model to get-dataset-schema. The schema is typically very big and will blow out the context (the would be against the idea that you want to achieve here), see this PR: #986 w.r.t to dataset-schema

Address review: drop the get-dataset-schema pointer (schemas are large
and blow out context) and the "this or that" phrasing — point only at
get-dataset for field discovery. Tighten the nudge wording.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q286TCpASDvaeUhPRnGgh6
@RobertCrupa

Copy link
Copy Markdown
Contributor Author

@jirispilka Thank you for your comment. I think I went from being too aggressive to too passive here :) Hopefully this new nudge is better

@RobertCrupa RobertCrupa requested a review from jirispilka June 26, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants