Parse a title that contains a comma

Watch short identifiers, spaces and punctuation. · 180 words

Begin with punctuation as evidence, not an automatic split. A library record says: full_title = "The Blue Hour, Poems by Sam Reed"; creator = "Sam Reed"; resource_type = "poetry collection"; subtitle = "Poems by Sam Reed". The comma marks a likely boundary, and the matching subtitle field confirms it. A useful prompt names source fields, requests a structured result, and preserves the original string: "Parse full_title into title and subtitle using the subtitle field. Return title, subtitle, full_title, and evidence. Do not rewrite words or invent punctuation."

The result is title = "The Blue Hour"; subtitle = "Poems by Sam Reed"; full_title = "The Blue Hour, Poems by Sam Reed"; evidence = "the subtitle field exactly matches the text after the comma." Check it by joining title + ", " + subtitle and confirming that the result equals full_title. The creator field is only a check, not part of the subtitle. This test catches dropped commas, swapped parts, and added words. If the subtitle field were blank or conflicted with full_title, the model should report the conflict rather than guess.

Check your recall

What are the parsed title and subtitle, and which source field verifies the split?

Check your answer

The title is "The Blue Hour" and the subtitle is "Poems by Sam Reed." The catalog subtitle field verifies the split because it exactly matches the text after the comma.

Sources and credits

Original KeyTouch lesson. Background reading · DAIR.AI · Examples of Prompts.