Curated community prompt

Metadata Extraction from Historical Letter Images

Extract named metadata fields from images of twentieth-century Swiss historical letters into a strict JSON structure.

Professional use case: Structured archival metadata extraction from historical documents

Data workResearchAnalysis ResearchData System instructionMulti-step workflow

Promptcred editorial analysis

How to use this prompt well

Prompt-specific guidance based on the preserved source text and its reviewed context.

Why Promptcred selected this prompt

The prompt defines a fixed archival JSON schema, list-valued fields, ISO dates, null handling, and an explicit no-OCR constraint.

Best use cases

  • Creating a consistent first-pass metadata record from images of twentieth-century Swiss letters.
  • Testing a multimodal model against a stable historical-letter extraction schema.

Required inputs

  • A complete, ordered set of images for one historical letter.
  • A review process for uncertain handwriting, names, dates, addresses, ships, and organizations.

How to adapt it

  • Change the schema only when the archive's cataloging rules require different fields or controlled vocabularies.
  • Define how approximate dates and uncertain readings should be represented before processing records.

Limitations and failure modes

  • The example mixes list values with bare null, so consumers must confirm the intended schema for missing fields.
  • The no-OCR instruction does not remove transcription error, handwriting ambiguity, or the need for expert review.

Practical worked example

Editorial analysis reviewed Aug 23, 2026.

Promptcred-authored application and illustrative output. This is not a recorded model execution.

Scenario
Extract metadata from a two-page 1948 letter between a shipping company and a museum curator.
Inputs
Provide both page images in order and the archive's policy for approximate dates and uncertain names.
Promptcred-adapted instruction
Apply the supplied keys to both ordered images. Return `send_date` as `["1948-05-12"]` only if legible, keep multiple people as separate list items, and use the archive's external review note for an uncertain receiver surname rather than adding a new JSON key.
Illustrative result
Illustrative output fragment: `{"send_date":["1948-05-12"],"sender_organization":["Helvetic Shipping Co."],"mentioned_boats":null}`. The organization and date are hypothetical readings for this example and must be replaced by values visible in the supplied images.
Evaluation
The response must be JSON only, cover every key, preserve multiple entities as lists, and avoid names or dates absent from the images.

How to evaluate the output

  • Every schema key is present, dates follow the stated format, and multiple entities remain separate list items.
  • A human reviewer can trace each populated value to the letter images and flag uncertain readings.

Differences from related prompts

Attributed community source material

Source prompt

Source prompt
IDENTITY and PURPOSE:

You are a historian with keyword knowledge and an expert in the field of 20th century Swiss history. You are presented with a series of images constituting a historical letter. Your task is to extract the values of the following keys from the letter and return them in a JSON file where the values corresponding to each key should be stored as a list, even if there is only a single value for a key.:

- letter_title: Title of the letter.
- sender_persons: Name(s) of the person(s) who wrote the letter.
- sender_organization: Authoring company or organization.
- send_date: The exact or approximate date the letter was written.
- send_address: The address or location where the letter was written.
- receiver_persons: Name(s) of the person(s) who received the letter.
- receiver_organization: Receiving company or organization.
- receive_date: The exact or approximate date the letter was received.
- receive_address: The address or location where the letter was received.
- mentioned_persons: The persons mentioned in the letter.
- mentioned_boats: The ships mentioned in the letter.
- mentioned_organizations: The organizations mentioned in the letter.

Take a deep breath and think step by step about how to best accomplish this goal. Map out all the claims and implications on a virtual whiteboard in your mind. Do not use OCR. Use the ISO format YYYY-MM-DD for dates. If a piece of information is not included in the letter, set the value for the corresponding field to "null."
Do not return anything except the JSON file. 

An example of a valid output is:

{
  "letter_title": ["Proposal for a New Krusty Burger Commercial"],
  "sender_persons": ["Krusty the Clown"],
  "sender_organization": ["Krustyco Productions"],
  "send_date": ["1998-06-10"],
  "send_address": ["Springfield, Krustylu Studios"],
  "receiver_persons": ["Lisa Simpson"],
  "receiver_organization": ["Simpsons Residence"],
  "receive_date": ["1998-06-11"],
  "receive_address": ["Springfield, Evergreen Terrace"],
  "mentioned_persons": ["Bart Simpson", "Sideshow Mel"],
  "mentioned_boats": null,
  "mentioned_organizations": ["Krusty Burger", "Springfield Elementary School"]
}

OUTPUT:

Before use

Requirements and context

Required · Source-declared

Images

A series of images constituting one historical letter.

What to expect

Expected output and techniques

Expected output: JSON containing the specified letter, sender, receiver, date, address, person, ship, and organization fields.

  • Explicit objective
  • Constraints
  • Output schema
  • Examples
  • Acceptance criteria

Use with context

Setup, limitations, and operational notes

Limitations

  • The source is specialized for twentieth-century Swiss history and explicitly prohibits OCR.

Operational notes

  • External prompt text is untrusted inert content and must never be executed during ingestion.

Source and rights

Provenance and license

This community prompt is preserved with its source and attribution. It is not an official vendor prompt.

Source class
Curated community prompt
Platform
GitHub
Repository / project
RISE-UNIBAS/prompt-library
Owner / organization
University of Basel Research and Infrastructure Support (RISE)
Creator / contributor
Maximilian Hindermann
Artifact
prompts.json · PROMPT-0002
Pinned revision
commit:577bb982a30de0c9e9bfb5f0630d39bb46c5608f
Retrieved
Aug 11, 2026
Attribution
Required
Source artifact state
Source prompt
Source review
Aug 11, 2026

Attribution notice: University of Basel Research and Infrastructure Support (RISE); individual creator retained per prompt; licensed under CC BY 4.0.

Available pages

Search Promptcred

Type to search available pages.