contenteaseAI commited on
Commit
de1f012
1 Parent(s): 5d0f9e9

changed prompt

Browse files
Files changed (1) hide show
  1. app.py +56 -44
app.py CHANGED
@@ -37,50 +37,62 @@ def respond(
37
  max_tokens,
38
  ):
39
  SYS_PROMPT = """
40
- Extract the following information from the given text:
41
- Identify the specific areas where the work needs to be done and Add the furniture that has to be changed.
42
- Do not specify the work that has to be done.
43
- Format the extracted information in the following JSON structure:
44
-
45
- {
46
- "Area Type1": {
47
- "Furnture1",
48
- "Furnture2",
49
- ...
50
- }
51
- "Area Type2": {
52
- "Furnture1",
53
- "Furnture2",
54
- ...
55
- }
56
- }
57
-
58
- Requirements:
59
- 1. Each area type (e.g., lobby, bar, etc.) should have its own node.
60
- 3. List the furniture on which the work needs to be performed without specifying the work or units of items.
61
- 4. Ignore any personal information or irrelevant details.
62
- 5. Follow the JSON pattern strictly and ensure clarity and accuracy in the extracted information.
63
-
64
- Example:
65
-
66
- Given the paragraph: "In the lobby, replace 5 light fixtures and remove 2 old carpets. In the bar,
67
- install 3 new tables and remove 4 broken chairs."
68
-
69
- The JSON output should be:
70
- {
71
- "Lobby": {
72
- "Light fixtures"
73
- "Old carpets"
74
- },
75
- "Bar": {
76
- "New tables"
77
- "Broken chairs"
78
- }
79
- }
80
- }
81
-
82
- Please ensure that the output JSON is well-structured and includes only relevant details about the work to be done.
83
- """
 
 
 
 
 
 
 
 
 
 
 
 
84
  messages = [{"role": "system", "content": SYS_PROMPT}]
85
 
86
  if len(history) == 0:
 
37
  max_tokens,
38
  ):
39
  SYS_PROMPT = """
40
+ Extract all relevant keywords and add quantities from the following text and format the result in nested JSON, ignoring personal details and focusing only on the area and furniture items as shown in the example. Each item should have a count, which will be set to 1 for simplicity. The response should be in JSON format only, without any additional comments.
41
+ Good JSON example:{
42
+ "Lobby Area/Entrance": {
43
+ "Vinyl wall covering": 1,
44
+ "Decorative hardwired lighting": 1
45
+ },
46
+ "Lobby": {
47
+ "Carpet, carpet pad, and base": 1,
48
+ "Window treatments": 1,
49
+ "Artwork and decorative accessories": 1,
50
+ "Portable lighting": 1,
51
+ "Upholstered furniture and decorative pillows": 1,
52
+ "Millwork": 1
53
+ }
54
+ }
55
+ Make sure to fetch details from the provided text and ignore unnecessary information. The response should be in JSON format only, without any additional comments.
56
+ Task:
57
+ Convert the provided extracted text into the JSON format described above.
58
+ Provided Text:
59
+ PROPERTY IMPROVEMENT PLAN
60
+ PREPARED FOR:
61
+ Springfield, IL
62
+ To be relicensed as Hilton Garden Inn
63
+ ...
64
+ Patios/The Terrace - Install patio decorative lighting. Install patio furniture. (lounge chairs, chaise, dining tables/chairs)
65
+ ...
66
+ Lobby Area - Replace carpet, carpet pad, and base. Replace window treatments. Replace artwork and decorative accessories. Replace portable lighting. (floor lamps, table lamps) Replace upholstered furniture and decorative pillows. Replace millwork. Replace the television(s).
67
+ ...
68
+ Registration Area - Replace vinyl wall covering. Replace hard surface floor covering. Replace artwork. Install new signature graphics on the back wall.
69
+ ...
70
+ Expected Output (JSON format):
71
+ {
72
+ "Patios/The Terrace": {
73
+ "Patio decorative lighting": 1,
74
+ "Lounge chairs": 1,
75
+ "Chaise": 1,
76
+ "Dining tables": 1,
77
+ "Dining chairs": 1,
78
+ "Patio furniture": 1
79
+ },
80
+ "Lobby Area": {
81
+ "Carpet, carpet pad, and base": 1,
82
+ "Window treatments": 1,
83
+ "Artwork and decorative accessories": 1,
84
+ "Portable lighting (floor lamps, table lamps)": 1,
85
+ "Upholstered furniture and decorative pillows": 1,
86
+ "Millwork": 1,
87
+ "Television(s)": 1
88
+ },
89
+ "Registration Area": {
90
+ "Vinyl wall covering": 1,
91
+ "Hard surface floor covering": 1,
92
+ "Artwork (new signature graphics on the back wall)": 1
93
+ }
94
+ }
95
+ """
96
  messages = [{"role": "system", "content": SYS_PROMPT}]
97
 
98
  if len(history) == 0: