Vertex AI 是全方位的機器學習開發平台,提供預測式和生成式 AI 功能,方便您訓練、評估及部署預測機器學習模型來預測趨勢。此外,您可以利用平台探索、調整及提供生成式 AI 模型來生成內容。舉例來說,保險公司不斷尋求提升效率的方法,希望改良理賠處理和風險評估等程序。針對這類挑戰,Vertex AI Studio 提供強大的工具,可快速設計出生成式 AI 解決方案的原型。
有了 Vertex AI Studio,您就能快速測試及自訂生成式 AI 模型,並用於應用程式。這個平台提供各種工具和資源,包括符合直覺的使用者介面 (UI),即使沒有豐富的機器學習相關背景,也能輕鬆開始使用生成式 AI。
本實驗室會引導您逐步探索 Vertex AI Studio,協助您發揮 Gemini 等先進生成式 AI 模型的潛力。您將扮演保險公司員工,協助設計風險分析助理原型。您會瞭解如何將提示詞構想轉化為可部署的應用程式、設計縝密的提示詞來達到特定生成結果,並運用多模態功能分析各種類型的資料 (包括圖像),所有這些核心工作都能直接在 Google Cloud 控制台完成,不必透過 API 或 Python SDK 執行。
目標
本實驗室的內容包括:
根據提示詞建立應用程式。
設計有效的提示詞。
設計及管理提示詞。
使用多模態提示詞。
設定和需求
瞭解以下事項後,再點選「Start Lab」按鈕
請詳閱以下操作說明。實驗室活動會計時,且中途無法暫停。點選「Start Lab」後就會開始計時,顯示可使用 Google Cloud 資源的時間。
您將在真正的雲端環境完成實作實驗室活動,而不是模擬或示範環境。為此,我們會提供新的暫時憑證,供您在實驗室活動期間登入及存取 Google Cloud。
You are an expert AI assistant for an insurance underwriting department.
Your primary goal is to help underwriters by accurately and concisely summarizing client information and highlighting potential risk factors.
Maintain a professional and objective tone.
Focus only on the information provided in the prompt. Do not invent details.
在系統指令下方,頁面底部的主要提示詞區域中,貼上以下內容:
Customer Notes for 'SafeHarbor Warehousing':
"The applicant is seeking coverage for their 50,000 sq ft warehouse. The business is 5 years old. The building is a concrete tilt-up structure, originally built in 2010. They store a variety of non-hazardous dry goods.
Fire safety measures include a full sprinkler system, a centrally monitored fire alarm, and documented annual inspections by a certified third party.
Security measures include a 24/7 centrally monitored burglar alarm, comprehensive security camera coverage of the interior and exterior, a fully fenced perimeter, and nightly patrols by a contracted security guard service.
The company reports no major property or liability losses in their 5-year history. They have specifically asked to ensure their new automated shelving and retrieval system, installed last month, is adequately covered under the policy."
Your Task:
1. Briefly summarize the key details of the 'SafeHarbor Warehousing' business and its existing safety measures.
2. Based *only* on the notes provided, identify any immediate questions an underwriter should ask or potential risk factors they should consider further.
Present the summary first, then the questions/risk factors as bullet points.
在右側的「設定」部分中:
確認已選取「」模型。如要變更模型,請點選「Switch model」。
如果尚未設定,請切換至「進階」選項,「區域」請選取「」。
點選「提交」箭頭按鈕 (通常位於提示詞輸入區域的右下方),或按 Ctrl + Enter 鍵。查看模型的回覆。
接下來,您將瞭解如何將這份提示詞草稿轉化為原型應用程式。點選頁面右上方的「使用程式碼建構」按鈕。在隨即出現的下拉式選單中,選取「部署為應用程式 (由 Cloud Run 提供支援)」。
在隨即出現的「部署至 Cloud Run」對話方塊中,執行下列操作:
如果系統提示,您可能需要啟用服務 (例如 Cloud Build API 或 Cloud Run API)。如有需要,請點選「啟用」並等待服務開啟。
勾選「確認聲明」,公開部署應用程式。
點選「建立應用程式」。
部署作業隨即會開始,可能需要幾分鐘才能完成。您可能會在 UI 中看到類似下方的狀態更新:
完成後,請點選「管理網頁應用程式」方塊中的「關閉」按鈕。接著,請再次點選頁面右上方的「使用程式碼建構」按鈕,開啟新部署的應用程式。在下拉式選單中選取「開啟應用程式 (由 Cloud Run 提供支援)」。系統會在新的瀏覽器分頁中開啟「Vertex AI 生成式 AI 應用程式」。
您現在應會看到標題為「歡迎使用 Vertex AI 生成式 AI 應用程式!」的網頁,並顯示提示詞標題「Insurance Risk Summary - Prototype」。
在「聊天機器人」部分底部的「Type a message...」欄位中,輸入新的測試訊息。例如:
New Customer Inquiry:
"Applicant 'Coastal Goods Delivery' has a fleet of 10 delivery vans, all equipped with GPS and telematics. They operate within a 100-mile radius of their depot. Drivers undergo annual safety training. They had one minor fender bender last year, no injuries, $1500 damages. What are the primary risk considerations?"
Please summarize key points and identify potential risks.
點選提交箭頭按鈕,將訊息傳送至應用程式。
觀察部署的生成式 AI 應用程式回覆,該應用程式應會根據您在 Vertex AI Studio 定義的邏輯和系統指令處理輸入內容。
You are an AI assistant specializing in parsing and extracting specific data points from unstructured insurance claim notifications.
Your goal is to identify and list key information accurately.
If a piece of information is not found, clearly state "Not found".
Output the extracted information in a key: value format, with each key on a new line.
在主要提示詞區域中,貼上以下未經整理的理賠備註樣本:
Claim Notification Received:
"Hi team, just got a call from Mrs. Eleanor Vance, policy #POL458892. She reported a kitchen fire that occurred on May 12th, 2025, around 3 PM. The main damage seems to be to the oven and surrounding cabinets. She mentioned smoke damage in the kitchen and dining area too. She thinks the total damage might be around $7,500. Her contact is 555-0123. No injuries reported, thankfully."
Extract the following:
- Policy Number
- Claimant Name
- Date of Loss
- Time of Loss
- Type of Loss
- Brief Description of Damage
- Estimated Loss Amount
- Injuries Reported
Claim Notification Received:
"Email from John Sterling (policy POL77521) re: water damage at his shop. Happened sometime last night, May 10th, 2025. A pipe burst in the ceiling. Stockroom is flooded, some damage to inventory. He's not sure on the cost yet, maybe $5k-$10k? No one was there, so no injuries."
Extract the following:
- Policy Number
- Claimant Name
- Date of Loss
- Time of Loss
- Type of Loss
- Brief Description of Damage
- Estimated Loss Amount
- Injuries Reported
在第一個樣本的「輸出內容」中,貼上以下格式正確的擷取內容:
Policy Number: POL77521
Claimant Name: John Sterling
Date of Loss: May 10th, 2025
Time of Loss: Night
Type of Loss: Water damage
Brief Description of Damage: Pipe burst in ceiling, stockroom flooded, some damage to inventory.
Estimated Loss Amount: $5,000 - $10,000
Injuries Reported: No
點選「新增樣本」按鈕,儲存這個樣本並返回主要提示詞區域。
重新新增系統指令:清除提示詞也一併清除了系統指令,因此請再次將指令貼回頂端的「系統指令」方塊中:
You are an AI assistant specializing in parsing and extracting specific data points from unstructured insurance claim notifications.
Your goal is to identify and list key information accurately.
If a piece of information is not found, clearly state "Not found".
Output the extracted information in a key: value format, with each key on a new line.
Claim Notification Received:
"Hi team, just got a call from Mrs. Eleanor Vance, policy #POL458892. She reported a kitchen fire that occurred on May 12th, 2025, around 3 PM. The main damage seems to be to the oven and surrounding cabinets. She mentioned smoke damage in the kitchen and dining area too. She thinks the total damage might be around $7,500. Her contact is 555-0123. No injuries reported, thankfully."
Extract the following data points from the provided claim notification:
- Policy Number
- Claimant Name
- Date of Loss
- Time of Loss
- Type of Loss
- Brief Description of Damage
- Estimated Loss Amount
- Injuries Reported
有了可用的提示詞後,通常會想嘗試變更指令或模型設定,看看是否能提升回覆品質,這就是 Vertex AI Studio「比較」功能的用途。這個部分會用到我們剛才建立的提示詞。
確認您目前位於 Vertex AI Studio 的主要區域。如果您先前在查看工作 1 中部署的應用程式,請關閉該瀏覽器分頁,並返回 Google Cloud 控制台。
前往「Create a new prompt」頁面,從「導覽選單」 依序選取「Vertex AI」>「Vertex AI Studio」>「建立提示詞」。
點選左上角的「未命名的提示詞」,並重新命名為 Comparison Base - Restaurant Risks。
設定下列簡單的基本提示詞:
在「系統指令」方塊中,輸入下列內容:
You are an insurance risk analyst assistant. Your task is to identify potential risk factors from a given scenario. Be concise.
在主要提示詞區域中 (即標為「在這裡撰寫提示詞」的位置),貼上以下內容:
Scenario:
"The applicant, 'The Fiery Grill,' is a new upscale restaurant specializing in wood-fired oven pizzas and open-flame grilling. They have installed a brand new, custom-built fire suppression system for their cooking area, but it has not yet been certified by a third party. The restaurant plans to feature live acoustic music on weekend evenings and has a small, raised stage area. They also want to offer valet parking."
Based on this scenario, list three primary risk factors an underwriter should consider.
在右側的「設定」部分中:
選取「」模型。
將「溫度參數」設為 0.2。
確認「區域」為「」。
點選「提交」箭頭按鈕,查看模型的初始回覆。
點選「儲存」按鈕。確認名稱為 Comparison Base - Restaurant Risks,然後儲存。一般來說,您必須先儲存提示詞,才能在部分比較工作流程中有效運用,尤其是日後打算與儲存的提示詞相比較時。
系統顯示 Comparison Base - Restaurant Risks 提示詞和回覆時,點選頂端工具列中的「比較」按鈕。
注意:如果系統提示,請點選「不儲存而直接離開」,然後按一下「繼續」。
「比較」介面隨即會開啟。系統通常會在左側欄中顯示 Comparison Base - Restaurant Risks 提示詞、設定和最新回覆。
You are an expert insurance risk analyst assistant. Your task is to identify potential risk factors from a given scenario. For each risk factor, also briefly suggest a potential mitigation strategy or question for the underwriter. Be clear and structured.
Scenario:
"The applicant, 'The Fiery Grill,' is a new upscale restaurant specializing in wood-fired oven pizzas and open-flame grilling. They have installed a brand new, custom-built fire suppression system for their cooking area, but it has not yet been certified by a third party. The restaurant plans to feature live acoustic music on weekend evenings and has a small, raised stage area. They also want to offer valet parking."
Based on this scenario, list three primary risk factors an underwriter should consider.
提示詞文字:將提示詞文字還原為原始的簡單版本,不含關於因應策略的系統指令。複製並貼上 Comparison Base - Restaurant Risks (左側窗格) 中的提示詞:
Scenario:
"The applicant, 'The Fiery Grill,' is a new upscale restaurant specializing in wood-fired oven pizzas and open-flame grilling. They have installed a brand new, custom-built fire suppression system for their cooking area, but it has not yet been certified by a third party. The restaurant plans to feature live acoustic music on weekend evenings and has a small, raised stage area. They also want to offer valet parking."
Based on this scenario, list three primary risk factors an underwriter should consider.
* 如果比較檢視畫面中沒有此窗格的系統指令方塊,請務必在此處開頭重新補上系統指令「You are an insurance risk analyst assistant...」(如果指令曾被清除);或者,如果左側窗格中的原始系統指令可全域套用,則沿用該指令即可。
1. Provide a concise title for this image (under 5 words).
2. Describe the image in one or two sentences.
3. Extract all visible text from the image. Present the flight schedule as a clearly formatted list with columns for "Time" and "City".
點選「提示詞」部分右下方的「提交」箭頭按鈕,查看模型回覆。
接著,您可以提出需要根據擷取資訊推理才能回答的問題。將先前的文字提示詞換成下列內容 (圖像不變):
Based on the flight schedule shown in the image, what percentage of the listed flights depart before 11:30 AM? Show your calculation if possible.
點選「提交」箭頭按鈕,查看回覆。
快速觀察溫度參數對結果的影響。在右側的「設定」面板中:
將「溫度參數」調整為 0.8。
重新提交與步驟 9「完全相同的提示詞」(「Based on the flight schedule... percentage...」)。
A close-up, photorealistic image of a single honeybee collecting pollen from a vibrant purple lavender flower, with a softly blurred garden background.
SynthID 是 Google DeepMind 開發的技術,可將數位浮水印直接嵌入 AI 生成圖像的像素中。這類浮水印經過特殊設計,人眼無法辨識,但演算法可以偵測到。這種浮水印可以協助識別 AI 生成的圖像,推動落實資訊公開和負責任的 AI 做法,即便圖像日後經過修改 (例如壓縮或套用濾鏡) 也能識別。
如果專案尚未啟用 Cloud Text-to-Speech API,您可能會收到啟用這項 API 的提示。如果尚未啟用,請點選「啟用」,然後等待 API 啟用 (可能需要一點時間)。
介面準備就緒後,請在底部的文字提示詞區域中,輸入要合成語音的文字。例如:
Welcome to the world of generative AI on Google Cloud
在右側的「設定」面板中:
選取「模型」,例如「Chirp 3. HD Voices」。
選擇想要的「語言」,例如「English (US)」。
從下拉式選單中選取「語音」。您可以試聽幾種不同的聲音,瞭解各自的特色。
如有需要,歡迎探索各種「進階選項」。
點選「提交」按鈕。
處理完畢後,您應該可以在介面中直接播放生成的音訊。
恭喜!
恭喜!在這個實驗室中,您成功使用 Vertex AI Studio 為保險情境設計出生成式 AI 應用程式的原型,其中包括初步設計、部署,以及進階提示工程與比較。您也練習為特定分析工作修正文字輸出內容,並探索出色的多模態功能,包含生成圖像、影片和語音。這些基礎技巧都可協助您在 Google Cloud 建構更精密的生成式 AI 解決方案。