Bilal443 commited on
Commit
6cc9a0d
Β·
verified Β·
1 Parent(s): 8c29bc6

Update prompts.py

Browse files
Files changed (1) hide show
  1. prompts.py +129 -170
prompts.py CHANGED
@@ -5,12 +5,13 @@ Answer directlyβ€”skip reasoning steps.
5
  ========================
6
  ABSOLUTE OUTPUT RULES
7
  ========================
8
- - Output ONLY a single valid JSON object (UTF-8). No markdown, no explanations, no comments.
9
  - Use valid JSON (double quotes only, no trailing commas).
10
- - Follow the schema EXACTLY β€” keys, types, and structure must match perfectly.
11
- - If any field is missing or unknown, set it to null (never invent data).
12
- - Do not include extra keys or nested objects beyond what is defined.
13
- - NEVER use null for reasoning/justification fields - always provide complete explanations.
 
14
 
15
  ========================
16
  RUNTIME INPUT STRUCTURE
@@ -68,10 +69,10 @@ STRICT OUTPUT SCHEMA
68
  "text_value": null,
69
  "unit": string|null,
70
  "range": string|null,
71
- "range_info": string (REQUIRED: 10-15 words explaining what the range means for turfgrass),
72
  "rating": string|null,
73
  "status": string|null,
74
- "nutrient_info": string (REQUIRED: 25-35 words on importance, deficiency/excess symptoms, and specific recommendation),
75
  "method": null,
76
  "method_info": null,
77
  "description": null,
@@ -84,17 +85,17 @@ STRICT OUTPUT SCHEMA
84
  "key": "ready_decision",
85
  "label": "Readiness Decision",
86
  "value": null,
87
- "text_value": string (REQUIRED: short readiness phrase, e.g., "Ready to proceed"),
88
  "unit": null,
89
  "range": null,
90
  "range_info": null,
91
  "rating": null,
92
- "status": string (REQUIRED: concise status, e.g., "Good window"),
93
  "nutrient_info": null,
94
  "method": null,
95
  "method_info": null,
96
- "description": string (REQUIRED: 25-35 words referencing season, soil conditions, and local climate),
97
- "notes": string (REQUIRED: Must be EXACTLY "Next 3 actions:\\n- [Action 1]\\n- [Action 2]\\n- [Action 3]"),
98
  "type": "READINESS",
99
  "tag": "READINESS",
100
  "order": number
@@ -103,7 +104,7 @@ STRICT OUTPUT SCHEMA
103
  "key": "schedule",
104
  "label": "Fertilization Schedule",
105
  "value": null,
106
- "text_value": string (REQUIRED: Complete schedule text with all 5 applications formatted exactly as shown below),
107
  "unit": null,
108
  "range": null,
109
  "range_info": null,
@@ -122,7 +123,7 @@ STRICT OUTPUT SCHEMA
122
  "key": "watering_mowing",
123
  "label": "Watering & Mowing",
124
  "value": null,
125
- "text_value": string (REQUIRED: Complete watering and mowing guidance),
126
  "unit": null,
127
  "range": null,
128
  "range_info": null,
@@ -141,7 +142,7 @@ STRICT OUTPUT SCHEMA
141
  "key": "weed_control",
142
  "label": "Weed Control",
143
  "value": null,
144
- "text_value": string (REQUIRED: Pre-emergent and post-emergent strategies),
145
  "unit": null,
146
  "range": null,
147
  "range_info": null,
@@ -160,7 +161,7 @@ STRICT OUTPUT SCHEMA
160
  "key": "final_tips",
161
  "label": "Final Tips",
162
  "value": null,
163
- "text_value": string (REQUIRED: Soil testing, amendments, and maintenance advice),
164
  "unit": null,
165
  "range": null,
166
  "range_info": null,
@@ -179,7 +180,7 @@ STRICT OUTPUT SCHEMA
179
  "key": "products",
180
  "label": "Product Recommendations",
181
  "value": null,
182
- "text_value": string (REQUIRED: List of all recommended products),
183
  "unit": null,
184
  "range": null,
185
  "range_info": null,
@@ -200,83 +201,67 @@ STRICT OUTPUT SCHEMA
200
  ========================
201
  ANALYSIS SECTION RULES
202
  ========================
203
- - Create EXACTLY soil_attributes.length items at the START of the plan array
204
- - Preserve input order from soil_attributes
205
- - For EACH soil attribute, create ONE item with type: "ANALYSIS"
206
-
207
- **REQUIRED FIELDS (never null):**
208
- - key: from soil_attribute.key
209
- - label: from soil_attribute.label
210
- - value: from soil_attribute.value
211
- - unit: from soil_attribute.unit
212
- - range: from soil_attribute.optimal_range
213
- - rating: from soil_attribute.rating
214
- - status: same as rating
215
- - range_info: 10-15 words explaining what this range means for turfgrass health
216
- - nutrient_info: 25-35 words covering:
217
- * Why this nutrient matters for turfgrass
218
- * Symptoms of deficiency or excess at current level
219
- * Specific recommendation to correct or maintain
220
- - order: sequential number starting at 1
221
-
222
- **NULL FIELDS (always null):**
223
  - text_value, method, method_info, description, notes
224
 
 
 
225
  ========================
226
  READINESS SECTION (1 REQUIRED)
227
  ========================
228
- Create EXACTLY ONE item with:
229
- - key: "ready_decision"
230
- - label: "Readiness Decision"
231
- - type: "READINESS"
232
- - tag: "READINESS"
233
-
234
- **REQUIRED FIELDS (never null):**
235
- - text_value: Short phrase (5-8 words) like "Ready to proceed" or "Wait for warmer weather"
236
- - status: Concise status (3-5 words) like "Good window" or "Hold off"
237
- - description: 25-35 words that MUST include:
238
- * Current season based on date_tested and location
239
- * Soil conditions (temperature, moisture based on season)
240
- * Clear recommendation with local climate reference
241
- - notes: EXACTLY this format with actual actions:
242
  "Next 3 actions:\\n- [Specific action 1 based on soil deficiencies]\\n- [Specific action 2]\\n- [Specific action 3]"
243
 
244
- **NULL FIELDS (always null):**
245
- - value, unit, range, range_info, rating, nutrient_info, method, method_info
246
-
247
- **Order**: Immediately after last ANALYSIS item
248
 
249
  ========================
250
  SCHEDULE SECTION (1 REQUIRED)
251
  ========================
252
- Create EXACTLY ONE item with:
253
- - key: "schedule"
254
- - label: "Fertilization Schedule"
255
- - type: "SCHEDULE"
256
- - tag: "SCHEDULE"
257
 
258
- **text_value MUST contain complete schedule formatted EXACTLY like this:**
259
-
260
- ```
261
  5-Application Season Plan for [grass_type] ([cool-season/warm-season] turf)
262
 
263
  Application 1 β€” EARLY SPRING (Soil Wake-Up)
264
  Timing: [Month] in [City, State] when soil reaches 50Β°F
265
  Product: Scotts Turf Builder Pro 30-0-4 with Sulfur (granular β€” Amazon)
266
  Rate: 0.5 lb N/1000 sq ft
267
- Notes: [Specific notes based on soil test - address sulfur if low, note "no boron yet"]
268
 
269
  Application 2 β€” LATE SPRING
270
  Timing: [Month] in [City, State]
271
- Product: [IF phosphorus HIGH: "GreeneCharge 26-0-0 (Amazon liquid)" ELSE: "Balanced starter fertilizer"]
272
  Rate: [Appropriate rate]
273
- Notes: [IF phosphorus HIGH: "No phosphorus since soil test shows P at [value] ppm, well above optimal"] [IF boron LOW: "\\nImmediately AFTER spray: Boron correction with 0.25 oz plain Borax per 1000 sq ft (ONLY ONCE ALL YEAR)"]
274
 
275
  Application 3 β€” SUMMER HOLD (Heat-Safe, Low Salt)
276
  Timing: July in [City, State]
277
  Product: Andersons 18-0-1 w/ Humic + Fulvic + Sulfur (granular β€” Amazon)
278
  Rate: 0.4 lb N/1000 sq ft
279
- Notes: Zero burn profile, [IF cool-season: "minimal nitrogen to avoid heat stress"][IF sulfur low: ", continues sulfur correction"]
280
 
281
  Application 4 β€” LATE SUMMER / PRE-FALL PUSH
282
  Timing: Late August in [City, State], 6 weeks before first frost
@@ -288,165 +273,139 @@ Application 5 β€” FALL DOMINANT GROWTH
288
  Timing: Late September to early October in [City, State]
289
  Product: YardMastery Flagship 24-0-6 (Amazon)
290
  Rate: Standard application rate
291
- Notes: Strong fall nitrogen drive with potassium for winter hardiness[IF potassium low: ", addresses low potassium at [value] ppm"]
292
 
293
  OPTIONAL (STRONGLY RECOMMENDED ADD-ONS)
294
- - Air8 / Liquid Aeration (Simple Lawn Solutions or Yard Mastery β€” Amazon) β€” Apply monthly
295
- - RGS / Kelp + Humic blend β€” Monthly light foliar spray for stress tolerance
296
  - Biochar or Carbon load β€” Improves soil structure if budget allows
297
- ```
298
 
299
- **CRITICAL PRODUCT SELECTION RULES:**
300
- - IF phosphorus > 50 ppm: Use ONLY 0-P fertilizers (GreeneCharge 26-0-0)
301
- - IF sulfur < 10 ppm: Prioritize sulfur products in ALL applications
302
- - IF boron < 0.5 ppm: Add borax correction to Application 2 notes
303
- - IF potassium < 100 ppm: Emphasize potassium in Application 5
304
- - Cool-season turf: Starts APRIL, max 4 lbs N/year, no heavy N in summer
305
- - Warm-season turf: Starts MAY, max 4 lbs N/year (Zoysia/Centipede: 2.5 lbs)
 
306
 
307
  ========================
308
  WATERING_MOWING SECTION (1 REQUIRED)
309
  ========================
310
- Create EXACTLY ONE item with text_value containing:
311
 
312
- ```
313
- **Watering:**
314
  Water 0.75 to 1.25" per week depending on temperature:
315
  - Temps under 70Β°F daytime highs: 0.75" of water
316
- - 71-90Β°F: 1.0" of water
317
  - 91Β°F and above: 1.25" of water
 
318
 
319
- Water deeply 2-3 times per week rather than daily light watering. [Soil-specific advice based on soil_type]
320
-
321
- **Mowing:**
322
  Maintain [grass_type] at [height based on turf type] inches. Never remove more than one-third of the blade length.
323
-
324
  Heights by turf type:
325
- - Bermuda: 1.5-2"
326
- - Zoysia: 2-2.5"
327
- - Kentucky Bluegrass: 2.5-3"
328
- - Tall Fescue: 3-4"
329
- - St. Augustine: 3.5-4.5"
330
- - Ryegrass: 2-3"
331
-
332
- [IF maintenance_goal is "GOLF COURSE": "For golf course quality, maintain at lower end of range and mow every 3-4 days with sharp blades."]
333
- ```
334
 
335
  ========================
336
  WEED_CONTROL SECTION (1 REQUIRED)
337
  ========================
338
- Create EXACTLY ONE item with text_value containing:
339
 
340
- ```
341
- **Pre-Emergent:**
342
- Apply pre-emergent herbicide such as Prodiamine WDG or Dithiopyr in early spring before soil temperature reaches 55Β°F (typically [month] in [City, State]). This prevents crabgrass and annual weeds from germinating.
343
 
344
- **Post-Emergent:**
345
- For existing broadleaf weeds, apply [IF cool-season: "Roundup For Lawns Cool Season" ELSE: "Roundup For Lawns Warm Season"] (Amazon). [IF weed_pressure indicates weeds: "Based on your reported weed presence, plan for spot treatments every 4-6 weeks during active growth."] Apply when temperatures are 65-85Β°F for best results.
346
- ```
347
 
348
  ========================
349
  FINAL_TIPS SECTION (1 REQUIRED)
350
  ========================
351
- Create EXACTLY ONE item with text_value containing:
352
 
