Repository navigation
[bot] Merge master/8bc01a8a into rel/dev - #1945
Merged
Merged
Conversation
`TakeawayClient.request(ti)` holds the body, post and retry code that `ask(item)` had, and `ask` now validates the item's `takeaway_input` and delegates, so a caller without a `DatasetItem` can request a takeaway. The transient-or-setup split moves from `core/takeaway/evaluate.py` to the client module as `is_transient`, so the agentic document skill can share it without importing the takeaway entry point. No behaviour change for `document_takeaway`. jira: LX-3246 risk: low
`editor_takeaway_input(document, page, takeaway)` reproduces gdc-ui's `documentTakeawayRequest` for a v2 document: every visualization on the page in layout order, deduplicated by id and filters, each under the period on its own date dataset (or a document date filter with both ends on that dataset in its place, or none when the widget ignores the period or has no date dataset) plus the document's attribute and text filters, `filterContext` empty, and the takeaway's and the document's instructions trimmed. Pure, no network. The document filters follow gen-ai's `report_filter_to_afm` rule for rule: an attribute filter reads its elements from `uris`, else from `values`, the shape the converter writes; a text filter on whole values becomes an element filter and one on a fragment a `matchAttributeFilter`; an exclusion of nothing and any other kind (measure value filters) are left out, since the renderer draws no chart differently for them. The function returns a reason instead when the page has no visualization or a filter has no AFM form (an empty positive selection, an unknown match operator or date granularity). `maxCharacters` is left to the endpoint default and text variables are sent as written. jira: LX-3246 risk: low
When a v2 draft's `draft_document` result lists pages in `takeaway_editor_page_ids` and the fixture states a narrative, the run writes each unwritten takeaway on those pages through the takeaway endpoint, the way the editor does, and grades the document with that text. The copilot sends the document as code, so each request is built from its declarative form (`aac_document_to_declarative`), which is what the editor reads: the period lands on each chart's own date dataset and the document filters arrive in the converter's shape. A draft that does not convert fails the run with the converter's reason. The published `document_part` stays the one the copilot sent. An empty takeaway on any other page still fails as before, and a v1 draft or a v2 draft without the field (every draft today) makes no request and is graded unchanged. A takeaway the endpoint does not write (`noData`, empty text) or whose request the eval cannot build stays empty and adds a failure line that says why. A non-transient 4xx (the takeaway flag off answers 404) raises as a setup problem. A transient failure after the client's retries leaves that takeaway empty and the fill goes on; the run is ungraded (`fill_error`, like a judge error: out of pass@K and keeping pass^K from holding) only when nothing but transient failures left a takeaway empty, and otherwise fails on the summaries check. An item whose every run is ungraded raises naming both sources. The count of written takeaways is published as the diagnostic `document_takeaways_by_editor` score and in the run detail. The endpoint time counts toward `agent_s`. jira: LX-3246 risk: low
feat(gooddata-eval): grade takeaways the copilot leaves to the editor
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## rel/dev #1945 +/- ##
===========================================
+ Coverage 86.44% 86.52% +0.08%
===========================================
Files 348 349 +1
Lines 26670 26957 +287
===========================================
+ Hits 23054 23324 +270
- Misses 3616 3633 +17 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
🚀 Automated PR to perform merge from master into rel/dev with changes up to 8bc01a8 (created by https://github.com/gooddata/gooddata-python-sdk/actions/runs/43099316689).