开始使用免费开始使用

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

V4-Pro 的推理能力不仅适用于数学和代码,对文本的推理也同样出色。这使我们可以解读和分析法律文书,而这类文书通常篇幅较长且难以理解。

本练习为您提供了一份由一句话构成的简易法律合同,以及一个情境,用来判断某名员工是否违反合同。

为便于演示,我们使用了高度简化的法律文本,但这一思路可以扩展到更长的文档。

在将 AI 用于涉密文档前,请务必先咨询法务或信息安全团队。

本练习是课程的一部分

在 Python 中使用 DeepSeek

查看课程

练习说明

  • prompt 中加入 TaskContractSituation 分隔符。
  • 将该提示发送给 deepseek-ai/DeepSeek-V4-Pro

交互式实操练习

通过完成这段示例代码来试试这个练习。

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-Pro", messages=[{"role": "user", "content": ____}], max_tokens=600)
print(response.choices[0].message.content)
编辑并运行代码