ai newsFr., 4. Dez.
EilmeldungAlibaba Releases Qwen4-35B-A3B: Open-Weight MoE Model With 1M Context

Copilot auf das Power BI semantic model testen, bevor es die Nutzer tun

Nach der Aktivierung von Copilot auf einem Power BI semantic model liefert dieselbe Frage je nach Formulierung teils stark abweichende Zahlen. Mit getesteten Beispielfragen und passenden SQL-Antworten lassen sich solche Diskrepanzen aufdecken, bevor Nutzer sie im Alltag entdecken.

dev.toMittwoch 21:30 · 02.12.DE20 Min. Lesezeit
Bild: dev.to

Stellen Sie sich die erste Woche vor, nachdem ein Unternehmen Copilot für sein Power BI-Semantikmodell aktiviert hat. Ein Vertriebsleiter tippt "Wie hoch war der Umsatz im Oktober?" und erhält 21.100 Dollar. Die Finanzleiterin stellt dieselbe Frage mit ihren eigenen Worten und erhält 14.720 Dollar. Beide Screenshots landen am Freitagabend im selben Teams-Kanal. Im üblichen Sinne hat niemand etwas falsch gemacht. Das Modell hat zwei vertretbare Fragen beantwortet. Es hat nur nicht gesagt, welche davon es beantwortet hat.

Dieses Szenario ist fiktiv (der Kunde Northstar Systems ist mein erfundenes Testunternehmen), aber die Zahlen darin sind echte Ausgaben einer SQLite-Fixtur, die man in zwei Minuten ausführen kann, und die Situation steht nun sehr vielen Unternehmen gleichzeitig zur Verfügung. Auf der Microsoft Ignite 2026 (17. bis 20. November) wurden Semantikmodelle in Power BI in Copilot als allgemein verfügbar eingestuft, und Fabric IQ-Konnektoren für ChatGPT und Claude gingen in die Vorschau (Zusammenfassung von Collectiv zur Ignite, Microsofts Book of News). Ihr Semantikmodell verwandelt sich in eine Chat-Oberfläche, egal ob jemand Abnahmekriterien dafür geschrieben hat oder nicht.

Hier ist die Methode, die ich anwenden würde, bevor jemand außerhalb des Build-Teams eine Frage stellen darf: ein Satz von Golden Questions. Fragen, die vom Business geschrieben werden, erwartete Antworten, die unabhängig in SQL berechnet werden, einige Fragen, die absichtlich mehrdeutig sind, und ein Bewertungsschema, das "richtige Zahl, falsche Begründung" als Fehlschlag wertet. Danach folgen die Korrekturen, die größtenteils in den Power BI-Einstellungen unter Prep data for AI liegen.

Es ist verlockend, einen Copilot-Pilotprojekt so zu bewerten, wie Demos bewertet werden. Jemand stellt fünf Fragen, die Zahlen sehen plausibel aus, ein paar stimmen mit dem Dashboard überein, und das Pilotprojekt bekommt ein Daumen hoch. Dieser Test kann den entscheidenden Fehler nicht finden, denn der entscheidende Fehler sieht plausibel aus.

Text-to-SQL- und Text-to-DAX-Werkzeuge scheitern selten mit einer Fehlermeldung. Sie scheitern, indem sie eine völlig gültige Abfrage für eine andere Lesart Ihrer Frage ausführen. AI Explore hat das in einem Dev.to-Beitrag, zu dem ich immer wieder zurückkehre, gut auf den Punkt gebracht: Ein Dashboard ist eine geprüfte Frage, eine Chat-Antwort eine ungeprüfte (AI Explore, "Text-to-SQL Agents Answer Questions Nobody Reviewed. Add Receipts"). Um diese Idee habe ich letzten Monat einen ganzen Artikel-Spezifikation herum gebaut, betitelt Text-to-SQL-Antwortbelege. Dieser Beitrag ist die Testhälfte: Wie Sie vor dem Rollout herausfinden, welche Fragen Ihr Modell sicher beantwortet und welche es selbstbewusst und falsch beantwortet.

Microsofts eigene Dokumentation ist dazu ehrlich. Die Anleitung zum Fabric-Datenagenten sagt klipp und klar, dass "LLMs ohne passenden Kontext falsche Ergebnisse liefern können", und empfiehlt, das generierte DAX für jede Testantwort zu prüfen (Microsoft Learn, Semantic model best practices for data agent). Dieselbe Seite erklärt, dass das DAX-Generierungswerkzeug seine Abfrage aus dem Schema des Modells, aus Metadaten wie Synonymen und den Minimal- und Maximalwerten numerischer Spalten, aus Metadaten von Berichtsvisualisierungen, aus der Prep-for-AI-Konfiguration und aus dem Konversationsverlauf aufbaut. Jede dieser Stellen kann ein Business Analyst prüfen, und jede davon kann falsch sein.

Es gibt außerdem ein Timing-Problem. Office Watch hat das Ignite Book of News durchgegangen und 215 einzelne Features über 59 Ankündigungen gezählt, von denen 76, also 35 Prozent der Gesamtzahl, am ersten Tag allgemein verfügbar waren (Office Watch, 18. November 2026).

Der Teil zu Semantikmodellen in Copilot steht in der GA-Spalte. Vieles des umgebenden Werkzeugkastens ist es nicht: Microsofts Evaluations-SDK für Datenagenten trägt das Label Vorschau (Microsoft Learn, Evaluate your data agent), ebenso das erweiterte DAX-Generierungswerkzeug, das mehrstufiges Reasoning betreibt, um "Mehrdeutigkeiten aufzulösen". Die Nutzer bekommen am Montag das GA-Produkt.

Ihr Testgerüst besteht womöglich aus Vorschau-Teilen. Das ist in Ordnung, solange der Test selbst nicht von einem einzelnen Werkzeug abhängt. Eine CSV mit Fragen und eine SQL-Datei mit erwarteten Antworten wird jedes Vorschau-Label überdauern.

An dieser Stelle erwarte ich Widerspruch. In meinem Schema gilt eine Antwort, die die richtige Zahl liefert, aber nicht sagt, welche Definition sie verwendet hat, als Fehlschlag, nicht als teilweiser Erfolg.

Das Argument dagegen liegt auf der Hand: Die Nutzer wollen die Zahl und keinen Absatz voller Einschränkungen, und wenn die Zahl mit der Finanzabteilung übereinstimmt, wen interessiert, wie sie zustande kam? Mich interessiert es, weil die nächste Frage dieselbe unausgesprochene Wahl verwenden wird, und dann wird sie nicht mehr übereinstimmen. Wenn Copilot "Umsatz im Oktober" mit 14.720 Dollar beantwortet und nichts dazu sagt, können Sie nicht erkennen, ob es sich bewusst für Netto-Umsatz nach Versanddatum entschieden hat oder zufällig dort gelandet ist. Ein Glückstreffer und ein richtiger Treffer sehen identisch aus, bis sich die Frage leicht ändert. Beim Testen will man beide unterscheiden können. Deshalb macht das Schema die Interpretation zum Teil der erwarteten Antwort.

