fix(seer): Make widget conditions readable for the Seer Explorer agent #112502
Merged
Mihir-Mavalankar merged 3 commits intomasterfrom Apr 8, 2026
Merged
fix(seer): Make widget conditions readable for the Seer Explorer agent #112502Mihir-Mavalankar merged 3 commits intomasterfrom
Mihir-Mavalankar merged 3 commits intomasterfrom
Conversation
Contributor
Mihir-Mavalankar
commented
Apr 8, 2026
- Widget query conditions use internal \uf00d Unicode markers around wildcard operators (e.g. Contains, StartsWith), which produce garbled strings like Containsqueue.task.taskworker when rendered to markdown for the Seer agent — causing the agent to make broken tool calls with literal operator text as search values.
- Add readableConditions() that replaces the 6 \uf00d-delimited operators with readable labels (e.g. contains, starts with) via simple string replacement. All other query structure — AND, OR, parentheses, free text, negation, comparison operators — passes through unchanged.
- Update widget query hints to describe what each widget type visualizes (timeseries chart, table, single number) and direct the agent to understand intent from the query config, instead of referencing internal API parameters (y_axes, group_by) that the natural-language tool doesn't use.
- Add 20 tests covering all 6 operator types, partial match safety, mixed operators, repeated operators, OR with parens, free text passthrough, literal "Contains" without markers, and a real-world dashboard widget query.
… LLM context Widget conditions use \uf00d-delimited operators (e.g. Containsqueue.task) that are invisible but garble the Seer agent's understanding, causing broken tool calls. Replace these with readable labels (e.g. " contains ") via simple string replacement that preserves all query structure — AND, OR, parens, free text, and comparison operators pass through unchanged. Co-Authored-By: Claude Opus 4.6 <noreply@example.com>
The Seer agent uses natural language tool calls, not raw API params. Replace hints that reference internal params (y_axes, group_by, query) with descriptions of what the widget visualizes and direct the agent to understand the intent from the query config. Co-Authored-By: Claude Opus 4.6 <noreply@example.com>
45342f7 to
39ea4be
Compare
gggritso
approved these changes
Apr 8, 2026
Member
gggritso
left a comment
There was a problem hiding this comment.
Makes sense 👍 I'll leave it to you if you want to make the query conversion more robust or not. I think if you don't cover all the cases now it'll be harder to spot the bad cases later, but up to you
Instead of hardcoding 6 replaceAll calls, derive replacements from OP_LABELS by filtering to keys containing \uf00d markers. This automatically handles any new operators added to the map. Co-Authored-By: Claude Opus 4.6 <noreply@example.com>
george-sentry
pushed a commit
that referenced
this pull request
Apr 9, 2026
#112502) + Widget query conditions use internal \uf00d Unicode markers around wildcard operators (e.g. Contains, StartsWith), which produce garbled strings like Containsqueue.task.taskworker when rendered to markdown for the Seer agent — causing the agent to make broken tool calls with literal operator text as search values. + Add readableConditions() that replaces the 6 \uf00d-delimited operators with readable labels (e.g. contains, starts with) via simple string replacement. All other query structure — AND, OR, parentheses, free text, negation, comparison operators — passes through unchanged. + Update widget query hints to describe what each widget type visualizes (timeseries chart, table, single number) and direct the agent to understand intent from the query config, instead of referencing internal API parameters (y_axes, group_by) that the natural-language tool doesn't use. + Add 20 tests covering all 6 operator types, partial match safety, mixed operators, repeated operators, OR with parens, free text passthrough, literal "Contains" without markers, and a real-world dashboard widget query. --------- Co-authored-by: Claude Opus 4.6 <noreply@example.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.