Skip to content

feat(datasetAttributes): provide pagination option + attribute description based evals - #1505

Merged
nikkikapadia merged 6 commits into
mainfrom
nikkikapadia/exp-1291-chooses-field-based-off-of-more-accurate-description
Oct 20, 2026
Merged

nikkikapadia merged 6 commits into
mainfrom
nikkikapadia/exp-1291-chooses-field-based-off-of-more-accurate-description

Conversation

@nikkikapadia

Copy link
Copy Markdown
Member

This PR creates more evals; this case in particular is to see that the descriptions of attributes make a difference in which attributes the agent chooses. I've added two new cases: (1) chooses a field that has a description over a very similar field that doesn't and (2) chooses the more correct field between two similar fields that have descriptions.

The issue with the datasetAttributes tool is that it only shows the first 50 attributes, but majority of those first 50 attributes are the sentry recommended fields. This means the agent doesn't even see the attributes and the descriptions we need it to see. I've done some rearranging so that the field type is in brackets beside the attribute key so we can get rid of that entire section and i've filtered out the sentry provided attributes based on the substringMatch. Unfortunately that isn't quite enough since there are still attributes hidden, so i've added a pagination feature to this tool that will direct the agent to call the tool again to see the next page of results.

@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sentry-local Ready Ready Preview Oct 20, 2026 2:38pm UTC

Request Review

@linear-code

linear-code Bot commented Oct 15, 2026

Copy link
Copy Markdown

EXP-1291

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 42ab651. Configure here.

Comment thread packages/mcp-core/src/tools/support/search-events/utils.ts
Comment thread packages/mcp-core/src/tools/support/search-events/utils.test.ts Outdated
@nikkikapadia
nikkikapadia marked this pull request as ready for review October 15, 2026 17:24
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Oct 15, 2026

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great stuff! I'm definitely not an area expert but this all looks good and reasonable from a data browsing perspective, I think. 👏

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[Style] A collection of unrelated formatting changes to Markdown - is this maybe an existing tooling issue in the repo?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ya maybe, honestly idk how it did this because i swear my prettier extension hasn't been working for a while 😢

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh we switched from Prettier to Oxfmt, that might have something to do with it 😄

#1547

Comment on lines +1283 to +1286
const pageFields = [...availableFields].slice(
offset,
offset + FIELDS_PAGE_SIZE,
);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[Question] This still means custom attributes are going to take >1 query to get surfaced. Spans have more built-in fields than that (including aggregates).

Should we do something like put custom attributes first and/or put aggregates last? Is there a general sense of which should come first? (genuinely asking, I don't have one myself)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

so they way it works is there are some attributes that are hardcoded because they are the most used and suggested by us. The rest of the attributes come after; more often than not most queries end up using these suggested attributes anyways so it's not really a big deal. Also when we spread the custom attributes on top of the suggested attributes it absorbs all the context and stuff from the attributes endpoint and puts it in the same position (AKA at the top). For attributes that aren't in that first page it will have to query it again.

expect(result).toContain(
"call datasetAttributes again with the same arguments and offset: 50",
);
expect(result).not.toContain("- device.memory: The estimated");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[Bug] The list will have device.memory (number), so this isn't asserting anything.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

damn good catch, I'll fix that!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I wish I could take credit for this one, it was a Claude finding haha

@nikkikapadia
nikkikapadia merged commit 43b9195 into main Oct 20, 2026
37 checks passed
@nikkikapadia
nikkikapadia deleted the nikkikapadia/exp-1291-chooses-field-based-off-of-more-accurate-description branch October 20, 2026 15:04

This branch was successfully deployed

2 active deployments
Preview — f98fbed1 Deployed Oct 20, 2026 by vercel[bot]
Actions — f98fbed1 Deployed Oct 20, 2026 by nikkikapadia via eval #1335
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants