R code tutor 查核清單R Code Tutor Verification Checklist
本站有兩份查核清單,這是其中第二份:涵蓋 verify/workflow.qmd 流程裡的 P0–P1、V2–V4、V5、C1–C2 步驟,設計成可列印的一頁。適用對象是使用 R code tutor(askllmr)取得 R 程式碼的情境;若你用的是 Module Guider(askllm),請改用 checklist-guider.qmd。
This is the second of the two verification checklists on this site. It covers steps P0–P1, V2–V4, V5, and C1–C2 of the workflow in verify/workflow.qmd, laid out as a single printable page. Use it when you asked the R code tutor (askllmr) for R code. If you used the Module Guider (askllm) instead, use checklist-guider.qmd.
與 checklist-guider.qmd 最大的差異在於:R code tutor 的答案空間不是有限 集合(不像選單路徑可以逐條核對),R 是 Turing-complete,沒有任何掃描能證明 一段任意生成的程式碼「如它所說地運作」。所以這裡沒有 V1 路徑核對,取而代之 的是 V4 程式碼核對,拆成讀(4a)、跑(4b)、對(4c)三段——這是流程性 的查核,不是機械性的查核。詳見 askLLM/docs/LIMITATIONS.zh-TW.md〈兩個分析, 兩種查證方式〉一節。
The key difference from checklist-guider.qmd is that the R code tutor’s output space is not a finite, checkable set the way menu paths are. R is Turing-complete, so no scan can prove that an arbitrary piece of generated code actually “works as claimed.” So there is no V1 path check here. Its place is taken by V4, the code check, split into read (4a), run (4b), and cross-check (4c). This is a procedural check, not a mechanical one. See the “Two analyses, two ways to verify” section of askLLM/docs/LIMITATIONS.zh-TW.md for background.
送出前Before you submit
收到回覆後After you receive a reply
結案Closing out
紅旗字串表(4a 逐行核對用)Red-flag string table (for V4a)
askLLM 的 system prompt 明文禁止模型在 R code tutor 的回覆裡使用下列指令 (見 askLLM/R/llm-adapter.R 第 172–177 行)。若程式碼裡出現任何一項,代表 回覆違反了 askLLM 自己設定的邊界,應標記為「不可執行」並回頭修改問題:
askLLM’s system prompt explicitly forbids the model from using the following in an R code tutor reply (see askLLM/R/llm-adapter.R, lines 172–177). If any of these appear in the code, the reply has violated askLLM’s own stated boundary. Flag it as “do not run” and go back and rephrase the question:
| 紅旗Red flag | 為什麼Why |
|---|---|
install.packages(...) |
模型不能替你安裝套件;Rj 只用已裝好的套件。The model cannot install packages for you; Rj only has what is already installed. |
read.csv(...)/任何檔案讀取函式/ any file-reading function |
不得建議讀取檔案;資料一律用 data 這個既有物件。No file reads are allowed; the data must always come from the existing data object. |
setwd(...) |
不得變更工作目錄。The working directory must not be changed. |
任何絕對路徑(如 C:/...、/Users/...)Any absolute file path (e.g. C:/..., /Users/...) |
路徑因人而異,不可能通用,且暗示前一條「檔案讀取」紅旗。Paths are machine-specific and can’t generalize; this usually co-occurs with the file-read red flag above. |
system(...) |
不得呼叫系統層級指令。System-level shell calls are not allowed. |
library(套件),但該套件不在 <rj_environment> 清單內、也非 base R |
模型只能引用你 Rj 裡實際裝了的套件;引用未裝套件的程式碼一執行就會出現 there is no package called '...'。library(package) where the package is not in the <rj_environment> list and is not base R — the model may only cite packages actually installed in your Rj; code citing an uninstalled package will fail immediately with there is no package called '...'. |
提醒:
<rj_environment>這個套件清單只有在你的 jamovi 裝有 Rj、且 askLLM 掃描到套件時才會附上。若你的 jamovi 沒裝 Rj,askLLM 會改教你 用 Syntax Mode,而不是硬生出一段你根本跑不了的程式碼;這種情況下本清單 的 4a/4b 步驟不適用,因為根本沒有 Rj Editor 可以貼上執行。
Note: the
<rj_environment>package list is only attached when your jamovi has Rj installed and askLLM was able to scan its packages. Without Rj installed, askLLM should instead teach you to use Syntax Mode rather than generating code you cannot actually run. Steps 4a/4b of this checklist then do not apply. There is no Rj Editor to paste into.