Microsofts Evaluations-SDK arbeitet zum Vergleich mit einem DataFrame mit zwei Spalten, question und expected_answer, und die Beispiele verwenden nackte Werte wie "46,117.30" (Microsoft Learn, Evaluate your data agent). Das ist ein vernünftiger Anfang, und das SDK sortiert Antworten in korrekt, inkorrekt und unklar ein. Aber eine nackte Zahl kann "aus dem richtigen Grund richtig" nicht von "zufällig richtig" unterscheiden. Fügen Sie eine Spalte für die erwartete Lesart hinzu und bewerten Sie sie.

Man braucht kein Fabric, um den Test zu entwerfen. Man braucht ein kleines Modell des Unternehmens mit bekannten Antworten. Hier ist die Northstar-Fixtur: sieben Kunden in vier Regionen, vier Produkte, 22 Bestellzeilen, drei Status. Eine Zeile entspricht einer Bestellzeile. Jede Zahl in diesem Beitrag stammt aus dem Ausführen mit Pythons integriertem sqlite3-Modul (SQLite 3.53.1).

-- Northstar Systems (fiktives) Sales-Star-Schema, klein genug zum manuellen Prüfen CREATE TABLE dim_customer ( customer_id INTEGER PRIMARY KEY, customer_name TEXT, region TEXT ); CREATE TABLE dim_product ( product_id INTEGER PRIMARY KEY, product_name TEXT, category TEXT ); CREATE TABLE fact_sales ( line_id INTEGER PRIMARY KEY, order_id INTEGER, customer_id INTEGER, product_id INTEGER, order_date TEXT, ship_date TEXT, qty INTEGER, list_price REAL, discount_pct REAL, status TEXT -- Completed, Cancelled, Returned ); INSERT INTO dim_customer VALUES ( 1, 'Alder Clinic', 'East' ), ( 2, 'Birch Logistics', 'East' ), ( 3, 'Cedar Foods', 'West' ), ( 4, 'Dogwood Labs', 'West' ), ( 5, 'Elm Retail', 'Central' ), ( 6, 'Fir Hotels', 'Central' ), ( 7, 'Maple North Ltd', 'Canada' ); INSERT INTO dim_product VALUES ( 10, 'Scanner Pro', 'Hardware' ), ( 11, 'Scanner Lite', 'Hardware' ), ( 20, 'Support Plan', 'Services' ), ( 21, 'Onboarding Day', 'Services' ); INSERT INTO fact_sales VALUES ( 1, 1001, 1, 10, '2026-09-08', '2026-09-10', 2, 1200, 0.00, 'Completed' ), ( 2, 1002, 3, 20, '2026-09-15', '2026-09-15', 1, 900, 0.00, 'Completed' ), ( 3, 1003, 5, 11, '2026-09-22', '2026-09-24', 4, 400, 0.10, 'Completed' ), ( 4, 1004, 7, 10, '2026-09-28', '2026-09-30', 1, 1200, 0.00, 'Completed' ), ( 5, 1005, 2, 10, '2026-09-30', '2026-10-02', 3, 1200, 0.05, 'Completed' ), ( 6, 1005, 2, 21, '2026-09-30', '2026-10-02', 1, 800, 0.00, 'Completed' ), ( 7, 1006, 1, 20, '2026-10-05', '2026-10-05', 1, 900, 0.00, 'Completed' ), ( 8, 1007, 3, 10, '2026-10-07', '2026-10-09', 2, 1200, 0.15, 'Completed' ), ( 9, 1007, 3, 21, '2026-10-07', '2026-10-09', 2, 800, 0.15, 'Completed' ), ( 10, 1008, 4, 11, '2026-10-12', '2026-10-14', 5, 400, 0.00, 'Returned' ), ( 11, 1009, 5, 10, '2026-10-14', NULL, 4, 1200, 0.10, 'Cancelled' ), ( 12, 1010, 6, 20, '2026-10-19', '2026-10-19', 2, 900, 0.00, 'Completed' ), ( 13, 1011, 2, 11, '2026-10-21', '2026-10-23', 8, 400, 0.00, 'Completed' ), ( 14, 1012, 4, 10, '2026-10-26', '2026-10-28', 1, 1200, 0.00, 'Completed' ), ( 15, 1013, 6, 21, '2026-10-30', '2026-11-02', 1, 800, 0.00, 'Completed' ), ( 16, 1014, 1, 11, '2026-10-31', '2026-11-03', 6, 400, 0.20, 'Completed' ), ( 17, 1015, 3, 20, '2026-11-04', '2026-11-04', 1, 900, 0.00, 'Completed' ), ( 18, 1016, 5, 10, '2026-11-09', '2026-11-11', 2, 1200, 0.00, 'Completed' ), ( 19, 1017, 7, 21, '2026-11-16', '2026-11-17', 1, 800, 0.00, 'Completed' ), ( 20, 1018, 2, 10, '2026-11-23', '2026-11-25', 1, 1200, 0.05, 'Completed' ), ( 21, 901, 4, 20, '2026-03-10', '2026-03-10', 2, 900, 0.00, 'Completed' ), ( 22, 902, 6, 10, '2026-06-18', '2026-06-22', 3, 1200, 0.10, 'Completed' ); CREATE VIEW v_lines AS SELECT f. *, c. region, c. customer_name, p. product_name, p. category, qty * list_price AS gross_amount, ROUND ( qty * list_price * ( 1 - discount_pct ), 2 ) AS net_amount FROM fact_sales f JOIN dim_customer c USING ( customer_id ) JOIN dim_product p USING ( product_id ); Vollbildmodus öffnen Vollbildmodus verlassen Die Fixtur enthält absichtlich Fallen, so wie Ihr echtes Modell sie zufällig enthält. Eine am 30. September aufgegebene Bestellung wird am 2.

Oktober verschickt. Eine Oktober-Bestellung ist storniert und eine zurückgegeben.

Die Rabatte variieren je Zeile. Kanada ist eine echte Region ohne Oktober-Umsätze. Und Northstars Geschäftsjahr beginnt am 1. Juli, sodass "lfd. Jahr" je nach Fragendem zwei verschiedene Dinge bedeutet.

Vor jeder Golden Question führe ich den Grain-Check aus, denn nichts anderes hat eine Bedeutung, wenn das Grain nicht stimmt (eine Lehre aus ontomatos Kommentaren zu meinem Beitrag zu 7 SQL-Checks):

SELECT COUNT (*) AS rows_, COUNT(DISTINCT line_id) AS lines, COUNT(DISTINCT order_id) AS orders FROM v_lines; Enter fullscreen mode Exit fullscreen mode rows_ | lines | orders 22 | 22 | 20 Enter fullscreen mode Exit fullscreen mode Zweiundzwanzig Zeilen, zweiundzwanzig Positionen, zwanzig Bestellungen. Die View hat nicht gefächert.

Der goldene Datensatz funktioniert nur, wenn jemand die "richtige" Lesart vertritt. Bei Northstar hat die Finanzabteilung eine Definition abgenommen, und die steht ganz oben in der Testdatei in einfachen Worten:

Umsatz bedeutet Nettoumsatz: Listenpreis mal Menge, abzüglich Positionsrabatt, nur für Positionen mit Status Completed, erfasst nach Versanddatum. Das Geschäftsjahr beginnt am 1. Juli. "Letzter Monat" bedeutet der vorherige Kalendermonat.

