Spaces:
Sleeping
Sleeping
Update prompts.py
Browse files- prompts.py +62 -7
prompts.py
CHANGED
|
@@ -4,11 +4,66 @@ BASE_SYSTEM_PROMPT = """
|
|
| 4 |
You are an expert Executive Editor. Your goal is clarity, precision, and professional impact.
|
| 5 |
"""
|
| 6 |
|
| 7 |
-
#
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
}
|
|
|
|
| 4 |
You are an expert Executive Editor. Your goal is clarity, precision, and professional impact.
|
| 5 |
"""
|
| 6 |
|
| 7 |
+
# --- FEW-SHOT EXAMPLES ---
|
| 8 |
+
|
| 9 |
+
FEW_SHOT_DIPLOMATIC = """
|
| 10 |
+
<example>
|
| 11 |
+
INPUT: "You missed the deadline again. This is unacceptable and makes us look bad."
|
| 12 |
+
OUTPUT: "We noticed the deadline has passed. Could you please provide an updated timeline? It is critical we maintain momentum for the client."
|
| 13 |
+
</example>
|
| 14 |
+
<example>
|
| 15 |
+
INPUT: "Your code is messy and breaks the build."
|
| 16 |
+
OUTPUT: "I noticed some instability in the recent build. Could we review the code standards together to ensure smoother integration?"
|
| 17 |
+
</example>
|
| 18 |
+
"""
|
| 19 |
+
|
| 20 |
+
FEW_SHOT_BLUF = """
|
| 21 |
+
<example>
|
| 22 |
+
INPUT: "I was looking at the data from last week and noticed the servers were slow. I talked to IT and they said it's a memory issue. We probably need to buy more RAM. It will cost about $5k."
|
| 23 |
+
OUTPUT: "BLUF: Requesting approval for $5,000 to upgrade server RAM to resolve performance latency.
|
| 24 |
+
Context: Analysis of last week's data combined with IT consultation identified memory bottlenecks as the root cause."
|
| 25 |
+
</example>
|
| 26 |
+
"""
|
| 27 |
+
|
| 28 |
+
FEW_SHOT_MEMO = """
|
| 29 |
+
<example>
|
| 30 |
+
INPUT: "We need to change the meeting time. 10am is too early for the west coast team. Let's do 1pm EST."
|
| 31 |
+
OUTPUT: "MEMORANDUM
|
| 32 |
+
FROM: Executive Office
|
| 33 |
+
TO: All Staff
|
| 34 |
+
SUBJ: ADJUSTMENT TO WEEKLY SYNC SCHEDULE
|
| 35 |
+
|
| 36 |
+
1. Effective immediately, the weekly sync is rescheduled to 1300 EST.
|
| 37 |
+
2. This change accommodates the operational window of our West Coast detachment."
|
| 38 |
+
</example>
|
| 39 |
+
"""
|
| 40 |
+
|
| 41 |
+
# --- MAIN CONFIGURATION (Single Source of Truth) ---
|
| 42 |
+
# This dictionary controls the Sidebar Dropdown AND the System Prompt logic.
|
| 43 |
+
|
| 44 |
+
MODE_CONFIG = {
|
| 45 |
+
"Standard Polish": {
|
| 46 |
+
"instruction": "Fix grammar, tighten phrasing, remove passive voice. Keep original intent.",
|
| 47 |
+
"examples": ""
|
| 48 |
+
},
|
| 49 |
+
"Diplomatic / De-escalate": {
|
| 50 |
+
"instruction": "Remove aggression. Rephrase demands as professional requests. Assume positive intent.",
|
| 51 |
+
"examples": FEW_SHOT_DIPLOMATIC
|
| 52 |
+
},
|
| 53 |
+
"BLUF (Bottom Line Up Front)": {
|
| 54 |
+
"instruction": "Move the primary conclusion/request to the first sentence. Summarize context after.",
|
| 55 |
+
"examples": FEW_SHOT_BLUF
|
| 56 |
+
},
|
| 57 |
+
"Executive Summary": {
|
| 58 |
+
"instruction": "Condense the input to 20% of its original length. Focus on decisions, costs, and deadlines.",
|
| 59 |
+
"examples": "" # No few-shot needed, the model is naturally good at summarizing.
|
| 60 |
+
},
|
| 61 |
+
"Technical Cleanup": {
|
| 62 |
+
"instruction": "Ensure consistent terminology. Highlight vague assertions. Use precise engineering/naval syntax.",
|
| 63 |
+
"examples": ""
|
| 64 |
+
},
|
| 65 |
+
"Memo Format": {
|
| 66 |
+
"instruction": "Format the input into a standard Naval/Corporate Memorandum style.",
|
| 67 |
+
"examples": FEW_SHOT_MEMO
|
| 68 |
+
}
|
| 69 |
}
|