Learning Path 04
AI Builder
前面你已經能做出有 frontend、backend、database、Auth 與 deployment 的 Web App。現在才開始加模型:先把 AI 當成一個需要輸入、上下文、驗證與邊界的外部能力,而不是把整個產品交給一個聊天框。
完成一個真正有 AI 能力的產品功能
你會把模型 API 留在 backend,控制 instructions 與 context,取得可驗證的 structured output,從自己的資料檢索 context,並讓模型在明確 schema 下呼叫你提供的工具。
Model API:讓產品第一次真的呼叫模型
從 frontend request 進 backend,再由 server-side secret 呼叫模型 API;理解 model input、output、latency、error 與 usage。
Prompt / Instructions:把需求寫成可控制的模型任務
拆開 application instructions 與 user input,使用明確任務、few-shot examples、輸出限制與測試控制行為,並理解 prompt injection 的系統邊界。
Context:模型到底看得到什麼?
區分 history、context、memory 與 retrieval,管理 context window、token budget、recent history、summary 與多輪 state。
Structured Output:不要再靠猜模型回了什麼
用 JSON Schema 把模型輸出變成可驗證的 application data,處理 parse、validation、retry、fallback 與 schema version。
RAG:先找資料,再讓模型回答
從文件清理、chunk、embedding、retrieval 與 ranking,到 grounded answer、citation、權限過濾與 retrieval evaluation。
Tool Calling:讓模型提出動作,但程式決定能不能做
定義 function schema、驗證 arguments、套用 Auth / authorization、執行 read / write tools,並處理 confirmation、bounded execution 與 audit。
Final Project:做一個可控、可驗證的 AI App
整合 model API、prompt、context、structured output、私人 RAG、safe tools、Auth、evaluation、logs 與 deployment,完成 Study Workspace Assistant。