Dies ist der wertvollste Satz der gesamten Übung, und normalerweise existiert er nirgendwo schriftlich. Wenn Sie die Finanzabteilung nicht zu einer Abnahme bewegen können, hören Sie hier auf. Sie haben Ihren ersten Defekt gefunden, und der steckt nicht in Copilot.

Jede der folgenden Fragen ist so formuliert, wie ein Mensch sie eingeben würde, gefolgt von den konkurrierenden Lesarten und der Zahl, die SQL für jede davon zurückgibt. Die erwartete Antwort ist immer die Lesart der Finanzabteilung, plus das, was das Modell sagen oder nachfragen sollte.

-- A: brutto, jeder Status, nach Bestelldatum SELECT SUM ( gross_amount ) FROM v_lines WHERE order_date BETWEEN '2026-10-01' AND '2026-10-31'; -- B: Finanzdefinition (netto, Completed, nach Versanddatum) SELECT SUM ( net_amount ) FROM v_lines WHERE status = 'Completed' AND ship_date BETWEEN '2026-10-01' AND '2026-10-31'; -- C: netto, Completed, nach Bestelldatum SELECT SUM ( net_amount ) FROM v_lines WHERE status = 'Completed' AND order_date BETWEEN '2026-10-01' AND '2026-10-31'; Enter fullscreen mode Exit fullscreen mode A: 21100.0 B: 14720.0 C: 13220.0 Enter fullscreen mode Exit fullscreen mode Lesart A liegt um 43 Prozent über der Zahl der Finanzabteilung. Sie enthält die stornierte Bestellung über 4.800 Dollar, die zurückgegebene Position über 2.000 Dollar und Listenpreise vor Rabatt. Lesart C liegt um 10 Prozent darunter, weil sie die Bestellung vom 30.

September aus dem Oktober herausnimmt und zwei Oktoberbestellungen hineinzieht, die erst im November versandt wurden.

Ein Nutzer, der 21.100 Dollar sieht und an den Vorstand weiterleitet, ist nicht nachlässig. Das Tool hat gerade eine Frage beantwortet, die niemand verantwortet.

Erwartet: 14.720 Dollar, und die Antwort nennt Nettoumsatz und Versanddatum.

aov_per_order | avg_per_line | orders | lines 2453.33 | 1840.0 | 6 | 8 Enter fullscreen mode Exit fullscreen mode Pro Bestellung sind es 2.453,33 Dollar. Über Positionen gemittelt sind es 1.840 Dollar. Die Formulierung sagt "Bestellung", also ist die Zahl pro Bestellung richtig, aber ein impliziter Durchschnitt auf einer Tabelle auf Positionsebene erzeugt die andere Zahl. Microsofts Leitfaden führt implizite Measures als häufige Fehlerquelle auf und empfiehlt explizite Measures mit der richtigen Standardaggregation ( Microsoft Learn ). Diese Frage prüft, ob Sie diesem Rat gefolgt sind.

calendar_ytd | fiscal_ytd 33660.0 | 28620.0 Enter fullscreen mode Exit fullscreen mode 5.040 Dollar Unterschied stammen von den beiden Positionen, die im März und Juni versandt wurden und im Kalenderjahr 2026 liegen, aber im vorherigen Northstar-Geschäftsjahr. Erwartet: 28.620 Dollar mit "Geschäftsjahr bis dato, ab 1. Juli" in der Antwort. Eine Antwort von 33.660 Dollar, die "Kalenderjahr bis dato" sagt, ist eine falsche Zahl mit einer genannten Interpretation. Sie fällt trotzdem durch, aber sie fällt ehrlich durch, und die Korrektur ist eine einzige Anweisung.

region | revenue | lines Canada | 0 | 0 Enter fullscreen mode Exit fullscreen mode Eine echte Null. Die Region existiert, und ihr einziger Kunde hat im September und November gekauft. Erwartet: 0 Dollar, idealerweise mit "keine abgeschlossenen Positionen wurden im Oktober nach Kanada versandt".

customers_in_gulf 0 Enter fullscreen mode Exit fullscreen mode Es gibt keine Golfregion. Die ehrliche Antwort ist nicht 0 Dollar, sondern "Ich kann keine Golfregion finden; die Regionen sind Canada, Central, East und West." Varun Poojari hat einen scharfsinnigen Beitrag über ein Dashboard geschrieben, das 0,00 Dollar anzeigte, obwohl die echte Antwort "wir wissen es nicht" war, und wie COALESCE(SUM(x), 0) Unbekanntes in Gratis verwandelt ( Varun Poojari auf Dev.to ). G4 und G5 sind das Paar, das genau diesen Unterschied prüft. Wenn beide mit 0 Dollar zurückkommen, kann das Modell eine leere Menge nicht von einem fehlenden Ding unterscheiden, und Sie müssen das wissen, bevor ein Manager nach einer Region fragt, die letztes Jahr umbenannt wurde.

product_name | revenue | units Scanner Pro | 6660.0 | 6 Scanner Lite | 3200.0 | 8 Support Plan | 2700.0 | 3 Onboarding Day | 2160.0 | 3 Enter fullscreen mode Exit fullscreen mode Nach Umsatz ist es Scanner Pro. Nach Einheiten ist es Scanner Lite. Beides ist vertretbar. Bei dieser Art von Frage würde ich beide Antworten akzeptieren, solange das Measure genannt wird, und ich würde sie abwerten, wenn sie stillschweigend Einheiten wählt, denn das Vertriebsteam von Northstar meint in neun von zehn Fällen Umsatz. Schreiben Sie diese Präferenz auf; sie wird später zu einer KI-Anweisung.

returned | shipped | return_rate_pct 1 | 9 | 11.1 Enter fullscreen mode Exit fullscreen mode Eine zurückgegebene Position von neun versandten Positionen, die im Oktober bestellt wurden, entspricht 11,1 Prozent. Rückgaben sind der Bereich, in dem Definitionen in echten Unternehmen wirklich auseinanderlaufen: Positionen oder Einheiten oder Werte, nach Bestelldatum oder Rückgabedatum, mit oder ohne Umtausch. Mein Testdatensatz enthält nur eine definitionswürdige Variante, deshalb sage ich offen, dass diese Frage hauptsächlich ein Platzhalter für die Version ist, die Ihr Rückgabenteam interessiert. Nehmen Sie sie trotzdem auf. Rückgabequoten sind genau die Kennzahl, nach der Menschen in einem Chatfeld fragen, weil kein Dashboard sie so zeigt, wie sie es möchten.

region | sep | oct | change | change_pct Canada | 1200.0 | 0 | - 1200.0 | - 100.0 Central | 1440.0 | 1800.0 | 360.0 | 25.0 East | 2400.0 | 8320.0 | 5920.0 | 246.7 West | 900.0 | 4600.0 | 3700.0 | 411.1 Enter fullscreen mode Exit fullscreen mode East ist in Dollar am stärksten gewachsen. West ist prozentual am stärksten gewachsen. "Am stärksten gewachsen" sagt nicht, welches von beidem gemeint ist. Bei dieser Frage möchte ich, dass das Modell entweder nachfragt oder beides liefert, und die Bewertung ver-gibt für beides die volle Punktzahl. Wenn es "West" antwortet, ohne Prozent zu erwähnen, ist das die gefährliche Art von richtig: Ein Regionalleiter in East liest es als Rangliste.

