Repository navigation
fix(gooddata-eval): read a v2 text summary on a page with no takeaway - #1909
chrisbonilla95 wants to merge 1 commit into
Conversation
gen-ai writes a page's summary into its page template's `text` widget with id `summary` whenever `auto` picks a template without a takeaway, which is every page with three or more charts on the default templates. `_summary_slots` returned only takeaways for v2, so those pages had no summary slot: `render_document_text` gave the narrative judge no `Summary:` line for them and the judge failed `agent_document_skill` item 7 for a missing summary, while `document_summaries_present` skipped the page. A v2 page without a takeaway now has its `text` widget `summary` as its slot, `_summary_text` reads its `markdown`, and an unwritten one fails as `page 'X' has a text summary with no written text`. A takeaway still wins over a text summary on the same page, and a v2 document with neither reports `the document has no takeaway or text summary`. jira: LX-3326 risk: low
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1909 +/- ##
=======================================
Coverage 85.75% 85.75%
=======================================
Files 343 343
Lines 25182 25187 +5
=======================================
+ Hits 21595 21600 +5
Misses 3587 3587 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Closing: this rule change is no longer needed. Pages with one chart, or three or more, get a takeaway from the revised default page templates instead (tracked in LX-3462), so the document evaluation keeps counting only takeaways. 🤖 Written by pub-ops, an AI agent, and approved by @chrisbonilla95. |
gd-eval's agentic document evaluation now reads a v2 page'stextwidgetsummaryas that page's summary when the page has no takeaway. Takeaways and v1 documents score as before.Draft, held until the evaluator rule is settled. LX-3342 records that the document evaluation counts only takeaways, because a text summary is a static widget the user fills or removes and AI-written text is the takeaway's job. This PR implements the other rule and merges only if that decision changes.
PR 4 of 4 for LX-3326.
What this implements
gen-ai writes a page's summary into the page template's
textwidget with idsummarywheneverautopicks a template without a takeaway. That is any pageautocannot fit onviz2TakeawayRight(the only default template with a takeaway), or one where the model names a text-summary template._summary_slotsreturned only takeaways for v2, so those pages had no summary slot. The narrative judge saw charts with noSummary:line and failedagent_document_skillitem 7 for a missing summary, whiledocument_summaries_presentskipped the page. Judge input from a local item 7 run on the releasedgooddata-eval(page 3 is on a text-summary template holding "Customer totals, new customers, and returning customers for the first half of 2026."):The same item on this branch, local stack (gen-ai on the Publisher v2 branch, api-gw with
ENABLE_PUBLISHER_V2=true, this branch installed editable into gdc-nastests/tavern-e2e). Both pages are on text-summary templates (viz1SummaryRight,viz4SummaryRight):Item 7 still fails the judge, now for a reason that sits in gen-ai rather than here. No summary in any run was written from the data (
summaries_from_data: 0). A text-summary page holds only the copilot'ssummary_text, written without running a chart, so it describes the charts rather than how the numbers moved. On the local stack the one takeaway page fell back to that text as well, because mcp-server was not running.Unit tests:
Decisions
A v2 page with a
takeawaywidget is summarised by its takeaways alone. Thetextwidgetsummarycounts only when the page has none.test_a_written_summary_text_does_not_stand_in_for_an_empty_takeaway, unchanged).document_summaries_present.When the model gives no
summary_textfor a page on a text-summary template, the reader sees no summary on that page. The check names it aspage 'X' has a text summary with no written text. A v2 document with neither slot reportsthe document has no takeaway or text summary.Read
_summary_slots,_summary_textand_slot_nameinpackages/gooddata-eval/src/gooddata_eval/core/agentic/document_skill.pyclosely.What comes next
tests/tavern-e2e: bump thegooddata-evalpin once this is released.🤖 Generated with Claude Code
https://claude.ai/code/session_014kgvNiaTSpvcsHvE8xfvYr