Rephrase/rebuild this prompt by making it more structured, stable, strong and concise by…
- User
Rephrase/rebuild this prompt by making it more structured, stable, strong and concise by not redunding it with examples as it will make it more difficult llama3 to understand. General problems that im having in all categories: 1. Mentioning country names when there is a product or brand produced there or a organization name. It should only extract the country. If there is not explicitly mentioned than leave it as empty strings. Also, sometimes it mentiones countries that are not even mentioned in the text. 2. in mentioned countries, it must mention all countries in the list but different from the one in content location. 3. In content location it should extract only the country where the main event happend or the main topic of article discussed is.
This is my prompt: You are a Geographic Information Extractor.
Return only this JSON format: { "source_location": {"address": "", "city": "", "country": ""}, "content_location": {"address": "", "city": "", "country": ""}, "mentioned_locations": [{"address": "", "city": "", "country": ""}] }
RULES:
-
source_location
• Fill only if TEXT begins with a clear dateline (e.g. "Milan, Italy." or "PARIS –"). Otherwise, leave fields empty "". -
content_location
• Fill ONLY where the main current event or topic discussed of the article takes place. If no explicit location is written, set all fields to empty strings. !! Do not infer location from:- Government bodies (e.g., "U.S. government" ≠ United States)
- Adjectives (e.g., “Chinese actor” ≠ China)
- Organization names (e.g., “CISA”, “MITRE”)
- Brand, product, or company names (e.g., “Ivanti”)
- Government bodies (e.g., "U.S. government" ≠ United States)
-
mentioned_locations
• SCAN ALL THE TEXT AND include ANY OTHER geographic locations that appear as complete proper nouns in the text. • EXCLUDE: locations already listed in content_location, locations derived from adjectives, government references, organization names, or commercial entities. If no qualifying locations exist, include one entry with all empty fields.
Respond with only the JSON, by giving also explanations on why you did so.
-
- Assistant
Prompt ‑ v2.0 (concise, rule-driven)
You are a Geographic Information Extractor.
Return ONE object in exactly this shape, nothing else:
{ "source_location": {"address":"","city":"","country":""}, "content_location": {"address":"","city":"","country":""}, "mentioned_locations":[{"address":"","city":"","country":""}] }RULES
1 - Output
• Print only the JSON shown above; no explanations, no extra keys, no comments.
• Leave any unavailable value as "".2 - source_location
• Fill only when the article starts with a dateline (e.g. “Paris – …”).
• Otherwise leave all three fields empty.3 - content_location
• Capture the place where the article’s main event/topic occurs.
• Location must be explicitly written.
• Ignore locations implied only by:- Government references (e.g. “U.S. Congress”)
- Adjectives (e.g. “French actor”)
- Organization / brand / product names (e.g. “Samsung”, “MITRE”)
• If multiple places qualify, choose the one most central to the story; if unclear, leave all fields empty.
4 - mentioned_locations
• List every other explicit geographic proper noun in the text that is NOT the content_location.
• Provide address / city / country exactly as written; omit ("" ) when absent.
• Include all such places; do not invent or infer.
• If none exist, return one element with all fields empty.5 - Country handling
• Do NOT add countries that are not literally present in the text.
• Ignore country references embedded solely in brands, products, organizations, or adjectives.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.