> For the complete documentation index, see [llms.txt](https://docs.coreway.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coreway.com/yoov-plus/worksheet/worksheet-design/ai-scenario-field/ai-custom-fill-column.md).

# AI 自定義填充欄位

## 1.功能簡介 <a href="#id-1-function-introduction" id="id-1-function-introduction"></a>

**AI 自定義填充**欄位提供了極高的靈活性，允許您透過撰寫自訂的指令（Prompt），讓大模型根據表單中的一個或多個欄位值進行綜合判斷或運算，最終輸出指定類型的內容。

相較於其他 AI 欄位，AI 自定義填充沒有固定的處理邏輯，完全由您的指令來決定 AI 的行為，因此可以應對各種複雜的業務場景，例如：

* 根據客戶購買日期與當前日期的差值，自動判斷並填充產品是否仍在保固期內。
* 根據客戶描述的問題，自動生成一段專業的初步處理建議。
* 根據多個評分欄位的數值，自動輸出一段綜合評語。

## 2.操作流程 <a href="#id-2-operation-process" id="id-2-operation-process"></a>

### 進入欄位配置介面 <a href="#enter-column-configuration-page" id="enter-column-configuration-page"></a>

1. 進入目標應用的表單設計介面。
2. 點擊左側導航欄中的 **AI 場景**頁籤。
3. 將 **AI 自定義填充**欄位拖曳至表單設計區域中，右側即會彈出欄位屬性面板。

### 配置 AI 自定義填充欄位 <a href="#configure-ai-custom-fill-column" id="configure-ai-custom-fill-column"></a>

在屬性面板中，您需要完成以下配置：

![AI 自定義填充配置介面](/files/69985dcb3920e8efbd6c3cf03ceace6841583a4f)

{% stepper %}
{% step %}

### 選擇欄位類型 <a href="#select-column-type" id="select-column-type"></a>

AI 自定義填充支援多種輸出資料類型，目前可選擇：**文字、數字、單選、多選、日期、時間、評分**。請根據您希望 AI 輸出的內容格式來選擇對應的類型。

| 欄位類型          | 適用場景示例                         |
| ------------- | ------------------------------ |
| 文字            | 生成建議文字、摘要、評語等自然語言內容            |
| 數字            | 計算得分、估算費用等數值型輸出                |
| 單選            | 判斷類問題，如「是否過保」（在保 / 已過保 / 無法判斷） |
| 多選            | 標記多個屬性或標籤                      |
| 日期 / 時間       | 推算預計完成時間等                      |
| 評分            | 根據描述自動給出評分                     |
| {% endstep %} |                                |

{% step %}

### 設置選項（單選 / 多選類型適用） <a href="#set-options-single-multiple-applicable" id="set-options-single-multiple-applicable"></a>

若選擇了「單選」或「多選」類型，需要設置 AI 可選擇的選項清單。例如設置「在保」、「已過保」、「無法判斷」三個選項，AI 將從中選擇最符合邏輯的一項輸出。
{% endstep %}

{% step %}

### 配置填充指令（核心配置） <a href="#configure-fill-instruction-core-setting" id="configure-fill-instruction-core-setting"></a>

填充指令是 AI 執行的核心依據，**必填**，最大字元限制為 **3000 個字元**。您可以在指令中插入**變數**，變數內容來自目前工作表的欄位值（支援基礎欄位中的所有欄位，以及高級欄位中的自動編號、關聯記錄標題、他表欄位等）。

**指令撰寫範例**（以判斷保固狀態為例）：

```
若/{是否記得購買時間?}為是，需要再根據/{產品購買日期}距離今天是否超過 180 天判斷產品是否已經過保：
- 超過 180 天，則輸出「已過保」
- 未超過 180 天，則輸出「在保」

若/{是否記得購買時間?}為否，則直接輸出「無法判斷」
```

> **撰寫指令的建議**：指令越清晰、條件越明確，AI 的輸出結果就越準確。建議在指令中明確說明每種情況下應輸出的具體內容，並使用欄位變數（以 `/{欄位名稱}` 格式插入）來引用表單中的實際資料。

**其他配置項**：

| 屬性名稱             | 說明                            |
| ---------------- | ----------------------------- |
| **禁止手動輸入**       | 開啟後欄位鎖定為唯讀，確保填充結果不被人工修改，預設不開啟 |
| **欄位權限**         | 可見、可編輯、新建記錄時隱藏，與現有控制項一致       |
| **欄位寬度**         | 可定義控制項在表單頁面的寬度，與現有控制項一致       |
| {% endstep %}    |                               |
| {% endstepper %} |                               |

### 實際運行效果 <a href="#actual-operation-effect" id="actual-operation-effect"></a>

配置完成後，在表單記錄的填寫或編輯過程中，聚焦 AI 自定義填充欄位時，控制項旁會顯示 AI 輸入按鈕，點擊即可觸發填充。

![AI 自定義填充使用效果](/files/6f2be8137c1cfb52d674605af04dfbf88435e45e)

如效果圖所示，在「AI 判斷是否過保」欄位中，系統根據配置的指令邏輯，讀取了相關欄位的值（購買時間記錄及購買日期），經過計算判斷後，自動輸出了「已過保」的結果。整個過程無需人工核對日期，大幅降低了人為失誤的風險。

## 3.常見問題 <a href="#id-3-faq" id="id-3-faq"></a>

<details>

<summary>問：指令中如何插入欄位變數？</summary>

答：在配置填充指令時，點擊輸入框內的插入變數功能，選擇目前工作表中的欄位即可自動插入，格式為 `/{欄位名稱}`。AI 執行時會自動將其替換為該記錄中對應欄位的實際值。

</details>

<details>

<summary>問：AI 自定義填充與 AI 總結的主要區別是什麼？</summary>

答：AI 總結的邏輯是固定的（對指定欄位進行摘要），適合快速提煉長文字；AI 自定義填充則完全由您的指令決定行為，可以引用多個欄位進行複雜的邏輯判斷，靈活性更高，適合有特定業務規則的場景。

</details>

<details>

<summary>問：業務規則和工作流對 AI 自定義填充欄位是否生效？</summary>

答：生效。業務規則、批量編輯、自訂動作、工作流賦值對 AI 控制項的欄位依然生效，系統會按其欄位屬性進行處理。

</details>

<details>

<summary>問：歷史記錄如何批量執行 AI 自定義填充？</summary>

答：歷史記錄需透過「批量刷新」手動觸發。請注意，同一租戶每分鐘請求 AI 欄位不超過 100 個，超出限制時需稍作等待。

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.coreway.com/yoov-plus/worksheet/worksheet-design/ai-scenario-field/ai-custom-fill-column.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
