Assistant
Transform legal workflows with powerful AI-powered reasoning
Harvey’s Assistant API enables powerful legal reasoning over your documents and data. With a single endpoint, you can embed natural language queries, document analysis, and grounded legal insights directly into your applications and workflows.
Overview
The Assistant API provides AI-powered responses to complex legal questions, document analysis, and specialized tasks. Use it to build intelligent legal applications that deliver accurate, context-aware results to your users.
Key Capabilities
- Natural Language Processing: Process complex legal queries with nuanced understanding
- Document Analysis: Extract insights from contracts and legal documents
- Knowledge Grounding: Upload relevant documents to provide context
- Content Generation: Create professional drafts for emails and responses
Use Cases
Use Case 1: Internal Knowledge Chatbot
Challenge: Attorneys often need quick access to firm policies, past contract negotiations, case law, or regulatory updates. Searching through internal databases or asking colleagues takes time and disrupts workflows. By integrating Harvey’s AI into internal chatbots, firms empower attorneys to instantly retrieve relevant legal insights, improving efficiency without sacrificing accuracy.
Solution: Integrate the Assistant API into a secure internal chatbot to return policy guidance, research, and previous work product on demand.
Use Case 2: Self-Serve Legal Guidance
Challenge: Business teams frequently need input on policies, contracts, compliance, and other complex topics. Waiting for expert review slows down workflows and creates bottlenecks.
Solution: Embed the Assistant API in internal tools to offer reliable, policy-grounded answers instantly.
Use Case 3: Drafting Responses to Legal Inquiries
Challenge: Drafting accurate and professional responses for routine legal questions is repetitive and time-consuming.
Solution: Use the Assistant API to generate draft replies to client or internal questions directly within email tools.
Use Case 4: Document Ingestion in ETL Pipelines
Challenge: Manually ingesting and analyzing documents from diverse sources slows down workflows.
Solution: Automate document classification and summarization as part of backend ingestion systems.
Use Case 5: AI-Powered Document Review in Third-Party Platforms
Challenge: Assessing vendor documents for compliance with regulations or internal policies is repetitive and resource-intensive.
Solution: Integrate Harvey with vendor management tools to automatically review documents against internal playbooks.
Best Practices
Optimize Prompts
- Avoid: “Review this contract”
- Use: “Identify and summarize indemnity clauses in this vendor MSA and flag any deviations from our standard policy.”
Stay Within Prompt Limits
If you’re uploading a file, limit the prompt to 4,000 characters. Without a file, prompts can be up to 20,000 characters.
Stream vs. Non-Stream
Set stream: true
if you want to receive partial results as they are generated. Default is false
.
Error Handling
The Assistant API uses standard HTTP status codes. Always check and handle error responses appropriately.
Status Code | Description | Example Error Message |
---|---|---|
200 | Success | N/A |
400 | Bad Request – Invalid parameters | { "error": "Missing prompt parameter" } |
401 | Unauthorized – Invalid API key | { "error": "Invalid API key provided" } |
429 | Too Many Requests – Rate limit exceeded | { "error": "Rate limit exceeded" } |
500 | Internal Server Error | { "error": "An internal error occurred" } |
Need help getting started? Contact your Harvey Customer Success Manager for more information.