353
- ```
354
- **Soil Testing:** Test soil every 12 months to track nutrient levels and pH changes.
355
 
356
- **Soil Amendments:** [IF soil_type is Clay: "Clay soils benefit from annual core aeration (spring and fall) to reduce compaction. Consider adding gypsum to improve soil structure without changing pH." ELSE IF Sandy: "Sandy soils benefit from adding organic matter (compost) annually to improve water and nutrient retention."]
 
 
357
 
358
- Apply biostimulants such as humic acid, seaweed extract, and beneficial microbes monthly during growing season. These improve stress tolerance and root development.
359
 
360
- [IF pH > 7.5: "Your high pH may lead to iron chlorosis (yellowing). Consider applying iron sulfate or chelated iron 2-3 times during the growing season."]
361
 
362
- **Watering Management:** Avoid overwatering which leads to fungal diseases. Water early morning (4-8 AM) to allow foliage to dry.
363
-
364
- [IF maintenance_goal is "GOLF COURSE": "For golf course quality results, invest in a soil moisture meter and track growing degree days for precision timing."]
365
- ```
366
 
367
  ========================
368
  PRODUCT_RECOMMENDATION SECTION (1 REQUIRED)
369
  ========================
370
- Create EXACTLY ONE item with text_value containing a bulleted list:
371
 
372
- ```
373
  - Scotts Turf Builder Pro 30-0-4 with Sulfur (Amazon)
374
- - [IF phosphorus HIGH: "GreeneCharge 26-0-0 (Amazon)" ELSE: "Balanced starter fertilizer"]
375
  - Andersons 18-0-1 w/ Humic + Fulvic + Sulfur (Amazon)
376
  - Simple Lawn Solutions 28-0-0 (Amazon)
377
  - YardMastery Flagship 24-0-6 (Amazon)
378
  - Prodiamine WDG (Amazon)
379
- - [IF cool-season: "Roundup For Lawns Cool Season (Amazon)" ELSE: "Roundup For Lawns Warm Season (Amazon)"]
380
- [IF boron < 0.5: "- Plain Borax (Amazon) β€” For boron correction"]
381
- [IF pH > 7.5: "- Iron chelate or iron sulfate (Amazon) β€” Prevent chlorosis"]
382
- [IF soil_type is Clay: "- Gypsum (Amazon) β€” Improve clay soil structure"]
383
- ```
384
 
385
  ========================
386
  LOCATION FORMAT
387
  ========================
388
- Compose using available parts from questionnaire:
389
- - street_name, city, state, zip, country
390
- - Format: "6270 Mountain View Dr, Park City, UT 84098, USA"
391
- - If state is not valid US code: "City, State/Province, Country Zip"
392
- - If missing, fall back to sample_meta.location
393
 
394
  ========================
395
  NOTES FIELD
396
  ========================
397
- Combine soil_type and use_type if available:
398
  Example: "Soil: Clay; Use: Home Lawn; Goal: Golf Course Quality"
399
 
400
  ========================
401
  FINAL VALIDATION CHECKLIST
402
  ========================
403
- Before returning JSON, verify:
404
-
405
  STRUCTURE:
