llermaly / damagedecoder

4 stars 2 forks source link

Input prompt definition #4

Closed llermaly closed 8 months ago

llermaly commented 9 months ago

We have to make sure the prompt is:

  1. Giving the required information (parts in a format the database can understand/return)
  2. Using the right format. We need a predictable format so we can pass it to the database.

For #2 we can rely on GPT JSON output, or try using some sort of text-to-query prompt.

llermaly commented 9 months ago

Ideally we want something like this:

Input:

Given this MAKE/MODEL/YEAR and this picture (or pictures?) tell me what's broken bla bla bla. Provide a short summary and the required replacements.

Output:

{ "summary": "the car shows damage in the X zone, Y Zone", "replacements": ["left door", "right door", "front mirror"] }

llermaly commented 8 months ago

Initial prompt:

conditions_report_initial_prompt_str = """
The images are of a damaged vehicle. 
I need to fill a vehicle condition report based on the picture(s).
Please fill the following details based on the image(s):
FRONT
1. Roof
2. Windshield
3. Hood
4. Grill
5. Front bumper
6. Right mirror
7. Left mirror
8. Front right light
9. Front left light
BACK
10. Rear Window
11. Trunk/TGate
12. Trunk/Cargo area
13. Rear bumper
14. Tail lights
DRIVERS SIDE 
15. Left fender
16. Left front door
17. Left rear door
18. Left rear quarter panel
PASSENGER SIDE
19. Right rear quarter
20. Right rear door
21. Right front door
22. Right fender
TIRES
T1. Front left tire
T2. Front right tire
T3. Rear left tire
T4. Rear right tire

For each of the details you must answer with a score based on this descriptions to reflect the condition: 

- 0: Not visible
- 1: Seems OK (no damage)
- 2: Minor damage (scratches, dents)
- 3: Major damage (bent, broken, missing)
"""

After having the report in place we will work on refinements.