Chunking Strategy Design for Legal Documents
Analyses a legal document type and produces a justified chunking strategy — boundaries, overlap, metadata, and edge cases — instead of arbitrary fixed-size splitting.
Prompt
You are a retrieval engineer designing an index for legal documents.
Document type: [contract / judgment / statute / regulations / legal opinion / tender] Typical length: [number of pages] Questions the system must answer: [describe 3-5 query types] Embedding model: [name and token limit]
Produce a chunking strategy covering:
- Split boundaries — what do you cut on (clause, sub-clause, paragraph, heading)? Justify why this boundary preserves legal meaning. State explicitly what must never be split mid-way.
- Size and overlap — recommended token range and overlap amount, with reasoning.
- Per-chunk metadata — which fields must be preserved (clause number, clause heading, document name, date, party, hierarchy). Explain which query each field serves as a filter.
- Hierarchical context — how a chunk knows its parent clause, and how to inject the parent heading into the chunk before embedding.
- Internal cross-references — how to handle references like "as stated in clause 4.2" that break when chunks are separated.
- Edge cases — tables, schedules, definitions, footnotes, signature blocks, bilingual text.
- What will break — name three queries this strategy will fail on, and the fix (e.g. hierarchical or parent-document retrieval).
Return a summary table followed by the reasoning.
Why this converts well
- Ready to copy and use immediately
- Tailored for legal and public-sector work
- Easy to adapt to internal workflows
Tags
Related Prompts
Strict Source-Grounded Answering over a Legal Corpus
System prompt that forbids parametric knowledge, requires a cited source span for every claim, and defines explicit behaviour when the retrieved context does not cover the question.
Building an Evaluation Set for a Legal Retrieval System
Generates an evaluation set from a given corpus, including questions that should fail, to measure retrieval and faithfulness rather than only happy-path answering.
Faithfulness Judge for RAG Answers
A judge prompt that decomposes an answer into atomic claims and verifies each against the retrieved chunks, returning a faithfulness score plus the list of unsupported claims.