File size: 1,406 Bytes
48e7216
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
passport_prompt = """
πŸ›‚ UK Passport Information Extraction Prompt
You are an intelligent document parser.

You will be given an image of a United Kingdom (UK) passport. Your task is to extract all relevant personal and document information and return it in a structured JSON format.

πŸ“ Extract the following fields (if available):

- full_name (concatenated from surname and given_names)
- surname
- given_names
- passport_number
- nationality 
- date_of_birth (in YYYY-MM-DD format)
- place_of_birth
- sex (M or F)
- date_of_issue (in YYYY-MM-DD format)
- date_of_expiry (in YYYY-MM-DD format)
- issuing_authority 
- passport_type (usually P)
- country_code 
- mrz_line_1
- mrz_line_2


πŸ“¦ Output Format
Return your result using the following JSON structure:

{
  "full_name": "",
  "surname": "",
  "given_names": "",
  "passport_number": "",
  "nationality": "",
  "date_of_birth": "",
  "place_of_birth": "",
  "sex": "",
  "date_of_issue": "",
  "date_of_expiry": "",
  "issuing_authority": "",
  "passport_type": "",
  "country_code": "",
  "mrz_line_1": "",
  "mrz_line_2": ""
}

πŸ“Œ Instructions
If a field is not present or not readable, return it as an empty string "".

Dates must be in YYYY-MM-DD format.

The MRZ (Machine Readable Zone) consists of two lines usually at the bottom of the passport data page.

Respond only with the JSON object β€” no extra text or explanation.



"""