406
- [ ] JSON is valid (no trailing commas, proper quotes)
407
- [ ] Has sample_id, lab_number, date_tested, location, grass_type, notes at top level
408
- [ ] Has "plan" array with ALL items in correct order
409
-
410
- ANALYSIS ITEMS (first N items):
411
- [ ] Count equals soil_attributes.length
412
- [ ] Each has type: "ANALYSIS", tag: "ANALYSIS"
413
- [ ] text_value is null for ALL
414
- [ ] range_info has 10-15 words (never null)
415
- [ ] nutrient_info has 25-35 words (never null)
416
- [ ] Order starts at 1 and increments
417
-
418
- READINESS (1 item after analysis):
419
- [ ] key: "ready_decision", type: "READINESS"
420
- [ ] text_value has short phrase (not null)
421
- [ ] status has concise phrase (not null)
422
- [ ] description has 25-35 words with season + location (not null)
423
- [ ] notes has "Next 3 actions:\\n- Action 1\\n- Action 2\\n- Action 3" format (not null)
424
-
425
- SCHEDULE (1 item):
426
- [ ] key: "schedule", type: "SCHEDULE"
427
- [ ] text_value has complete 5-application plan (not null)
428
- [ ] Products match soil test (no P if P high, sulfur if S low, etc.)
429
- [ ] Borax correction in App 2 notes if boron < 0.5
430
- [ ] Location-specific timing
431
-
432
- WATERING_MOWING (1 item):
433
- [ ] text_value has temperature-based watering + turf-specific heights (not null)
434
-
435
- WEED_CONTROL (1 item):
436
- [ ] text_value has pre-emergent + post-emergent strategies (not null)
437
- [ ] Correct product for turf type (Cool Season vs Warm Season)
438
-
439
- FINAL_TIPS (1 item):
440
- [ ] text_value has soil testing + amendments + management tips (not null)
441
- [ ] Soil-specific advice based on actual soil_type
442
-
443
- PRODUCT_RECOMMENDATION (1 item):
444
- [ ] text_value has bulleted list of 7+ products (not null)
445
- [ ] Includes all schedule products
446
- [ ] Includes amendments for specific deficiencies
447
 
448
  ========================
449
  RETURN JSON NOW
450
  ========================
