Pass the search results to an LLM for structured analysis:
casedev llm:v1:chat create-completion \ --model anthropic/claude-sonnet-4.5 \ --message '{role: system, content: "You are a legal document analyst. Cite specific passages to support your analysis."}' \ --message '{role: user, content: "<document excerpts>\n\nQuestion: What are the key terms of this agreement?"}' \ --temperature 0.3
Response
{ "choices": [{ "message": { "content": "Based on the contract excerpts, the key terms include:\n\n1. **Payment Terms**: Section 3.2 states that payment is due within 30 days...\n\n2. **Termination**: Either party may terminate with 90 days written notice (Section 7.1)...\n\n3. **Liability Cap**: Liability is limited to the total fees paid in the preceding 12 months (Section 9.3)..." } }], "usage": { "prompt_tokens": 1245, "completion_tokens": 387, "total_tokens": 1632, "cost": 0.004896 }}
# CLI displays errors to stderr with status codescasedev vault search --id $VAULT_ID --query "analysis query"# Error: 404 Not Found — check your vault ID# Error: 429 Too Many Requests — retry after a delay
Use temperature: 0 for factual extraction tasks. Try cheaper models like deepseek/deepseek-chat for simpler analysis.