AI-assisted practical guide. Examples are hypothetical; these are proposed editorial methods, not reported research results.
Extracting structured address data from messy, unstructured notes requires a prompt that prioritizes accuracy over completion. When working with fictional notes, AI often attempts to hallucinate missing zip codes or street numbers to make an address look standard. To prevent this, you must explicitly instruct the model to retain incomplete entries exactly as they appear in the source text.
Prompting for Strict Extraction
To achieve a clean separation, use a prompt that defines the desired output format and sets a boundary against guessing. You might suggest that the AI identify the street, city, and state as separate fields while maintaining the original phrasing. Instruct the model to leave a field blank or use a specific placeholder if the information is missing. This can help prevent the AI from filling in gaps based on patterns it recognizes from real-world geography. Emphasize that the goal is data extraction, not data enrichment.
Hypothetical example
Imagine you have a note that says: Meeting with J. Doe at 452 Maple Ave, Springfield. Also need to visit the bakery on Oak Street in Riverton.
A usable prompt would be: Extract all addresses from the following text into a list. Provide the street, city, and state. If a piece of information is missing, leave it blank. Do not guess or add missing details.
The fictional output would look like this: Entry 1: Street: 452 Maple Ave, City: Springfield, State: [Blank] Entry 2: Street: Oak Street, City: Riverton, State: [Blank]
In this case, the AI correctly identifies that the state is missing for both entries and avoids inventing a state like Massachusetts or Ohio.
Handling Ambiguity and Verification
The most difficult cases occur when a note contains fragments that look like addresses but are actually descriptions, such as a mention of a general region or a landmark. To handle this, suggest that the AI only extract strings that contain a specific street indicator. If the AI is unsure, you can ask it to flag the entry as uncertain rather than forcing it into a structured format.
Once the AI provides the list, perform a final check by comparing the extracted fields against the original notes. Look specifically for any words or numbers in the output that do not exist in the source text. If the AI added a zip code or a house number that was not in the original fictional note, the prompt requires more restrictive language regarding hallucinations. Your final deliverable is successful only if every character in the extracted address can be traced back to the original unstructured text.