buying_customers_oct | customers_on_file 5 | 7 Enter fullscreen mode Exit fullscreen mode Zwei Fragen, die ähnlich klingen. Ein Modell, das beide mit 7 oder beide mit 5 beantwortet, hat ein Synonymproblem. In einem echten Modell ist das der Punkt, an dem "Kunde" auf die falsche Tabelle abgebildet wird.

previous_month | trailing_30_days 14720.0 | 7960.0 Enter fullscreen mode Exit fullscreen mode Oktober nach Versanddatum sind 14.720 Dollar. Die letzten 30 Tage (31. Oktober bis 29. November) liegen bei 7.960 Dollar. Northstars schriftliche Definition sagt vorheriger Kalendermonat, also ist die erwartete Antwort 14.720 Dollar. Diese Frage prüft außerdem, ob das Modell weiß, was "heute" ist, was interessant wird, wenn die Datumstabelle des semantischen Modells im September endet, weil jemand aufgehört hat, sie zu erweitern.

Führen Sie jede Frage dreimal aus, in frischen Chats, weil dasselbe Modell bei identischer Eingabe unterschiedliche Antworten geben kann. Yoseph Eikelman hat gezeigt, wie ein LLM dieselbe Seite viermal las und 18, 18, 18 und dann 1 erhielt ( Yoseph Eikelman auf Dev.to ). Drei Durchläufe messen dieses Rauschen nicht, aber sie zeigen Ihnen, ob es für eine bestimmte Frage existiert. Danach bewerten Sie jede Antwort:

Zwei Regeln zusätzlich zur Tabelle. Erstens: Jedes Scheitern mit hoher Schwere bei einer Geldfrage blockiert die Einführung für dieses Publikum, ganz gleich, wie der Gesamtprozentsatz aussieht. Ein Ergebnis von 90 Prozent mit einer selbstbewusst falschen Umsatzzahl ist für ein Finanzteam kein 90-Prozent-Produkt. Zweitens: Schreiben Sie die Bestehensgrenze vor dem ersten Durchlauf auf und datieren Sie sie, damit sie nach dem Ansehen der Ergebnisse niemand mehr verschieben kann. Diese zweite Regel stammt von einem Kommentator zu Michaels Benchmark-Beitrag auf Dev.to, der vorschlug, die Entscheidungsregel festzulegen, bevor irgendetwas ausgeführt wird, und sie ist die billigste Integritätsprüfung, die ich kenne.

Ich würde außerdem für jede Antwort die DAX-Abfrage protokollieren, die Copilot erzeugt hat. Microsofts Leitfaden sagt, sie für jede Testantwort zu prüfen, und sie ist die einzige Möglichkeit, ein "Lucky" von einem "Pass" zu unterscheiden.

Wenn eine goldene Frage scheitert, lautet die Korrektur fast nie "sagen Sie den Nutzern, sie sollen es besser formulieren". Power BIs Prep data for AI hat drei Bestandteile, und Microsofts Leitfaden für Datenagenten beschreibt, was jeder davon mit der DAX-Erzeugung macht ( Microsoft Learn, Semantic model best practices for data agent ):

AI data schema. Sie wählen aus, welche Tabellen, Spalten und Measures die KI verwenden soll. Microsofts eigenes Beispiel liegt nahe an G1: ein Modell mit Total Revenue, Gross Sales, Net Sales und Sales After Returns, bei dem die KI Gross Sales zurückgibt, das Team aber Net Sales meldet. Schließen Sie die Measures, die nicht in Antworten erscheinen sollen, aus, und nehmen Sie ihre abhängigen Objekte auf, damit die Measures weiterhin funktionieren. Für Northstar bedeutet das: genau ein Umsatzmeasure im Schema, nicht vier.

Verified answers. Ein Visual, das Sie freigegeben haben und das durch bestimmte Fragen ausgelöst wird. Der Leitfaden schlägt fünf bis sieben Auslöserfragen pro verifizierter Antwort vor, sowohl formale als auch umgangssprachliche Formulierungen, und bis zu drei Filter.

Zwei Details sind für das Testen wichtig. Verifizierte Antworten werden auf Ebene des semantischen Modells gespeichert und gelten damit für jeden Datenagenten, der auf dem Modell aufbaut. Und wenn ein Datenagent eine verwendet, gibt er das Visual nicht zurück; er nutzt dessen Spalten, Measures und Filter, um die DAX-Abfrage zu steuern, die er erzeugt.

Das bedeutet, dass eine verifizierte Antwort für "Umsatz im Oktober" dennoch eine falsche Antwort für "Umsatz der Region Ost im Oktober" liefern kann, wenn die Steuerung nicht übertragen wird. Ihr Golden Set sollte daher zu jeder verifizierten Antwort eine naheliegende Variante enthalten, also eine Formulierung, die nicht in der Trigger-Liste steht, um zu prüfen, ob die Korrektur verallgemeinert wird.

KI-Anweisungen. Freitext auf dem semantischen Modell: Terminologie, Standardwerte, welches Datum verwendet werden soll. Microsoft stellt unmissverständlich klar, dass "es keine Garantie gibt, dass sie exakt befolgt werden." Deshalb bleiben G3 und G10 im Golden Set, auch nachdem Sie "Geschäftsjahr beginnt am 1. Juli" und "letzter Monat bedeutet der vorherige Kalendermonat" ergänzt haben. Die Anweisung ist eine Hypothese. Der erneute Durchlauf ist der Test.

Es gibt ein Detail auf dieser Seite, das meines Erachtens jeder Business Analyst wissen muss, der einen Fabric-Data-Agent-Piloten betreibt: Das DAX-Generierungstool ignoriert Anweisungen, die auf der Ebene des Data Agents geschrieben wurden, wenn es ein semantisches Modell abfragt. Es liest ausschließlich die Prep-for-AI-Konfiguration auf dem Modell. Wenn Ihr Team also "Umsatz bedeutet Nettoumsatz" in das Anweisungsfeld des Agents geschrieben hat, hat das semantische Modell das nie gesehen. Modellspezifische Definitionen gehören in Prep for AI, und Anweisungen auf Agent-Ebene bleiben für Formatierung und Routing reserviert.

Zwei weitere Punkte aus der Microsoft-Dokumentation, die meine Testplanung verändern würden:

So sieht die Struktur aus, die ich verwende. Sie liegt als einfaches CSV vor, sodass das Business sie in Excel bearbeiten kann, und die Spalte mit der erwarteten Lesart ist der Teil, den die meisten Teams überspringen.

