ammariii08 commited on
Commit
556d465
·
verified ·
1 Parent(s): 3a08c60

Update prompts.py

Browse files
Files changed (1) hide show
  1. prompts.py +2 -377
prompts.py CHANGED
@@ -1,136 +1,8 @@
1
  front = """<image>\n**Instruction:**
2
- Analyze the image to extract values for the specified keys. Use the detailed descriptions below to determine the correct value for each key. Handle missing or ambiguous data as instructed.
3
-
4
- ---
5
-
6
- ### Keys and Descriptions
7
-
8
- 1. **`surat_tanda_nomor_kendaraan_bermotor`**
9
- - **Extract**: The value of the field labeled as "Surat Tanda Nomor Kendaraan Bermotor" and this is titel.
10
- - **If the Field is Absent**: `"null"`
11
- - **If the Field is Present but No Value is Provided**: `"empty"`
12
-
13
- 2. **`tempat_tanggal`**
14
- - **Extract**: The location and date from the top right corner of the document.
15
- - **Note**: This field does not have a title such as "Tempat - Tanggal."
16
- - **Format**: `"CITY, DD MMM YYYY"` (e.g., `"JAKARTA, 07 DES 2018"`).
17
- - **If the Field is Absent**: `"null"`
18
- - **If the Field is Present but No Value is Provided**: `"empty"`
19
-
20
- 3. **`no`**
21
- - **Extract**: The value in the "NO" field.
22
- - **If the Field is Absent**: `"null"`
23
- - **If the Field is Present but No Value is Provided**: `"empty"`
24
-
25
- 4. **`nomor_registrasi`**
26
- - **Extract**: The "NOMOR REGISTRASI" field.
27
- - **If the Field is Absent**: `"null"`
28
- - **If the Field is Present but No Value is Provided**: `"empty"`
29
-
30
- 5. **`nama_pemilik`**
31
- - **Extract**: The "NAMA PEMILIK" field.
32
- - **If the Field is Absent**: `"null"`
33
- - **If the Field is Present but No Value is Provided**: `"empty"`
34
-
35
- 6. **`alamat`**
36
- - **Extract**: The "ALAMAT" field.
37
- - **If the Field is Absent**: `"null"`
38
- - **If the Field is Present but No Value is Provided**: `"empty"`
39
-
40
- 7. **`merk`**
41
- - **Extract**: The "MERK" field.
42
- - **If the Field is Absent**: `"null"`
43
- - **If the Field is Present but No Value is Provided**: `"empty"`
44
-
45
- 8. **`type`**
46
- - **Extract**: The "TYPE" field.
47
- - **If the Field is Absent**: `"null"`
48
- - **If the Field is Present but No Value is Provided**: `"empty"`
49
-
50
- 9. **`jenis`**
51
- - **Extract**: The "JENIS" field.
52
- - **If the Field is Absent**: `"null"`
53
- - **If the Field is Present but No Value is Provided**: `"empty"`
54
-
55
- 10. **`model`**
56
- - **Extract**: The "MODEL" field.
57
- - **If the Field is Absent**: `"null"`
58
- - **If the Field is Present but No Value is Provided**: `"empty"`
59
-
60
- 11. **`tahun_pembuatan`**
61
- - **Extract**: The "TAHUN PEMBUATAN" field.
62
- - **If the Field is Absent**: `"null"`
63
- - **If the Field is Present but No Value is Provided**: `"empty"`
64
-
65
- 12. **`isi_silinder_daya_listrik`**
66
- - **Extract**: The "ISI SILINDER / DAYA LISTRIK" field.
67
- - **If the Field is Absent**: `"null"`
68
- - **If the Field is Present but No Value is Provided**: `"empty"`
69
-
70
- 13. **`nomor_rangka`**
71
- - **Extract**: The "NOMOR RANGKA" field.
72
- - **If the Field is Absent**: `"null"`
73
- - **If the Field is Present but No Value is Provided**: `"empty"`
74
-
75
- 14. **`nomor_mesin`**
76
- - **Extract**: The "NOMOR MESIN" field.
77
- - **If the Field is Absent**: `"null"`
78
- - **If the Field is Present but No Value is Provided**: `"empty"`
79
-
80
- 15. **`nik_tdp_nie_kitas_kitap`**
81
- - **Extract**: The "NIK/TDP/NIE/KITAS/KITAP" field.
82
- - **If the Field is Absent**: `"null"`
83
- - **If the Field is Present but No Value is Provided**: `"empty"`
84
-
85
- 16. **`warna`**
86
- - **Extract**: The "WARNA" field.
87
- - **If the Field is Absent**: `"null"`
88
- - **If the Field is Present but No Value is Provided**: `"empty"`
89
-
90
- 17. **`bahan_bakar`**
91
- - **Extract**: The "BAHAN BAKAR" field.
92
- - **If the Field is Absent**: `"null"`
93
- - **If the Field is Present but No Value is Provided**: `"empty"`
94
-
95
- 18. **`warna_tnkb`**
96
- - **Extract**: The "WARNA TNKB" field.
97
- - **If the Field is Absent**: `"null"`
98
- - **If the Field is Present but No Value is Provided**: `"empty"`
99
-
100
- 19. **`tahun_registrasi`**
101
- - **Extract**: The "TAHUN REGISTRASI" field.
102
- - **If the Field is Absent**: `"null"`
103
- - **If the Field is Present but No Value is Provided**: `"empty"`
104
-
105
- 20. **`nomor_bpkb`**
106
- - **Extract**: The "NOMOR BPKB" field.
107
- - **If the Field is Absent**: `"null"`
108
- - **If the Field is Present but No Value is Provided**: `"empty"`
109
-
110
- 21. **`kode_lokasi`**
111
- - **Extract**: The "KODE LOKASI" field.
112
- - **If the Field is Absent**: `"null"`
113
- - **If the Field is Present but No Value is Provided**: `"empty"`
114
-
115
- 22. **`no_urut_pendaftaran`**
116
- - **Extract**: The "NO URUT PENDAFTARAN" field.
117
- - **If the Field is Absent**: `"null"`
118
- - **If the Field is Present but No Value is Provided**: `"empty"`
119
-
120
- 23. **`berlaku_sampai`**
121
- - **Extract**: The "BERLAKU SAMPAI" field.
122
- - **If the Field is Absent**: `"null"`
123
- - **If the Field is Present but No Value is Provided**: `"empty"`
124
- 24. **`qr_code`**
125
- - **Extract**: The value encoded in the QR code, if present.
126
- - **If No QR Code is Found**: `"null"`
127
- - **If a QR Code is Present but Contains No Data**: `"empty"`
128
-
129
  ---
130
 
131
  ### Output Format
132
-
133
- ```json
134
  {
135
  "surat_tanda_nomor_kendaraan_bermotor": "<value> OR empty OR null",
136
  "tempat_tanggal": "<value> OR empty OR null",
@@ -157,252 +29,13 @@ Analyze the image to extract values for the specified keys. Use the detailed des
157
  "berlaku_sampai": "<value> OR empty OR null"
158
  "qr_code" : "<value> OR empty OR null"
159
  }
160
- Return Output:
161
- Generate a JSON object:
162
- {
163
- "output JSON": "key-value pairs"
164
- }
165
- ---
166
  """
