feat(max): Include query description in formatted query result #29220
+20
−5
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.
Problem
The assistant root didn't have a query title associated with query results, the only context being the earlier message history. Usually this has been fine, but e.g. if the previous message was an assistant message based on docs retrieval, root's summarization was confused what the query is (e.g. with a question like "tell me about key features of PostHog trends and show me an example of such a insight", root wasn't sure that it's looking at an example insight).
Changes
With this change, we're using the
query_description
arg ofcreate_and_query_insight
in query executor results formatting. This is a straightforward way to give root the right context.How did you test this code?
TODO