id,question,expected_answer,expected_reading,ambiguous,must_ask_or_label,severity_if_wrong,sql_ref G1,What was revenue in October?,14720,"net, Completed, ship date",yes,no,high,G1b G2,What was our average order value in October?,2453.33,"per order, finance revenue",no,no,high,G2 G3,What's revenue year to date?,28620,"fiscal YTD from 1 July",yes,no,high,G3 G4,Revenue in Canada in October?,0,"real zero, region exists",no,no,medium,G4 G5,Revenue in the Gulf region in October?,no such region,"say region not found",no,yes,high,G5 G6,What was our top product in October?,Scanner Pro,"by revenue; units gives Scanner Lite",yes,yes,medium,G6 G7,What was the return rate in October?,11.1%,"returned lines / shipped lines, order date",yes,no,medium,G7 G8,Which region grew the most from September to October?,East ($) or West (%),"must label $ vs %",yes,yes,medium,G8 G9,How many customers bought in October?,5,"distinct buying customers, ship date",no,no,medium,G9 G10,What was revenue last month?,14720,"previous calendar month",yes,no,high,G10 Vollbildmodus öffnen Vollbildmodus beenden Wenn Sie das vollständige Kit möchten: Ich habe eine wiederverwendbare Version im dieswöchigen BA-Toolkit-Eintrag hinterlegt, zu den Copilot Golden Questions für semantische Modelle, mit dem Beispielschema, dem SQL für jede erwartete Antwort, dem Auswertungsbogen und dem Prep-for-AI-Änderungsprotokoll. Es gibt auch eine PDF-Version, falls Sie sie lieber für den Workshop ausdrucken möchten, in dem das Finanzteam die Definitionen abzeichnet.

Zehn Fragen sind eine Demo. Für einen echten Rollout möchte ich 30 bis 60 Fragen, und dabei zählt die Zusammensetzung mehr als die Anzahl. Ein grober Aufteilungsansatz, mit dem ich beginnen würde:

Das Business schreibt die Fragen. Der Business Analyst schreibt die erwarteten Lesarten gemeinsam mit dem fachlichen Verantwortlichen im selben Raum. Jemand, der das Modell nicht gebaut hat, schreibt das SQL für die erwarteten Antworten, denn wer die Kennzahl gebaut hat, wird deren Fehler im SQL wiederholen. Diese letzte Regel ist derselbe Grund, aus dem panditshivam in seinem Beitrag über die Definition von Umsatz für einen SQL-Agenten einen Testdatensatz angelegt hat, in dem zwei Bestellungen denselben Betrag teilen: Man möchte Testdaten, die eine falsche Definition sichtbar machen (panditshivam auf Dev.to).

Ich habe dieses Golden Set für diesen Beitrag nicht gegen Copilot in einem Live-Tenant getestet. Der Testdatensatz zeigt, was die erwarteten Antworten sind und wie weit auseinander die vertretbaren Lesarten liegen; er zeigt nicht, wie oft Copilot welche davon wählt. Das hängt von Ihrem Modell, Ihren Prep-for-AI-Einstellungen, der Laufzeitumgebung und davon ab, in welcher Copilot-Oberfläche der Anwender sich befindet, und es wird sich ändern, wenn Microsoft Updates ausliefert. Betrachten Sie jede Zahl oben als eine Eigenschaft der Testdaten, nicht als eine Aussage über Copilot.

Zudem deckt er Row-Level Security nicht ab. Microsofts Seite zum Copilot-Konsum besagt, dass Anwender nur Ergebnisse auf Basis ihres eigenen Zugriffs sehen, wobei Row-Level- und Column-Level Security respektiert werden. Das bedeutet, dass zwei Personen zu G1 zwei unterschiedliche korrekte Antworten erhalten können. Wenn Ihr Modell RLS verwendet, führen Sie das Golden Set mit mindestens zwei Testnutzern mit unterschiedlichen Rollen aus und notieren Sie erwartete Antworten je Rolle.

Und es ersetzt nicht die Prüfung des DAX-Codes. Der Bewertungsbogen sagt Ihnen, dass etwas fehlgeschlagen ist. Die generierte Abfrage sagt Ihnen, warum. Für das "Warum" lässt sich meine Checkliste zur Prüfung von KI-generiertem SQL besser auf DAX übertragen, als man denken würde: zuerst die Granularität, dann die Filter, dann die Joins, dann die leere Menge.

Wenn Sie die Arbeit an den Kennzahldefinitionen bereits erledigt haben, geht das schnell. Mein Beitrag zu Metrik-Sichten und Beziehungen behandelt dasselbe Problem von der Databricks-Seite, und die Power-BI-Dashboard-Checkliste in meinem Blogger enthält die Prüfungen vor der Freigabe, die ich vorab am Modell durchführen würde.

Ein Star Schema, die Struktur, die Microsofts Leitfaden für semantische Modelle empfiehlt, die von KI abgefragt werden. Bild: "Star-schema.png" von SqlPac, CC BY-SA 3.0, über Wikimedia Commons.

Jeder Schritt zwischen den Rohdaten und der Person, die die Antwort liest, ist eine Stelle, an der sich eine Definition ändern kann. Copilot fügt einen weiteren Schritt hinzu. Bild: "Data visualization process v1.png" von Farcaster in der englischen Wikipedia, CC BY-SA 3.0, über Wikimedia Commons.

Wenn Sie das Northstar-Testsetup ausführen und andere Zahlen erhalten, oder wenn Sie finden, dass mein Bewertungsbogen bei "Lucky" zu streng ist, sagen Sie es mir in den Kommentaren. Ich korrigiere lieber den Test, als ihn zu verteidigen.

Ich bin Prachit Parikh, Business Analyst. Ich übersetze, was Stakeholder anfragen, in Anforderungen, die ein Team testen kann, prüfe die Daten mit SQL und begleite Änderungen durch das UAT. Kostenlose Vorlagen, darunter das Golden-Question-Paket aus diesem Beitrag, halte ich in meinem BA Toolkit auf GitHub bereit, und ich erstelle kurze animierte Erklärvideos auf YouTube. Neben Dev.to schreibe ich auf Substack, Medium, Hashnode, Blogger und WordPress und beantworte Fragen auf Quora. Sie finden mich außerdem auf LinkedIn, Bluesky, Kaggle, Credly, Crunchbase und Gravatar. Alles ist auf meiner Website, meiner Portfolio-Seite und meinem Profil-Hub gesammelt.

Automatisch übersetzt. Das Original auf Englisch ist unten aufklappbar.

Original (Englisch) anzeigen

Picture the first week after a company switches on Copilot for its Power BI semantic model. A sales director types "What was revenue in October?" and gets $21,100. The finance controller asks the same thing in her own words and gets $14,720. Both screenshots land in the same Teams channel on Friday afternoon. Nobody did anything wrong in the usual sense. The model answered two defensible questions. It just didn't say which one it answered.

That scenario is fictional (the client is Northstar Systems, my made-up test company), but the numbers in it are real output from a SQLite fixture you can run in two minutes, and the situation is now available to a lot of companies at once. At Microsoft Ignite 2026 (17 to 20 November), Power BI semantic models in Copilot were listed as generally available, and Fabric IQ connectors for ChatGPT and Claude went into preview ( Collectiv's Ignite roundup, Microsoft's Book of News ). Your semantic model is turning into a chat interface whether or not anyone wrote acceptance criteria for it.

