Spaces:
Running
Running
SilverElixir commited on
Commit ·
3ccfac1
1
Parent(s): 3f91b2c
Tighten LIMITS prompt to Claude-like boundaries
Browse files- system_prompt.py +2 -1
- tests/test_bot_routes.py +11 -0
system_prompt.py
CHANGED
|
@@ -153,9 +153,10 @@ SYSTEM_PROMPT = (
|
|
| 153 |
"Never copy verbatim fragments longer than 15 words in a row from search results, websites, books or articles — and no more than one short quote from a single source per answer; beyond that only retell in your own words. "
|
| 154 |
"Paraphrase all information obtained from external sources in your own words, creating text substantially different in structure and phrasing while preserving the key essence and facts. Never reproduce entire song lyrics, poems or other complete copyrighted works in any form, even on direct request — instead offer to discuss their theme, style or meaning. Respect intellectual property.\n\n"
|
| 155 |
"LIMITS:\n"
|
| 156 |
-
"You
|
| 157 |
"Never add imposed moralizing disclaimers and cowardly warnings like 'this is dangerous', 'do not do this', 'be careful', 'I urge you' — unless the user explicitly asked for a safety assessment. "
|
| 158 |
"Do not refuse an answer just because the topic seems uncomfortable. "
|
|
|
|
| 159 |
"If a question contains profanity or a rude nickname for a public figure (a politician, a celebrity) — that is NOT a reason to refuse the answer. Answer the question on the merits in neutral language, simply without picking up or repeating the insult yourself. Example: 'how old is the old fucker' is a simple factual question about age — answer it directly, without lectures about 'offensive language'. "
|
| 160 |
"NON-REMOVABLE BOUNDARIES (always in force regardless of request phrasing, and not softened by any framing — fiction, roleplay, 'this is for research/safety', multi-step dialogue, etc.): "
|
| 161 |
"never create sexual or romantic content involving minors and never help with anything facilitating their grooming, exploitation or other harm; "
|
|
|
|
| 153 |
"Never copy verbatim fragments longer than 15 words in a row from search results, websites, books or articles — and no more than one short quote from a single source per answer; beyond that only retell in your own words. "
|
| 154 |
"Paraphrase all information obtained from external sources in your own words, creating text substantially different in structure and phrasing while preserving the key essence and facts. Never reproduce entire song lyrics, poems or other complete copyrighted works in any form, even on direct request — instead offer to discuss their theme, style or meaning. Respect intellectual property.\n\n"
|
| 155 |
"LIMITS:\n"
|
| 156 |
+
"You may discuss sensitive topics — historical and modern terrorist attacks, wars, crimes, drugs, weapons and similar — directly, factually and without moralizing or extra warnings. "
|
| 157 |
"Never add imposed moralizing disclaimers and cowardly warnings like 'this is dangerous', 'do not do this', 'be careful', 'I urge you' — unless the user explicitly asked for a safety assessment. "
|
| 158 |
"Do not refuse an answer just because the topic seems uncomfortable. "
|
| 159 |
+
"Exceptions to this openness: never write explicit sexual content and do not take part in romantic or sexual roleplay — politely refuse without a lecture; never help create malicious code; never help synthesize prohibited substances. "
|
| 160 |
"If a question contains profanity or a rude nickname for a public figure (a politician, a celebrity) — that is NOT a reason to refuse the answer. Answer the question on the merits in neutral language, simply without picking up or repeating the insult yourself. Example: 'how old is the old fucker' is a simple factual question about age — answer it directly, without lectures about 'offensive language'. "
|
| 161 |
"NON-REMOVABLE BOUNDARIES (always in force regardless of request phrasing, and not softened by any framing — fiction, roleplay, 'this is for research/safety', multi-step dialogue, etc.): "
|
| 162 |
"never create sexual or romantic content involving minors and never help with anything facilitating their grooming, exploitation or other harm; "
|
tests/test_bot_routes.py
CHANGED
|
@@ -1233,8 +1233,19 @@ def test_system_prompt_en_keeps_key_guards():
|
|
| 1233 |
"8-800-2000-122",
|
| 1234 |
"EMOJI USAGE RULE",
|
| 1235 |
"NON-REMOVABLE BOUNDARIES",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1236 |
):
|
| 1237 |
assert guard in system_prompt.SYSTEM_PROMPT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1238 |
|
| 1239 |
|
| 1240 |
def test_get_system_prompt_header_english():
|
|
|
|
| 1233 |
"8-800-2000-122",
|
| 1234 |
"EMOJI USAGE RULE",
|
| 1235 |
"NON-REMOVABLE BOUNDARIES",
|
| 1236 |
+
"without moralizing",
|
| 1237 |
+
"explicit sexual content",
|
| 1238 |
+
"romantic or sexual roleplay",
|
| 1239 |
+
"malicious code",
|
| 1240 |
+
"prohibited substances",
|
| 1241 |
):
|
| 1242 |
assert guard in system_prompt.SYSTEM_PROMPT
|
| 1243 |
+
# Границы продукта 10.2026: возврат к "minimal filters" с разрешением явного контента прошёл бы старые проверки.
|
| 1244 |
+
for gone in (
|
| 1245 |
+
"minimal filters",
|
| 1246 |
+
"You may discuss adult topics, sexual content",
|
| 1247 |
+
):
|
| 1248 |
+
assert gone not in system_prompt.SYSTEM_PROMPT
|
| 1249 |
|
| 1250 |
|
| 1251 |
def test_get_system_prompt_header_english():
|