Cover of Business Intelligence with Agents, edition 2026.11.15, code 28XD-AHKT Business Intelligence with Agents 28XD-AHKT 15 editions since Nov 2026 Rolling Edition 2026.11.15

運用代理的商業智慧

版次 2026.11.15 範例於 2026年11 月 19 通過測試 78 個範例中有 78 個通過 變更內容

由 AI 翻譯。經人工以英文驗證。 我們如何製作書籍

譯自英文書,版次 2026.11.15。 閱讀原文

能從您的資料倉儲,把商業問題轉化為可信洞察的代理程式:分層脈絡、語意層中受治理的指標、受防護的 SQL、無法回答時會明確說明的答案、代理程式無法用話術繞過的存取規則,以及以您自己的黃金問題進行的評估,並透過 MCP 提供服務,全部建構在 DuckDB、sqlglot 與 MetricFlow 之上。

適合對象 寫給撰寫 SQL、熟悉自家資料倉儲,並受託讓使用者能向資料提問的分析工程師、BI 開發人員與資料科學家,目標是打造一個能算出正確數字的助理。

開始閱讀
版次歷史自 2026年十一月 以來的 15 個版次每個版次及其變動內容
2026.11.12026.11.15
2026.11.15 · 2026年11 月 21散文修訂、新內容37 節 已變更

目錄

11 章,閱讀時間約 15 小時 58 分鐘,附有78 個範例。

  1. 1資料代理程式的完整流程

    讀完本章,你將能建立商店的資料倉儲,讓一個已錄製回應的模型針對商業問題撰寫 SQL,執行該 SQL 並找出它回傳的錯誤數字,改以單一已定義的指標回答同一個問題,並在五個黃金問題上為兩種做法評分。

  2. 2Where raw text-to-SQL gets the number wrong

    By the end of this chapter, you can name the five ways schema-only text-to-SQL returns a plausible wrong number on a real warehouse, show each one on the shop's warehouse, count them across a set of golden questions, and tell which a better prompt can fix and which need definitions the schema doesn't hold.

  3. 3從你自己的工作建立黃金問題

    讀完本章後,你能根據公司裡的人實際提出的問題撰寫黃金問題,並為每一題附上黃金 SQL、提問者的角色,以及該題所需的答案類型。

  4. 4Give the agent layered context

    By the end of this chapter, you can give a model that writes SQL more than the schema, in layers: notes on columns whose names mislead, a glossary of the shop's business terms, and verified queries retrieved for each question.

  5. 5Define metrics once in a semantic layer

    By the end of this chapter, you can write the shop's semantic models and metrics in MetricFlow's YAML spec, compile a metric request to SQL with the book's own compiler, show that its entity joins can't fan out, group by the fiscal calendar, and confirm that MetricFlow compiles the same definitions to the same results.

  6. 6優先將問題導向受治理的指標

    讀完本章後,你將能夠:把語意層的指標而非資料倉儲的資料表,作為工具提供給代理;讓代理回傳結構化的指標請求,並在執行任何查詢之前先加以驗證;當一個問題可能對應多個指標時,讓代理向使用者反問;並在黃金問題上衡量這些改變帶來的差異。

  7. 7Let the agent write SQL inside guards

    By the end of this chapter, you can handle the questions no metric covers by letting the agent write SQL that runs read-only on a database holding only the rows and columns its role may read, and that is parsed, checked against an allowlist of tables, bounded in rows, size, cost and time, repaired once from an error, and transpiled to your warehouse's dialect.

  8. 8在無法回答時要說出來

    讀完本章,你可以把拒答當成一種正式的回答:區分倉儲能回答與不能回答的問題,以已知類型的理由拒答,檢查所問期間的資料是否已經到齊,為每個答案呈現其出處,並用精確率與召回率衡量拒答,使代理既不亂猜,也不過度拒絕。

  9. 9讓代理程式守在誰能看到什麼的界線內

    讀完本章,你將能在代理程式之下、在各角色自己的資料庫中,強制執行每個角色的列篩選、欄位遮罩與最小群組大小;語意層中的改寫與防護機制則作為縱深防禦,使任何提示都無法擴大存取範圍。

  10. 10評判答案並找出退化

    讀完本章後,你將能夠:同時以多項指標為代理程式的一次執行評分;只在結果無法直接比較時,才以模型擔任評審;用任何人都能重新計算的參考標籤來校準該評審;觀察分數在不同次執行之間的變動幅度;並在 CI 中依據已錄製的執行結果,為提示詞、情境或指標的變更設下關卡。

  11. 11Serve the semantic layer over MCP

    By the end of this chapter, you can serve the shop's governed metrics as MCP tools that answer for the role the server was built for, return each answer with its provenance as structured data, test the server in memory, and run the book's agent through it as a host.

引用本節

格式

各種格式皆引用英文原書,本譯本即依循該原書。

每種格式都會標示本版。其連結會開啟目前版次,節標題會說明該節內文最後一次變動的時間。存取日期與擷取日期即為你開啟此頁的當日。