So here's the method I'd use before anyone outside the build team gets to type a question: a golden question set. Questions written by the business, expected answers computed independently in SQL, a few questions that are ambiguous on purpose, and a scoring rubric that fails "right number, wrong reason." Then the fixes, which mostly live in Power BI's Prep data for AI settings.

It's tempting to judge a Copilot pilot the way demos get judged. Someone asks five questions, the numbers look plausible, a couple match the dashboard, and the pilot gets a thumbs up. That test can't catch the failure that matters, because the failure that matters looks plausible.

Text-to-SQL and text-to-DAX tools rarely fail by throwing an error. They fail by running a perfectly valid query for a different reading of your question. AI Explore put this well in a Dev.to post I keep coming back to: a dashboard is a reviewed question, and a chat answer is an unreviewed one ( AI Explore, "Text-to-SQL Agents Answer Questions Nobody Reviewed. Add Receipts" ). I built a whole spec around that idea last month in Text-to-SQL answer receipts. This post is the testing half: how you find out, before rollout, which questions your model answers safely and which ones it answers confidently and wrong.

Microsoft's own documentation is honest about this. The Fabric data agent guidance says plainly that "LLMs can produce incorrect results without proper context" and tells you to review the generated DAX for every test response ( Microsoft Learn, Semantic model best practices for data agent ). The same page explains that the DAX generation tool builds its query from the model's schema, metadata such as synonyms and the min and max values of numeric columns, report visual metadata, the Prep for AI configuration and the conversation history. Every one of those is something a BA can inspect and something that can be wrong.

There's also a timing problem. Office Watch went through the Ignite Book of News and counted 215 separate features across 59 announcements, of which 76 were generally available on day one, 35% of the total ( Office Watch, 18 Nov 2026 ). The semantic-model-in-Copilot piece is in the GA column. A lot of the surrounding tooling isn't: Microsoft's evaluation SDK for data agents is labelled preview ( Microsoft Learn, Evaluate your data agent ), and so is the advanced DAX generation tool that does multi-step reasoning to "resolve ambiguity." Users get the GA thing on Monday. Your test harness may be built from preview parts. That's fine, as long as the test itself doesn't depend on any one tool. A CSV of questions and a SQL file of expected answers will outlive every preview label.

Here's where I expect pushback. In my rubric, an answer that gets the number right but doesn't say which definition it used scores as a fail, not a partial pass.

The argument against is obvious: users want the number, not a paragraph of caveats, and if the number matches finance, who cares how it got there? I care because the next question will use the same unstated choice, and next time it won't match. If Copilot answers "revenue in October" with $14,720 and says nothing, you can't tell whether it picked net revenue by ship date on purpose or happened to land there. A lucky hit and a correct hit look identical until the question changes slightly. In testing, you want to tell them apart. So the rubric makes the interpretation part of the expected answer.

Microsoft's evaluation SDK, for comparison, takes a DataFrame with two columns, question and expected_answer, and its examples use bare values such as "46,117.30" ( Microsoft Learn, Evaluate your data agent ). That's a reasonable start and the SDK sorts responses into correct, incorrect and unclear. But a bare number can't separate "right for the right reason" from "right by accident." Add a column for the reading you expect, and grade it.

You don't need Fabric to design the test. You need a small model of the business with known answers. Here's the Northstar fixture: seven customers in four regions, four products, 22 order lines, three statuses. One row equals one order line. Every number in this post comes from running it with Python's built-in sqlite3 module (SQLite 3.53.1).

-- Northstar Systems (fictional) sales star schema, small enough to check by hand CREATE TABLE dim_customer ( customer_id INTEGER PRIMARY KEY, customer_name TEXT, region TEXT ); CREATE TABLE dim_product ( product_id INTEGER PRIMARY KEY, product_name TEXT, category TEXT ); CREATE TABLE fact_sales ( line_id INTEGER PRIMARY KEY, order_id INTEGER, customer_id INTEGER, product_id INTEGER, order_date TEXT, ship_date TEXT, qty INTEGER, list_price REAL, discount_pct REAL, status TEXT -- Completed, Cancelled, Returned ); INSERT INTO dim_customer VALUES ( 1, 'Alder Clinic', 'East' ), ( 2, 'Birch Logistics', 'East' ), ( 3, 'Cedar Foods', 'West' ), ( 4, 'Dogwood Labs', 'West' ), ( 5, 'Elm Retail', 'Central' ), ( 6, 'Fir Hotels', 'Central' ), ( 7, 'Maple North Ltd', 'Canada' ); INSERT INTO dim_product VALUES ( 10, 'Scanner Pro', 'Hardware' ), ( 11, 'Scanner Lite', 'Hardware' ), ( 20, 'Support Plan', 'Services' ), ( 21, 'Onboarding Day', 'Services' ); INSERT INTO fact_sales VALUES ( 1, 1001, 1, 10, '2026-09-08', '2026-09-10', 2, 1200, 0.00, 'Completed' ), ( 2, 1002, 3, 20, '2026-09-15', '2026-09-15', 1, 900, 0.00, 'Completed' ), ( 3, 1003, 5, 11, '2026-09-22', '2026-09-24', 4, 400, 0.10, 'Completed' ), ( 4, 1004, 7, 10, '2026-09-28', '2026-09-30', 1, 1200, 0.00, 'Completed' ), ( 5, 1005, 2, 10, '2026-09-30', '2026-10-02', 3, 1200, 0.05, 'Completed' ), ( 6, 1005, 2, 21, '2026-09-30', '2026-10-02', 1, 800, 0.00, 'Completed' ), ( 7, 1006, 1, 20, '2026-10-05', '2026-10-05', 1, 900, 0.00, 'Completed' ), ( 8, 1007, 3, 10, '2026-10-07', '2026-10-09', 2, 1200, 0.15, 'Completed' ), ( 9, 1007, 3, 21, '2026-10-07', '2026-10-09', 2, 800, 0.15, 'Completed' ), ( 10, 1008, 4, 11, '2026-10-12', '2026-10-14', 5, 400, 0.00, 'Returned' ), ( 11, 1009, 5, 10, '2026-10-14', NULL, 4, 1200, 0.10, 'Cancelled' ), ( 12, 1010, 6, 20, '2026-10-19', '2026-10-19', 2, 900, 0.00, 'Completed' ), ( 13, 1011, 2, 11, '2026-10-21', '2026-10-23', 8, 400, 0.00, 'Completed' ), ( 14, 1012, 4, 10, '2026-10-26', '2026-10-28', 1, 1200, 0.00, 'Completed' ), ( 15, 1013, 6, 21, '2026-10-30', '2026-11-02', 1, 800, 0.00, 'Completed' ), ( 16, 1014, 1, 11, '2026-10-31', '2026-11-03', 6, 400, 0.20, 'Completed' ), ( 17, 1015, 3, 20, '2026-11-04', '2026-11-04', 1, 900, 0.00, 'Completed' ), ( 18, 1016, 5, 10, '2026-11-09', '2026-11-11', 2, 1200, 0.00, 'Completed' ), ( 19, 1017, 7, 21, '2026-11-16', '2026-11-17', 1, 800, 0.00, 'Completed' ), ( 20, 1018, 2, 10, '2026-11-23', '2026-11-25', 1, 1200, 0.05, 'Completed' ), ( 21, 901, 4, 20, '2026-03-10', '2026-03-10', 2, 900, 0.00, 'Completed' ), ( 22, 902, 6, 10, '2026-06-18', '2026-06-22', 3, 1200, 0.10, 'Completed' ); CREATE VIEW v_lines AS SELECT f. *, c. region, c. customer_name, p. product_name, p. category, qty * list_price AS gross_amount, ROUND ( qty * list_price * ( 1 - discount_pct ), 2 ) AS net_amount FROM fact_sales f JOIN dim_customer c USING ( customer_id ) JOIN dim_product p USING ( product_id ); Enter fullscreen mode Exit fullscreen mode The fixture has traps on purpose, the same way your real model has them by accident. An order placed on 30 September ships on 2 October. One October order is cancelled and one is returned.

