AI-Assisted Coding for Developers
Francesca Donadoni
AI Curriculum Manager, DataCamp
Prompt: 我們給 AI 模型的輸入或指令

Prompt: 我們給 AI 模型的輸入或指令

Driver:「要去哪裡?」
Character:「隨便」
PROMPT:含糊,模型難以理解

Driver:「要去哪裡?」
Character:「帶我到 23 Main Street,不要走高速公路」
PROMPT:具體,模型易於理解

$$
$$
「Fix this code」
$$
$$
「Fix this Python function to handle division by zero errors. Keep the structure the same, and only change the except block」
$$
$$
「Generate a Python function to reverse a string」
$$
$$
「Generate a Python function that reverses a string, handles Unicode characters, and ignores trailing whitespace」

Fix this Python function to handle division by zero errors. Keep the structure the same, and only change the except block.

AI-Assisted Coding for Developers