推論モードで法的契約を分析する
V4-Pro の推論能力は、数学やコードだけでなく、テキストの推論にも同様に優れています。これにより、長く難解になりがちな法的文書の解釈や分析にも対応できます。
ここでは、1文だけのシンプルな法的契約と、従業員が契約違反をしているかどうかを判断するための状況が与えられています。
これはデモンストレーションを迅速に行うために非常に簡略化した法的文書ですが、この考え方はより大きな文書にも応用できます。
機密文書に AI を使用する前には、必ず法務部門やセキュリティ部門に相談してください。
この演習はコースの一部です
Python で DeepSeek を使いこなす
演習の手順
promptにTask、Contract、Situationの区切り文字を追加します。- そのプロンプトを
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)