Prompt engineering is the practice of designing and structuring the text instructions given to a large language model to produce more accurate, relevant, and usable outputs for specific tasks.
Last reviewed: 2026/05/19
The context window is the maximum amount of text — measured in tokens — that a large language model can process at one time, determining how much document content, conversation history, and instructions the model can consider when generating a response.
Tech / ModelFine-tuning is the process of further training a pre-trained large language model on a domain-specific dataset to improve its performance on tasks in that domain, such as legal document analysis, contract drafting, or jurisdiction-specific research.
Tech / ModelA large language model (LLM) is an AI system trained on large volumes of text data to predict and generate human-like text; it serves as the core engine underlying most legal AI tools for research, drafting, and document analysis.
The most expensive legal AI in the market — Am Law 100 firms only.
Thomson Reuters' GPT-backed legal research and drafting with Westlaw integration (relaunched as CoCounsel Legal, 2025).
AI contract drafting and review inside Microsoft Word for transactional lawyers.
AI-powered legal research with citation-validated answers from Westlaw.
Purpose-built US legal AI covering research, drafting, and compliance.
Move from this definition to role-based legal AI shortlists and the selection criteria that matter for each type of legal team.
Am Law 200 and global firm workflows: accuracy at scale, security compliance, and matter-level auditability.
60 legal AI tools vetted for the solo lawyer: tight budget, no IT team, billable-hours pressure.
Reviews built for 2–20 attorney firms: collaborative workflows, mid-range budgets, limited IT overhead.
Last reviewed: 2026/05/19. Definitions are written by the LawyerAI Editorial team. Commercial relationships are disclosed and do not determine editorial scores or conclusions. See our Sponsorship & Affiliate Disclosure.
Prompt engineering is the practice of designing and structuring the text instructions given to a large language model to produce more accurate, relevant, and usable outputs for specific tasks.
Legal professionals using AI tools are, whether they recognize it or not, engaged in prompt engineering. How a lawyer phrases a question to a legal research AI significantly affects the quality and relevance of the output. The same tool can produce a thorough, well-organized summary of circuit court positions on a legal standard, or a vague and incomplete answer — depending on how the query is structured.
Effective prompt engineering for legal tasks involves specifying the jurisdiction, the relevant legal standard, the format desired, the depth of analysis required, and any constraints (such as "only cite federal circuit cases from the past ten years"). A vague prompt produces a vague answer; a specific, well-structured prompt narrows the model's response to the specific task.
For law firms deploying AI tools at scale, prompt engineering becomes an institutional capability. Firms building internal AI workflows develop prompt templates for common tasks — due diligence checklists, brief section drafts, client correspondence — that encode the task requirements in a standardized, reusable format. This reduces variation in output quality across users and matters.
Prompt engineering is also how AI vendors structure their tools internally: the system prompt that shapes how the AI responds to any user query is itself an engineering artifact that significantly determines the tool's effective behavior.
Legal AI tools manage the prompt engineering burden in different ways. Some tools — like Harvey AI and CoCounsel — provide structured interfaces that guide users through specifying task parameters, reducing the need for the lawyer to craft their own prompts from scratch. Others present a general-purpose chat interface that requires more user-side prompt skill to use effectively.
Tools designed for specific workflows (contract review, legal research, brief drafting) typically incorporate task-specific system prompts that configure the model's behavior before the user's query is processed. The user sees a clean interface; the underlying system prompt is doing substantial work to shape the output.
Spellbook, embedded in Microsoft Word, uses context from the document being drafted to augment user prompts — providing the model with the relevant contract text alongside the user's editing instruction. This context-augmentation is a form of prompt engineering built into the tool's architecture.
Understanding that prompt quality affects output quality helps lawyers use any AI tool more effectively, regardless of how much of the engineering is handled by the tool's interface.