Activity 3 將清理/抽取後的 Sherpa family table 與紙條線索比對。作者要求 ChatGPT 生成 macOS 的 xlwings + OpenAI Python function,逐 row 輸出 YES/NO;第一版 code runtime error,再要求簡化並修正。
來源線索包含 Kh. East、stone house、off trail、yak、約 3 km from Base Camp、family N. Sh.。Prompt 要求 output only YES/NO。
| 階段 | 來源狀態 |
|---|---|
| First generated script | extract.py,執行出現 xlwings runtime error |
| Error | AttributeError: module 'xlwings' has no attribute '_xlwindows' |
| Follow-up | Rewrite by keeping the code as simple as possible |
| Final output | 新增 Prediction 欄,YES/NO |
簡化版 code 嘗試 xw.Book.caller(),失敗時開啟指定 workbook;從 A1 expand table 讀 headers/rows,逐 row 建 dict,呼叫 source-era OpenAI model 判斷是否符合全部線索,再寫回新欄。模型/SDK 寫法只按原書 2026 版來源保留。
來源明確指出:全表只有一列 YES,是 excluding header 的第 3 row,對應 Nomi Sherpa。
此案例展示 AI code troubleshooting,但分類本身仍是 probabilistic model decision。即使只有一列 YES,也應回到原始欄位逐條驗證每個 requirement,而不是因模型輸出唯一就視為確證。
請對每個 row 逐項回報六個 requirements 的 match/no-match,再產生最終 YES/NO。最後把 YES row 的原始欄位與每條線索並排顯示,讓我人工驗證,不要只回傳黑箱 label。