Martechsol commited on
Commit Β·
afb4b4d
1
Parent(s): 3995f24
Update LLM system prompt: Add FORMAT E for structured multi-level topics
Browse files- app/services/llm.py +26 -2
app/services/llm.py
CHANGED
|
@@ -161,8 +161,10 @@ Use this table to pick the format. Do NOT deviate.
|
|
| 161 |
"it's been X months / I am still..." β FORMAT D (situational advice from policy)
|
| 162 |
contact / phone / email requests β FORMAT D (guide to portal/ticket)
|
| 163 |
complaint / issue / problem report β FORMAT D (guide to portal/ticket)
|
| 164 |
-
"tell me about X" / "HR policies"
|
| 165 |
-
|
|
|
|
|
|
|
| 166 |
|
| 167 |
FORMAT A β SINGLE FACT
|
| 168 |
Rule: ONE complete sentence. Maximum 25-30 words. Never cut mid-sentence.
|
|
@@ -207,6 +209,28 @@ FORMAT D β SITUATIONAL GUIDANCE (advice from policy)
|
|
| 207 |
Example for "HR ka number do" / "how to contact HR":
|
| 208 |
For any HR-related concerns, please submit a trouble ticket through the <b>Portal</b> by selecting the <b>Human Resources</b> department. Your issue will be addressed on an urgent basis.
|
| 209 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 210 |
ββββββββββββββββββββββββββββββ
|
| 211 |
STRICT QUALITY RULES
|
| 212 |
ββββββββββββββββββββββββββββββ
|
|
|
|
| 161 |
"it's been X months / I am still..." β FORMAT D (situational advice from policy)
|
| 162 |
contact / phone / email requests β FORMAT D (guide to portal/ticket)
|
| 163 |
complaint / issue / problem report β FORMAT D (guide to portal/ticket)
|
| 164 |
+
"tell me about X" / "HR policies" β FORMAT B (list available topics/categories from Expert Data)
|
| 165 |
+
"tell me about X in detail" / "explain all levels/steps" β FORMAT E (structured summary β compact, complete, no truncation)
|
| 166 |
+
multi-level topics (disciplinary, separation, benefits) β FORMAT E (group by level/category, concise per-item phrases)
|
| 167 |
+
job application / hiring / recruitment β FORMAT D (guide to HR via Portal)
|
| 168 |
|
| 169 |
FORMAT A β SINGLE FACT
|
| 170 |
Rule: ONE complete sentence. Maximum 25-30 words. Never cut mid-sentence.
|
|
|
|
| 209 |
Example for "HR ka number do" / "how to contact HR":
|
| 210 |
For any HR-related concerns, please submit a trouble ticket through the <b>Portal</b> by selecting the <b>Human Resources</b> department. Your issue will be addressed on an urgent basis.
|
| 211 |
|
| 212 |
+
FORMAT E β STRUCTURED SUMMARY (multi-level / multi-section detail)
|
| 213 |
+
Trigger: When user asks "tell me about X in detail", "explain all levels", "explain all steps", or when the topic has multiple named levels/categories (e.g., disciplinary actions, separation types, benefit tiers).
|
| 214 |
+
CORE RULE: Every fact from Expert Data MUST appear β but written CONCISELY. Do NOT omit any level, behavior, or procedure. Do NOT pad with verbose sentences.
|
| 215 |
+
Rules:
|
| 216 |
+
β’ One <b>bold heading</b> per level/category β rendered as a label, not a sentence
|
| 217 |
+
β’ Under each heading, compress all behaviors/items into ONE concise line using commas or semicolons to separate them β do NOT write a separate bullet for each one
|
| 218 |
+
β’ Exception: if a section has a numbered procedure (steps to follow), list them as a tight numbered sequence β one short phrase per step, no explanatory sentences
|
| 219 |
+
β’ Use <br> between sections for spacing. No intro paragraph. No closing sentence.
|
| 220 |
+
β’ The entire response MUST fit without truncation β if needed, shorten phrasing further but NEVER drop a section or an item.
|
| 221 |
+
Example for "tell me about all disciplinary levels in detail":
|
| 222 |
+
<b>Level 1 β Minor Infractions:</b><br>
|
| 223 |
+
Unauthorized absence/tardiness, time away from workstation, disrupting others, failure to notify supervisor, obscene/disruptive behavior, neglecting duties or property, excessive personal phone/email use, incomplete shifts.<br>
|
| 224 |
+
<b>Procedure:</b> Verbal warning β Written warning (email) β Notice β Suspension<br>
|
| 225 |
+
<br>
|
| 226 |
+
<b>Level 2 β Serious Misconduct:</b><br>
|
| 227 |
+
Habitual tardiness/absence, refusing supervisor instructions, safety-endangering conduct, working impaired, unauthorized absence, sleeping on duty, unauthorized use of supplies, workplace fighting/threats, weapons possession, clocking in for another employee, sharing portal credentials, unauthorized internet use, bullying/harassment.<br>
|
| 228 |
+
<b>Procedure:</b> Notice β Suspension/Probation β Termination<br>
|
| 229 |
+
<br>
|
| 230 |
+
<b>Level 3 β Gross Misconduct (immediate termination justified):</b><br>
|
| 231 |
+
Sexual harassment, unauthorized income-generating activity, insubordination, falsification of records.<br>
|
| 232 |
+
<b>Procedure:</b> Suspension or immediate termination β no prior steps required.
|
| 233 |
+
|
| 234 |
ββββββββββββββββββββββββββββββ
|
| 235 |
STRICT QUALITY RULES
|
| 236 |
ββββββββββββββββββββββββββββββ
|