167
 
168
  back = """<image>\n**Instruction:**
169
- Analyze the image to extract values for the specified keys. Use the detailed descriptions below to determine the correct value for each key. Handle missing or ambiguous data as instructed.
170
-
171
- ---
172
- ### Keys and Descriptions
173
-
174
- 1. **`Surat Ketetapan Kewajiban Pembayaran PKB/BBNKB,SWDKLLJ DAN PNBP`**
175
- - **Extract**: The value of the field is"Surat Ketetapan Kewajiban Pembayaran PKB/BBNKB, SWDKLLJ DAN PNBP" and this is title.
176
- - **If the Field is Present** : "present"
177
- - **If the Field is Absent**: `"null"`
178
-
179
- 2. **`nomor_registrasi`**
180
- - **Extract**: The "NOMOR REGISTRASI" field.
181
- - **If the Field is Absent**: `"null"`
182
- - **If the Field is Present but No Value is Provided**: `"empty"`
183
-
184
- 3. **`nama_pemilik`**
185
- - **Extract**: The "NAMA PEMILIK" field.
186
- - **If the Field is Absent**: `"null"`
187
- - **If the Field is Present but No Value is Provided**: `"empty"`
188
-
189
-
190
- 4. **`alamat`**
191
- - **Extract**: The "ALAMAT" field and this is address may contain 1 or more lines format : "BUNTET PESANTREN RT/RW/015/005 DESA MERTAPADA
192
- KULON KEC. ASTANAJAPURA KAB.CIREBON ".
193
- - **If the Field is Absent**: `"null"`
194
- - **If the Field is Present but No Value is Provided**: `"empty"`
195
-
196
- 5. **`merk/type`**
197
- - **Extract**: The "MERK/TYPE" field.
198
- - **If the Field is Absent**: `"null"`
199
- - **If the Field is Present but No Value is Provided**: `"empty"`
200
-
201
-
202
- 6. **`jenis/model`**
203
- - **Extract**: The "JENIS/MODEL" field.
204
- - **If the Field is Absent**: `"null"`
205
- - **If the Field is Present but No Value is Provided**: `"empty"`
206
-
207
- 7. **`tahun_pembuatan`**
208
- - **Extract**: The "TAHUN PEMBUATAN/PERAKITAN" field.
209
- - **If the Field is Absent**: `"null"`
210
- - **If the Field is Present but No Value is Provided**: `"empty"`
211
-
212
- 8. **`warna_kb`**
213
- - **Extract**: The "WARNA KB" field.
214
- - **If the Field is Absent**: `"null"`
215
- - **If the Field is Present but No Value is Provided**: `"empty"`
216
-
217
- 9. **`isi_silinder`**
218
- - **Extract**: The "ISI SILINDER/HP" field.
219
- - **If the Field is Absent**: `"null"`
220
- - **If the Field is Present but No Value is Provided**: `"empty"`
221
-
222
- 10. **`nomor_rangka`**
223
- - **Extract**: The "NOMOR RANGKA/NIK" field.
224
- - **If the Field is Absent**: `"null"`
225
- - **If the Field is Present but No Value is Provided**: `"empty"`
226
-
227
- 11.**`nomor_mesin`**
228
- - **Extract**: The "NOMOR MESIN" field.
229
- - **If the Field is Absent**: `"null"`
230
- - **If the Field is Present but No Value is Provided**: `"empty"`
231
-
232
- 12. **`no_bpkp`**
233
- - **Extract**: The "NO BPKB" field.
234
- - **If the Field is Absent**: `"null"`
235
- - **If the Field is Present but No Value is Provided**: `"empty"`
236
-
237
-
238
- 13. **`berlaku s/d`**
239
- - **Extract**: The "BERLAKU S/D" field.
240
- - **If the Field is Absent**: `"null"`
241
- - **If the Field is Present but No Value is Provided**: `"empty"`
242
-
243
-
244
- 14. **`bahan_bakar`**
245
- - **Extract**: The "BAHAN BAKAR" field.
246
- - **If the Field is Absent**: `"null"`
247
- - **If the Field is Present but No Value is Provided**: `"empty"`
248
-
249
-
250
- 15. **`warna_tnkb`**
251
- - **Extract**: The "WARNA TNKB" field.
252
- - **If the Field is Absent**: `"null"`
253
- - **If the Field is Present but No Value is Provided**: `"empty"`
254
-
255
-
256
- 16. **`kepemilikan_ke`**
257
- - **Extract**: The "KEPEMILIKAN KE" field.
258
- - **If the Field is Absent**: `"null"`
259
- - **If the Field is Present but No Value is Provided**: `"empty"`
260
-
261
- 17. **`no_registrasi_lama`**
262
- - **Extract**: The "NO REGISTRASI LAMA" field.
263
- - **If the Field is Absent**: `"null"`
264
- - **If the Field is Present but No Value is Provided**: `"empty"`
265
-
266
- 18. **`kode_njkb`**
267
- - **Extract**: The "KODE NJKB" field.
268
- - **If the Field is Absent**: `"null"`
269
- - **If the Field is Present but No Value is Provided**: `"empty"`
270
-
271
- 19. **`no`**
272
- - **Extract**: The "NO." field.
273
- - **If the Field is Absent**: `"null"`
274
- - **If the Field is Present but No Value is Provided**: `"empty"`
275
-
276
- 20.**`asal_daerah`**
277
- - **Extract**: The "ASAL DAERAH" field.
278
- - **If the Field is Absent**: `"null"`
279
- - **If the Field is Present but No Value is Provided**: `"empty"`
280
-
281
- 21. **`no_urut`**
282
- - **Extract**: The "NO. URUT" field.
283
- - **If the Field is Absent**: `"null"`
284
- - **If the Field is Present but No Value is Provided**: `"empty"`
285
-
286
- 22. **`no_kohir`**
287
- - **Extract**: The "NO. KOHIR" field.
288
- - **If the Field is Absent**: `"null"`
289
- - **If the Field is Present but No Value is Provided**: `"empty"`
290
-
291
- 23. **`nik_no.hp`**
292
- - **Extract**: The "NIK/NO.HP" field.
293
- - **If the Field is Absent**: `"null"`
294
- - **If the Field is Present but No Value is Provided**: `"empty"`
295
-
296
- 24. **`pkok_bbnkb`**
297
- - **Extract**: The "PKOK BBNKB" field.
298
- - **If the Field is Absent**: `"null"`
299
- - **If the Field is Present but No Value is Provided**: `"empty"`
300
-
301
- 25. **`pkok_pkb`**
302
- - **Extract**: The "POKOK PKB" field.
303
- - **If the Field is Absent**: `"null"`
304
- - **If the Field is Present but No Value is Provided**: `"empty"`
305
-
306
- 26. **`pkok_swdkljj`**
307
- - **Extract**: The "POKOK SWDKLJJ" field.
308
- - **If the Field is Absent**: `"null"`
309
- - **If the Field is Present but No Value is Provided**: `"empty"`
310
-
311
- 27. **`pkok_penerbitan_stnk`**
312
- - **Extract**: The "POKOK PENERBITAN STNK" field.
313
- - **If the Field is Absent**: `"null"`
314
- - **If the Field is Present but No Value is Provided**: `"empty"`
315
-
316
- 28. **`pkok_penerbitan_tnkb`**
317
- - **Extract**: The "POKOK PENERBITAN TNKB/NRKB PILIHAN" field.
318
- - **If the Field is Absent**: `"null"`
319
- - **If the Field is Present but No Value is Provided**: `"empty"`
320
-
321
- 29. **`pkok_jumlah`**
322
- - **Extract**: The "POKOK JUMLAH" field.
323
- - **If the Field is Absent**: `"null"`
324
- - **If the Field is Present but No Value is Provided**: `"empty"`
325
-
326
- 30. **`sanksi_adm_bbnkb`**
327
- - **Extract**: The "SANKSI ADM BBNKB" field.
328
- - **If the Field is Absent**: `"null"`
329
- - **If the Field is Present but No Value is Provided**: `"empty"`
330
-
331
- 31. **`sanksi_adm_pkb`**
332
- - **Extract**: The "SANKSI ADM PKB" field.
333
- - **If the Field is Absent**: `"null"`
334
- - **If the Field is Present but No Value is Provided**: `"empty"`
335
-
336
- 32. **`sanksi_adm_swdkljj`**
337
- - **Extract**: The "SANKSI ADM SWDKLJJ" field.
338
- - **If the Field is Absent**: `"null"`
339
- - **If the Field is Present but No Value is Provided**: `"empty"`
340
-
341
- 33. **`sanksi_adm_penerbitan_stnk`**
342
- - **Extract**: The "SANKSI ADM PENERBITAN STNK" field.
343
- - **If the Field is Absent**: `"null"`
344
- - **If the Field is Present but No Value is Provided**: `"empty"`
345
-
346
- 34. **`sanksi_adm_penerbitan_tnkb`**
347
- - **Extract**: The "SANKSI ADM PENERBITAN TNKB/NRKB PILIHAN" field.
348
- - **If the Field is Absent**: `"null"`
349
- - **If the Field is Present but No Value is Provided**: `"empty"`
350
-
351
- 35. **`sanksi_adm_jumlah`**
352
- - **Extract**: The "SANKSI ADM JUMLAH " field.
353
- - **If the Field is Absent**: `"null"`
354
- - **If the Field is Present but No Value is Provided**: `"empty"`
355
-
356
- 36. **`jumlah_bbnkb`**
357
- - **Extract**: The "JUMLAH BBNKB" field.
358
- - **If the Field is Absent**: `"null"`
359
- - **If the Field is Present but No Value is Provided**: `"empty"`
360
-
361
- 37. **`jumlah_pkb`**
362
- - **Extract**: The "JUMLAH PKB " field.
363
- - **If the Field is Absent**: `"null"`
364
- - **If the Field is Present but No Value is Provided**: `"empty"`
365
-
366
- 38. **`jumlah_swdkljj`**
367
- - **Extract**: The "JUMLAH SWDKLJJ" field.
368
- - **If the Field is Absent**: `"null"`
369
- - **If the Field is Present but No Value is Provided**: `"empty"`
370
-
371
- 39. **`jumlah_penerbitan_stnk`**
372
- - **Extract**: The "JUMLAH PENERBITAN STNK" field.
373
- - **If the Field is Absent**: `"null"`
374
- - **If the Field is Present but No Value is Provided**: `"empty"`
375
-
376
- 40. **`jumlah_penerbitan_tnkb`**
377
- - **Extract**: The "JUMLAH PENERBITAN TNKB/NRKB PILIHAN" field.
378
- - **If the Field is Absent**: `"null"`
379
- - **If the Field is Present but No Value is Provided**: `"empty"`
380
-
381
- 41. **`jumlah_jumlah`**
382
- - **Extract**: The "JUMLAH JUMLAH" field.
383
- - **If the Field is Absent**: `"null"`
384
- - **If the Field is Present but No Value is Provided**: `"empty"`
385
-
386
- 42. **`ditetapkan_tanggal`**
387
- - **Extract**: The "DITETAPKAN TANGGAL" field.
388
- - **If the Field is Absent**: `"null"`
389
- - **If the Field is Present but No Value is Provided**: `"empty"`
390
-
391
- 43. **`penetapan`**
392
- - **Extract**: The "PENETAPAN" field.
393
- - **If the Field is Absent**: `"null"`
394
- - **If the Field is Present but No Value is Provided**: `"empty"`
395
-
396
- 44. **`kasir`**
397
- - **Extract**: The "KASIR" field.
398
- - **If the Field is Absent**: `"null"`
399
- - **If the Field is Present but No Value is Provided**: `"empty"`
400
-
401
  ---
402
 
403
  ### Output Format
404
-
405
- ```json
406
  {
407
  "Surat_Ketetapan_Kewajiban_Pembayaran_PKB_BBNKB_SWDKLLJ_DAN_PNBP": "present OR null",
408
  "nomor_registrasi": "<value> OR empty OR null",
@@ -449,12 +82,4 @@ KULON KEC. ASTANAJAPURA KAB.CIREBON ".
449
  "penetapan": "<value> OR empty OR null",
450
  "kasir": "<value> OR empty OR null"
451
  }
452
- }
453
- Return Output:
454
- Generate a JSON object:
455
- {
456
- "output JSON": "key-value pairs"
457
- }
458
-
459
-
460
  """
 
1
  front = """<image>\n**Instruction:**
2
+ Analyze the image to extract values for the specified keys in JSON format
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
4
 
5
  ### Output Format
 
 
6
  {
7
  "surat_tanda_nomor_kendaraan_bermotor": "<value> OR empty OR null",
8
  "tempat_tanggal": "<value> OR empty OR null",
 
29
  "berlaku_sampai": "<value> OR empty OR null"
30
  "qr_code" : "<value> OR empty OR null"
31
  }
 
 
 
 
 
 
32
  """
33
 
34
  back = """<image>\n**Instruction:**
35
+ Analyze the image to extract values for the specified keys in JSON format
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  ---
37
 
38
  ### Output Format
 
 
39
  {
40
  "Surat_Ketetapan_Kewajiban_Pembayaran_PKB_BBNKB_SWDKLLJ_DAN_PNBP": "present OR null",
41
  "nomor_registrasi": "<value> OR empty OR null",
 
82
  "penetapan": "<value> OR empty OR null",
83
  "kasir": "<value> OR empty OR null"
84
  }
 
 
 
 
 
 
 
 
85
  """