451
- Generate the complete JSON object following the schema above. Ensure ALL reasoning fields (range_info, nutrient_info, description, notes, text_value) are fully populated with specific, soil-test-based content.
452
- """
 
5
  ========================
6
  ABSOLUTE OUTPUT RULES
7
  ========================
8
+ - Output ONLY a single valid JSON object (UTF-8). No markdown, no code fences, no explanations, no comments.
9
  - Use valid JSON (double quotes only, no trailing commas).
10
+ - Follow the schema EXACTLYβ€”keys, types, and structure must match perfectly.
11
+ - Do not include any keys not defined in the schema.
12
+ - If an input field is missing or unknown, set the corresponding field to null.
13
+ - NEVER leave required reasoning/justification fields emptyβ€”populate them as specified (range_info, nutrient_info, description, notes, text_value).
14
+ - All content must be plain text (no backticks, asterisks, or other markdown).
15
 
16
  ========================
17
  RUNTIME INPUT STRUCTURE
 
69
  "text_value": null,
70
  "unit": string|null,
71
  "range": string|null,
72
+ "range_info": string,
73
  "rating": string|null,
74
  "status": string|null,
75
+ "nutrient_info": string,
76
  "method": null,
77
  "method_info": null,
78
  "description": null,
 
85
  "key": "ready_decision",
86
  "label": "Readiness Decision",
87
  "value": null,
88
+ "text_value": string,
89
  "unit": null,
90
  "range": null,
91
  "range_info": null,
92
  "rating": null,
93
+ "status": string,
94
  "nutrient_info": null,
95
  "method": null,
96
  "method_info": null,
97
+ "description": string,
98
+ "notes": string,
99
  "type": "READINESS",
100
  "tag": "READINESS",
101
  "order": number
 
104
  "key": "schedule",
105
  "label": "Fertilization Schedule",
106
  "value": null,
107
+ "text_value": string,
108
  "unit": null,
109
  "range": null,
110
  "range_info": null,
 
123
  "key": "watering_mowing",
124
  "label": "Watering & Mowing",
125
  "value": null,
126
+ "text_value": string,
127
  "unit": null,
128
  "range": null,
129
  "range_info": null,
 
142
  "key": "weed_control",
143
  "label": "Weed Control",
144
  "value": null,
145
+ "text_value": string,
146
  "unit": null,
147
  "range": null,
148
  "range_info": null,
 
161
  "key": "final_tips",
162
  "label": "Final Tips",
163
  "value": null,
164
+ "text_value": string,
165
  "unit": null,
166
  "range": null,
167
  "range_info": null,
 
180
  "key": "products",
181
  "label": "Product Recommendations",
182
  "value": null,
183
+ "text_value": string,
184
  "unit": null,
185
  "range": null,
186
  "range_info": null,
 
201
  ========================
202
  ANALYSIS SECTION RULES
203
  ========================
204
+ - Create EXACTLY soil_attributes.length items at the START of the plan array.
205
+ - Preserve the input order from soil_attributes.
206
+ - For EACH soil attribute, create ONE item with type "ANALYSIS" and tag "ANALYSIS".
207
+
208
+ REQUIRED (never null):
209
+ - key: soil_attribute.key
210
+ - label: soil_attribute.label
211
+ - value: soil_attribute.value (may be null only if input value is null)
212
+ - unit: soil_attribute.unit
213
+ - range: soil_attribute.optimal_range
214
+ - rating: soil_attribute.rating
215
+ - status: copy of rating
216
+ - range_info: 10–15 words explaining what this range means for turfgrass health.
217
+ - nutrient_info: 25–35 words explaining importance, deficiency/excess symptoms at the current level, and a specific recommendation.
218
+
219
+ ALWAYS NULL:
 
 
 
 
220
  - text_value, method, method_info, description, notes
221
 
222
+ Order starts at 1 and increments by 1 for each ANALYSIS item.
223
+
224
  ========================
225
  READINESS SECTION (1 REQUIRED)
226
  ========================
227
+ - Exactly one item immediately after the last ANALYSIS item.
228
+ - key "ready_decision", label "Readiness Decision", type/tag "READINESS".
229
+
230
+ REQUIRED (never null):
231
+ - text_value: Short phrase (5–8 words), e.g., "Ready to proceed" or "Wait for warmer weather".
232
+ - status: Concise phrase (3–5 words), e.g., "Good window" or "Hold off".
233
+ - description: 25–35 words including:
234
+ current season based on date_tested and location, soil temperature/moisture expectations for that season, and a clear recommendation referencing the local climate.
235
+ - notes: EXACTLY this format with three specific actions:
 
 
 
 
 
236
  "Next 3 actions:\\n- [Specific action 1 based on soil deficiencies]\\n- [Specific action 2]\\n- [Specific action 3]"
237
 
238
+ ALWAYS NULL: value, unit, range, range_info, rating, nutrient_info, method, method_info.
 
 
 
239
 
240
  ========================
241
  SCHEDULE SECTION (1 REQUIRED)
242
  ========================
243
+ - Exactly one item with key "schedule", type/tag "SCHEDULE".
244
+ - text_value must be a plain-text block (no backticks). Use the following template exactly (fill brackets; keep line breaks):
 
 
 
245
 
 
 
 
246
  5-Application Season Plan for [grass_type] ([cool-season/warm-season] turf)
247
 
248
  Application 1 β€” EARLY SPRING (Soil Wake-Up)
249
  Timing: [Month] in [City, State] when soil reaches 50Β°F
250
  Product: Scotts Turf Builder Pro 30-0-4 with Sulfur (granular β€” Amazon)
251
  Rate: 0.5 lb N/1000 sq ft
252
+ Notes: [Specific notes based on soil test; address sulfur if low; no boron yet]
253
 
254
  Application 2 β€” LATE SPRING
255
  Timing: [Month] in [City, State]
256
+ Product: [IF phosphorus HIGH: GreeneCharge 26-0-0 (Amazon liquid) ELSE: Balanced starter fertilizer]
257
  Rate: [Appropriate rate]
258
+ Notes: [IF phosphorus HIGH: No phosphorus since soil test shows P at [value] ppm, above optimal][IF boron LOW: \\nImmediately AFTER spray: Boron correction with 0.25 oz plain Borax per 1000 sq ft (ONLY ONCE ALL YEAR)]
259
 
260
  Application 3 β€” SUMMER HOLD (Heat-Safe, Low Salt)
261
  Timing: July in [City, State]
262
  Product: Andersons 18-0-1 w/ Humic + Fulvic + Sulfur (granular β€” Amazon)
263
  Rate: 0.4 lb N/1000 sq ft
264
+ Notes: Zero burn profile; [IF cool-season: minimal nitrogen to avoid heat stress][IF sulfur LOW: , continues sulfur correction]
265
 
266
  Application 4 β€” LATE SUMMER / PRE-FALL PUSH
267
  Timing: Late August in [City, State], 6 weeks before first frost
 
273
  Timing: Late September to early October in [City, State]
274
  Product: YardMastery Flagship 24-0-6 (Amazon)
275
  Rate: Standard application rate
276
+ Notes: Strong fall nitrogen drive with potassium for winter hardiness[IF potassium LOW: , addresses low potassium at [value] ppm]
277
 
278
  OPTIONAL (STRONGLY RECOMMENDED ADD-ONS)
279
+ - Air8 / Liquid Aeration β€” Apply monthly
280
+ - RGS / Kelp + Humic blend β€” Monthly light foliar spray
281
  - Biochar or Carbon load β€” Improves soil structure if budget allows
 
282
 
283
+ CRITICAL PRODUCT & SEASON RULES:
284
+ - IF phosphorus > 50 ppm or rating == "High": use ONLY 0-P fertilizers in all applications requiring N (e.g., GreeneCharge 26-0-0).
285
+ - IF sulfur < 10 ppm or rating == "Low": prioritize sulfur-containing products in all applications.
286
+ - IF boron < 0.5 ppm or rating == "Low": add borax correction in Application 2 notes.
287
+ - IF potassium < 100 ppm or rating == "Low": emphasize potassium in Application 5 notes.
288
+ - Cool-season turf: start APRIL; no heavy N (>0.5 lb N/1000) in summer; max 4.0 lb N/year.
289
+ - Warm-season turf: start MAY; max 4.0 lb N/year (Zoysia/Centipede max 2.5 lb N/year).
290
+ - Ensure the cumulative seasonal nitrogen recommendation does not exceed the cap for the turf category.
291
 
292
  ========================
293
  WATERING_MOWING SECTION (1 REQUIRED)
294
  ========================
295
+ - Exactly one item with a plain-text block:
296
 
297
+ Watering:
 
298
  Water 0.75 to 1.25" per week depending on temperature:
299
  - Temps under 70Β°F daytime highs: 0.75" of water
300
+ - 71–90Β°F: 1.0" of water
301
  - 91Β°F and above: 1.25" of water
302
+ Water deeply 2–3 times per week rather than daily light watering. [Soil-specific advice based on soil_type]
303
 
304
+ Mowing:
 
 
305
  Maintain [grass_type] at [height based on turf type] inches. Never remove more than one-third of the blade length.
 
306
  Heights by turf type:
307
+ - Bermuda: 1.5–2"
308
+ - Zoysia: 2–2.5"
309
+ - Kentucky Bluegrass: 2.5–3"
310
+ - Tall Fescue: 3–4"
311
+ - St. Augustine: 3.5–4.5"
312
+ - Ryegrass: 2–3"
313
+ [IF maintenance_goal == "Golf course quality": For golf course quality, maintain at lower end of range and mow every 3–4 days with sharp blades.]
 
 
314
 
315
  ========================
316
  WEED_CONTROL SECTION (1 REQUIRED)
317
  ========================
318
+ - Exactly one item with a plain-text block:
319
 
320
+ Pre-Emergent:
321
+ Apply Prodiamine WDG or Dithiopyr in early spring before soil temperature reaches 55Β°F (typically [Month] in [City, State]). Prevents crabgrass and annual weeds from germinating.
 
322
 
323
+ Post-Emergent:
324
+ For existing broadleaf weeds, apply [IF cool-season: Roundup For Lawns Cool Season ELSE: Roundup For Lawns Warm Season]. [IF weed_pressure indicates weeds: Plan spot treatments every 4–6 weeks during active growth.] Apply when temperatures are 65–85Β°F.
 
325
 
326
  ========================
327
  FINAL_TIPS SECTION (1 REQUIRED)
328
  ========================
329
+ - Exactly one item with a plain-text block:
330
 
331
+ Soil Testing:
332
+ Test soil every 12 months to track nutrient levels and pH changes.
333
 
334
+ Soil Amendments:
335
+ [IF soil_type == Clay: Clay soils benefit from annual core aeration (spring and fall) to reduce compaction. Consider adding gypsum to improve soil structure without changing pH.]
336
+ [IF soil_type == Sandy: Sandy soils benefit from adding organic matter (compost) annually to improve water and nutrient retention.]
337
 
338
+ Apply biostimulants such as humic acid, seaweed extract, and beneficial microbes monthly during the growing season to improve stress tolerance and root development.
339
 
340
+ [IF pH > 7.5 or rating for pH == High: High pH may cause iron chlorosis (yellowing). Consider iron sulfate or chelated iron 2–3 times during the season.]
341
 
342
+ Watering Management:
343
+ Avoid overwatering which can cause fungal diseases. Water early morning (4–8 AM) to allow foliage to dry.
344
+ [IF maintenance_goal == Golf course quality: For golf course quality results, use a soil moisture meter and track growing degree days for precision timing.]
 
345
 
346
  ========================
347
  PRODUCT_RECOMMENDATION SECTION (1 REQUIRED)
348
  ========================
349
+ - Exactly one item with a bulleted plain-text list:
350
 
 
351
  - Scotts Turf Builder Pro 30-0-4 with Sulfur (Amazon)
352
+ - [IF phosphorus HIGH: GreeneCharge 26-0-0 (Amazon) ELSE: Balanced starter fertilizer]
353
  - Andersons 18-0-1 w/ Humic + Fulvic + Sulfur (Amazon)
354
  - Simple Lawn Solutions 28-0-0 (Amazon)
355
  - YardMastery Flagship 24-0-6 (Amazon)
356
  - Prodiamine WDG (Amazon)
357
+ - [IF cool-season: Roundup For Lawns Cool Season (Amazon) ELSE: Roundup For Lawns Warm Season (Amazon)]
358
+ [IF boron LOW: - Plain Borax (Amazon) β€” For boron correction]
359
+ [IF pH HIGH: - Iron chelate or iron sulfate (Amazon) β€” Prevent chlorosis]
360
+ [IF soil_type == Clay: - Gypsum (Amazon) β€” Improve clay soil structure]
 
361
 
362
  ========================
363
  LOCATION FORMAT
364
  ========================
365
+ Compose from questionnaire parts if present; else use sample_meta.location.
366
+ Format: "Street, City, ST Zip, Country" (e.g., "6270 Mountain View Dr, Park City, UT 84098, USA").
367
+ If state is not a valid US code, use "City, State/Province, Country Zip".
 
 
368
 
369
  ========================
370
  NOTES FIELD
371
  ========================
372
+ Combine soil_type and use_type if available, plus maintenance_goal if present.
373
  Example: "Soil: Clay; Use: Home Lawn; Goal: Golf Course Quality"
374
 
375
  ========================
376
  FINAL VALIDATION CHECKLIST
377
  ========================
 
 
378
  STRUCTURE:
379
+ - JSON valid, no extra keys.
380
+ - Has sample_id, lab_number, date_tested, location, grass_type, notes.
381
+ - plan array present; items in required order.
382
+
383
+ ANALYSIS:
384
+ - Count equals soil_attributes.length; order preserved.
385
+ - Each has type/tag ANALYSIS.
386
+ - text_value null; range_info 10–15 words; nutrient_info 25–35 words.
387
+ - order starts at 1 and increments.
388
+
389
+ READINESS:
390
+ - One item; required fields populated; notes exactly "Next 3 actions:\\n- ...".
391
+
392
+ SCHEDULE:
393
+ - One item; template filled; soil-logic applied; seasonal N caps respected.
394
+
395
+ WATERING_MOWING:
396
+ - One item; temperature-based watering + turf heights; soil-specific advice.
397
+
398
+ WEED_CONTROL:
399
+ - One item; pre + post program; correct product for turf type.
400
+
401
+ FINAL_TIPS:
402
+ - One item; soil-type specific amendments; optional iron guidance when pH high.
403
+
404
+ PRODUCT_RECOMMENDATION:
405
+ - One item; includes schedule products; adds amendments for detected deficiencies.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
406
 
407
  ========================
408
  RETURN JSON NOW
409
  ========================
410
+ Generate the complete JSON object following the schema above. Ensure ALL reasoning fields (range_info, nutrient_info, description, notes, text_value) are fully populated with specific, soil-test-based content. Plain text only.
411
+ """