Comece agoraComece grátis

Analyzing legal contracts with reasoning mode

V4-Pro's reasoning isn't only good for math and code — it's equally proficient at reasoning with text. This opens the door for interpreting and analyzing legal documents, which are often long and difficult to understand.

You've been provided with a simple, one-sentence legal contract, and a situation to determine whether an employee is in breach of contract.

This is a very simplified version of a legal document for speed of demonstration, but the concept scales to larger documents.

Always consult with legal or information security teams before using AI with confidential documents.

Este exercicio faz parte do curso

Working with DeepSeek in Python

Ver curso

Instruções do exercicio

  • Add the Task, Contract, and Situation delimiters to the prompt.
  • Send the prompt to deepseek-ai/DeepSeek-V4-Pro.

exercicio interativo prático

Tente este exercicio completando este código de exemplo.

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)
Editar e Executar Código