開始使用免費開始

使用推理模式分析法律合約

V4-Pro 的推理能力不只適用於數學和程式碼,也同樣擅長理解文字。這讓我們能解讀與分析常見且難以理解的冗長法律文件。

你已獲得一份簡單、只有一句話的法律合約,以及一個情境,用來判斷某位員工是否違反合約。

為了示範速度,這是一個高度簡化的法律文件,但這個概念可以擴充至更大的文件。

在將機密文件交由 AI 使用前,務必先諮詢法務或資安團隊。

本練習屬於課程

使用 Python 操作 DeepSeek

檢視課程

練習說明

  • prompt 中加入 TaskContractSituation 界定段落。
  • 將該提示送給 deepseek-ai/DeepSeek-V4.1-Flash

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

client = OpenAI(api_key="", base_url="https://api.together.xyz/v1")

# Add the delimiters to the prompt
prompt = """[____: Determine whether the employee is in breach of contract.]

____:
The employee is not allowed to undertake work that generates an income of any sort.

____:
The employee is cleaning part-time for an hourly wage.
"""

# Send the prompt — V4-Pro reasons by default
response = client.chat.completions.create(model="deepseek-ai/DeepSeek-V4.1-Flash", messages=[{"role": "user", "content": ____}], max_tokens=600)
print(response.choices[0].message.content)
編輯並執行程式碼