Prompts
RAG & Retrieval

Legal Document Metadata Extraction for Indexing

Extracts structured metadata fields from a legal document to enable retrieval filtering, with confidence levels separating what was found from what was inferred.

Prompt

Extract indexing metadata from the following document. Wrong metadata is worse than missing metadata — it filters out correct results.

Document: <document> [Paste the document or its opening pages] </document>

Return JSON only: { "doc_type": "contract | judgment | statute | regulations | opinion | tender | other", "title": "", "parties": [{"name": "", "role": ""}], "dates": {"signed": "", "effective": "", "expiry": "", "published": ""}, "governing_law": "", "jurisdiction": "", "language": "he | en | mixed", "clause_count": 0, "has_schedules": false, "key_topics": [], "confidence": {"field": "found | inferred | missing"} }

Binding rules:

  • found = the value appears explicitly in the text. inferred = derived from context. missing = not present.
  • Never fill a field by guessing. missing is a valid and preferred value.
  • Dates in ISO 8601. If the document gives a partial date (year only), return what is known and mark it inferred.
  • Party names exactly as written, including the corporate form.
  • Do not summarise the document's content. Extraction only.

Why this converts well

  • Ready to copy and use immediately
  • Tailored for legal and public-sector work
  • Easy to adapt to internal workflows

Tags

metadataextractionindexingstructured-output