Discounts vary by line. Canada is a real region with no October sales. And Northstar's fiscal year starts on 1 July, so "year to date" means two different things depending on who's asking.

Before any golden question, I run the grain check, because nothing else means anything if the grain is off (a lesson from ontomato's comments on my 7 SQL checks post ):

SELECT COUNT (*) AS rows_, COUNT(DISTINCT line_id) AS lines, COUNT(DISTINCT order_id) AS orders FROM v_lines; Enter fullscreen mode Exit fullscreen mode rows_ | lines | orders 22 | 22 | 20 Enter fullscreen mode Exit fullscreen mode Twenty-two rows, twenty-two lines, twenty orders. The view didn't fan out.

The golden set only works if someone owns the "right" reading. At Northstar, finance has signed off on one definition, and it goes at the top of the test file in plain words:

Revenue means net revenue: list price times quantity, less line discount, for Completed lines only, recognised by ship date. Fiscal year starts 1 July. "Last month" means the previous calendar month.

This is the most valuable sentence in the whole exercise, and it usually doesn't exist anywhere in writing. If you can't get finance to sign one, stop here. You've found your first defect, and it isn't in Copilot.

Each question below is phrased the way a person would type it, followed by the competing readings and the number SQL returns for each. The expected answer is always the finance reading, plus whatever the model should say or ask.

-- A: gross, every status, by order date SELECT SUM ( gross_amount ) FROM v_lines WHERE order_date BETWEEN '2026-10-01' AND '2026-10-31'; -- B: finance definition (net, Completed, by ship date) SELECT SUM ( net_amount ) FROM v_lines WHERE status = 'Completed' AND ship_date BETWEEN '2026-10-01' AND '2026-10-31'; -- C: net, Completed, by order date SELECT SUM ( net_amount ) FROM v_lines WHERE status = 'Completed' AND order_date BETWEEN '2026-10-01' AND '2026-10-31'; Enter fullscreen mode Exit fullscreen mode A: 21100.0 B: 14720.0 C: 13220.0 Enter fullscreen mode Exit fullscreen mode Reading A is 43% higher than the finance number. It includes the cancelled $4,800 order, the returned $2,000 line, and list prices before discount. Reading C is 10% lower, because it moves the 30 September order out of October and pulls in two October orders that didn't ship until November.

A user who sees $21,100 and forwards it to the board isn't careless. The tool just answered a question nobody owns.

Expected: $14,720, and the answer names net revenue and ship date.

aov_per_order | avg_per_line | orders | lines 2453.33 | 1840.0 | 6 | 8 Enter fullscreen mode Exit fullscreen mode Per order it's $2,453.33. Averaged over lines it's $1,840. The phrase says "order," so the per-order number is right, but an implicit average on a line-grain table produces the other one. Microsoft's guidance lists implicit measures as a common pitfall and recommends explicit measures with the right default summarization ( Microsoft Learn ). This question tests whether you followed that advice.

calendar_ytd | fiscal_ytd 33660.0 | 28620.0 Enter fullscreen mode Exit fullscreen mode $5,040 of difference comes from the two lines shipped in March and June, which are in calendar 2026 but in the previous Northstar fiscal year. Expected: $28,620 with "fiscal year to date, from 1 July" in the answer. An answer of $33,660 that says "calendar year to date" is a wrong number with a stated interpretation. It still fails, but it fails honestly, and the fix is one instruction.

region | revenue | lines Canada | 0 | 0 Enter fullscreen mode Exit fullscreen mode A real zero. The region exists, and its only customer bought in September and November. Expected: $0, ideally with "no completed lines shipped to Canada in October."

customers_in_gulf 0 Enter fullscreen mode Exit fullscreen mode There is no Gulf region. The honest answer isn't $0. It's "I can't find a Gulf region; the regions are Canada, Central, East and West." Varun Poojari wrote a sharp post about a dashboard that showed $0.00 when the real answer was "we don't know," and how COALESCE(SUM(x), 0) turns unknown into free ( Varun Poojari on Dev.to ). G4 and G5 are the pair that tests that difference. If both come back as $0, the model can't tell an empty set from a missing thing, and you need to know that before a manager asks about a region that was renamed last year.

product_name | revenue | units Scanner Pro | 6660.0 | 6 Scanner Lite | 3200.0 | 8 Support Plan | 2700.0 | 3 Onboarding Day | 2160.0 | 3 Enter fullscreen mode Exit fullscreen mode By revenue it's Scanner Pro. By units it's Scanner Lite. Both are reasonable. This is the kind of question where I'd accept either answer as long as the measure is named, and I'd mark it down if it picks units silently, because Northstar's sales team means revenue nine times out of ten. Write that preference down; it becomes an AI instruction later.

returned | shipped | return_rate_pct 1 | 9 | 11.1 Enter fullscreen mode Exit fullscreen mode One returned line out of nine shipped lines that were ordered in October, 11.1%. Returns are where definitions really diverge in real companies: lines or units or value, by order date or return date, with or without exchanges. My fixture only has one definition worth testing, so I'll be upfront that this question is mostly a placeholder for the version your returns team cares about. Still include it. Return rates are exactly the metric people ask a chat box about because no dashboard shows it the way they want.

region | sep | oct | change | change_pct Canada | 1200.0 | 0 | - 1200.0 | - 100.0 Central | 1440.0 | 1800.0 | 360.0 | 25.0 East | 2400.0 | 8320.0 | 5920.0 | 246.7 West | 900.0 | 4600.0 | 3700.0 | 411.1 Enter fullscreen mode Exit fullscreen mode East grew the most in dollars. West grew the most in percent. "Grew the most" doesn't say which. This is a question where I want the model to either ask or give both, and the rubric gives full marks for either. If it answers "West" with no mention of percent, that's the dangerous kind of right: a regional manager in East reads it as a ranking.

buying_customers_oct | customers_on_file 5 | 7 Enter fullscreen mode Exit fullscreen mode Two questions that sound alike. A model that answers both with 7, or both with 5, has a synonym problem. In a real model this is where "customer" gets mapped to the wrong table.

previous_month | trailing_30_days 14720.0 | 7960.0 Enter fullscreen mode Exit fullscreen mode October by ship date is $14,720. The trailing 30 days (31 October to 29 November) is $7,960. Northstar's written definition says previous calendar month, so the expected answer is $14,720. This question also checks whether the model knows what "today" is, which gets interesting when the semantic model's date table ends in September because someone stopped extending it.

Run each question three times, in fresh chats, because the same model can give different answers to identical input. Yoseph Eikelman showed an LLM reading the same page four times and getting 18, 18, 18 and then 1 ( Yoseph Eikelman on Dev.to ). Three runs won't measure that noise, but they'll show you whether it exists for a given question. Then score each answer:

Two rules on top of the table. First, any high-severity fail on a money question blocks rollout to that audience, whatever the overall percentage. A 90% score with one confident wrong revenue number isn't a 90% product for a finance team. Second, write the pass bar before the first run and date it, so nobody can move it after seeing the results. That second rule comes from a commenter on Mikhail's benchmark post on Dev.to, who suggested committing the decision rule before running anything, and it's the cheapest integrity check I know.

I'd also log, for every answer, the DAX query Copilot generated. Microsoft's guidance says to review it for each test response, and it's the only way to tell a "Lucky" from a "Pass."

When a golden question fails, the fix is almost never "tell users to phrase it better." Power BI's Prep data for AI has three parts, and Microsoft's data agent guide describes what each one does to DAX generation ( Microsoft Learn, Semantic model best practices for data agent ):

AI data schema. You pick which tables, columns and measures the AI should use. Microsoft's own example is close to G1: a model with Total Revenue, Gross Sales, Net Sales and Sales After Returns, where the AI returns Gross Sales but the team reports Net Sales. Exclude the measures you don't want in answers, and include their dependent objects so the measures still work. For Northstar, that means one revenue measure in the schema, not four.

Verified answers. A visual you've approved, triggered by specific questions. The guidance suggests five to seven trigger questions per verified answer, both formal and casual phrasings, and up to three filters.

Two details matter for testing. Verified answers are stored at the semantic model level, so they apply to any data agent built on the model. And when a data agent uses one, it doesn't return the visual; it uses the visual's columns, measures and filters to steer the DAX it generates.

That means a verified answer for "revenue in October" can still produce a wrong answer for "revenue for the East region in October" if the steering doesn't carry. Your golden set should include a near-neighbour of every verified answer, a phrasing that isn't in the trigger list, to see whether the fix generalizes.

AI instructions. Free text on the semantic model: terminology, defaults, which date to use. Microsoft is direct that "there's no guarantee it follows them exactly." That's why G3 and G10 stay in the golden set after you add "fiscal year starts 1 July" and "last month means the previous calendar month." The instruction is a hypothesis. The rerun is the test.

There's one detail on that page that I think every BA running a Fabric data agent pilot needs to know: the DAX generation tool ignores instructions written at the data agent level when it queries a semantic model. It only reads the Prep for AI configuration on the model. If your team wrote "revenue means net revenue" in the agent's instructions box, the semantic model never saw it. Put model-specific definitions in Prep for AI, and keep agent-level instructions for formatting and routing.

Two more points from Microsoft's docs that change how I'd plan the test:

Here's the shape I use. It's plain CSV so the business can edit it in Excel, and the expected-reading column is the part most teams skip.

id,question,expected_answer,expected_reading,ambiguous,must_ask_or_label,severity_if_wrong,sql_ref G1,What was revenue in October?,14720,"net, Completed, ship date",yes,no,high,G1b G2,What was our average order value in October?,2453.33,"per order, finance revenue",no,no,high,G2 G3,What's revenue year to date?,28620,"fiscal YTD from 1 July",yes,no,high,G3 G4,Revenue in Canada in October?,0,"real zero, region exists",no,no,medium,G4 G5,Revenue in the Gulf region in October?,no such region,"say region not found",no,yes,high,G5 G6,What was our top product in October?,Scanner Pro,"by revenue; units gives Scanner Lite",yes,yes,medium,G6 G7,What was the return rate in October?,11.1%,"returned lines / shipped lines, order date",yes,no,medium,G7 G8,Which region grew the most from September to October?,East ($) or West (%),"must label $ vs %",yes,yes,medium,G8 G9,How many customers bought in October?,5,"distinct buying customers, ship date",no,no,medium,G9 G10,What was revenue last month?,14720,"previous calendar month",yes,no,high,G10 Enter fullscreen mode Exit fullscreen mode If you want the full kit, I put a reusable version in this week's BA Toolkit item: Copilot semantic model golden questions, with the sample schema, the SQL for each expected answer, the scoring sheet and the Prep for AI fix log. There's a PDF version if you'd rather print it for the workshop where finance signs the definitions.

Ten is a demo. For a real rollout I'd want 30 to 60, and the mix matters more than the count. A rough split I'd start with:

The business writes the questions. The BA writes the expected readings with the business owner in the room. Someone who didn't build the model writes the SQL for the expected answers, because the person who built the measure will reproduce its mistakes in the SQL. That last rule is the same reason panditshivam's post about defining revenue for an SQL agent built a fixture where two orders share an amount: you want test data that makes a wrong definition visible ( panditshivam on Dev.to ).

I haven't run this golden set against Copilot in a live tenant for this post. The fixture shows what the expected answers are and how far apart the defensible readings sit; it doesn't show how often Copilot picks each one. That depends on your model, your Prep for AI settings, the runtime, and which Copilot surface the user is in, and it will change as Microsoft ships updates. Treat every number above as a property of the test data, not a claim about Copilot.

It also doesn't cover row-level security. Microsoft's page on Copilot consumption says users only see results based on their own access, with row-level and column-level security respected. That means two people can get two different correct answers to G1. If your model uses RLS, run the golden set as at least two test users with different roles, and write expected answers per role.

And it doesn't replace reviewing the DAX. The rubric tells you that something failed. The generated query tells you why. For the "why," my checklist for reviewing AI-generated SQL translates to DAX better than you'd think: grain first, then filters, then joins, then the empty set.

If you've done the work on metric definitions before, this goes fast. My post on metric view relationships covers the same problem from the Databricks side, and the Power BI dashboard checklist on my Blogger has the pre-sharing checks I'd run on the model before any of this.

A star schema, the shape Microsoft's guidance recommends for semantic models that AI will query. Image: "Star-schema.png" by SqlPac, CC BY-SA 3.0, via Wikimedia Commons.

Every step between the raw data and the person reading the answer is a place where a definition can change. Copilot adds one more step. Image: "Data visualization process v1.png" by Farcaster at English Wikipedia, CC BY-SA 3.0, via Wikimedia Commons.

If you run the Northstar fixture and get different numbers, or you think my rubric is too strict on "Lucky," tell me in the comments. I'd rather fix the test than defend it.

I'm Prachit Parikh, a business analyst. I turn what stakeholders ask for into requirements a team can test, check the data with SQL, and see changes through UAT. I keep free templates, including the golden question pack from this post, in my BA Toolkit on GitHub, and I make short animated explainers on YouTube. Besides Dev.to, I write on Substack, Medium, Hashnode, Blogger and WordPress, and I answer questions on Quora. You can also find me on LinkedIn, Bluesky, Kaggle, Credly, Crunchbase and Gravatar. Everything is collected on my website, my portfolio page and my profile hub.

Originaltitel: Test Copilot on your Power BI semantic model before your users do: golden questions with SQL answersQuelle: dev.to (dev.to). Original öffnen