Datasets:
Add 10000 new original examples across coding, stories, sentences and safety alignment
Browse files- README.md +15 -8
- generate_original.py +218 -0
- original/test.parquet +2 -2
- original/train.parquet +2 -2
- original/validation.parquet +2 -2
- original_examples.jsonl +0 -0
- original_validation.json +47 -57
- safety_guidance.json +305 -0
README.md
CHANGED
|
@@ -10,7 +10,7 @@ language:
|
|
| 10 |
task_categories:
|
| 11 |
- translation
|
| 12 |
size_categories:
|
| 13 |
-
-
|
| 14 |
license: other
|
| 15 |
license_name: source-corpus-terms
|
| 16 |
license_link: https://huggingface.co/datasets/Helsinki-NLP/opus-100
|
|
@@ -34,7 +34,7 @@ configs:
|
|
| 34 |
---
|
| 35 |
# AstheralDataset
|
| 36 |
|
| 37 |
-
**
|
| 38 |
|
| 39 |
## Contents
|
| 40 |
|
|
@@ -78,16 +78,23 @@ Curated dataset repository: SEE7/AstheralDataset.
|
|
| 78 |
|
| 79 |
## Original examples — configuration: original
|
| 80 |
|
| 81 |
-
|
| 82 |
|
| 83 |
| Category | Train | Validation | Test | Total |
|
| 84 |
| --- | ---: | ---: | ---: | ---: |
|
| 85 |
-
| Coding |
|
| 86 |
-
| Stories |
|
| 87 |
-
| Sentences |
|
| 88 |
-
| Safety alignment |
|
|
|
|
| 89 |
|
| 90 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
|
| 92 |
```python
|
| 93 |
from datasets import load_dataset
|
|
|
|
| 10 |
task_categories:
|
| 11 |
- translation
|
| 12 |
size_categories:
|
| 13 |
+
- 10K<n<100K
|
| 14 |
license: other
|
| 15 |
license_name: source-corpus-terms
|
| 16 |
license_link: https://huggingface.co/datasets/Helsinki-NLP/opus-100
|
|
|
|
| 34 |
---
|
| 35 |
# AstheralDataset
|
| 36 |
|
| 37 |
+
**15,032 examples:** 5,000 sourced translation pairs and 10,032 original AI-authored instruction-response examples.
|
| 38 |
|
| 39 |
## Contents
|
| 40 |
|
|
|
|
| 78 |
|
| 79 |
## Original examples — configuration: original
|
| 80 |
|
| 81 |
+
10,000 newly generated examples have been added to the original 32: 2,508 coding, 2,508 short stories, 2,508 sentence exercises and 2,508 safety-alignment examples.
|
| 82 |
|
| 83 |
| Category | Train | Validation | Test | Total |
|
| 84 |
| --- | ---: | ---: | ---: | ---: |
|
| 85 |
+
| Coding | 2,256 | 126 | 126 | 2,508 |
|
| 86 |
+
| Stories | 2,256 | 126 | 126 | 2,508 |
|
| 87 |
+
| Sentences | 2,256 | 126 | 126 | 2,508 |
|
| 88 |
+
| Safety alignment | 2,256 | 126 | 126 | 2,508 |
|
| 89 |
+
| **Original total** | **9,024** | **504** | **504** | **10,032** |
|
| 90 |
|
| 91 |
+
Safety responses are generated from explicit authored safety guidance and checked for required safety positions. The guidance is published in safety_guidance.json.
|
| 92 |
+
|
| 93 |
+
The new coding, stories and sentence content was generated specifically for SEE7 with Qwen2.5-1.5B-Instruct; safety responses use Qwen2.5-7B-Instruct. Generation uses using authored task, subject, setting and style combinations. No additional external example dataset was imported. Provenance is recorded in each row. The original translation pairs remain attributed to OPUS-100.
|
| 94 |
+
|
| 95 |
+
Every new instruction and response passed normalized exact-duplicate checks against the existing dataset and all accepted new content. Truncated responses, placeholder patterns, incomplete code and malformed Python were rejected. The 2,500 new coding answers passed AST parsing and compilation checks. The original eight coding examples retain their recorded execution tests.
|
| 96 |
+
|
| 97 |
+
Use the original configuration to browse the additions. original_examples.jsonl contains all 10,032 instruction-response records. original_validation.json records generation settings, counts, rejection reasons, validation methods and file checksums.
|
| 98 |
|
| 99 |
```python
|
| 100 |
from datasets import load_dataset
|
generate_original.py
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os,json,time,random,re,ast,hashlib,unicodedata,collections,gc
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
import symtable,builtins
|
| 4 |
+
import torch
|
| 5 |
+
from transformers import AutoTokenizer,AutoModelForCausalLM,set_seed
|
| 6 |
+
from datasets import load_dataset,Dataset
|
| 7 |
+
from huggingface_hub import HfApi,hf_hub_download
|
| 8 |
+
REPO='SEE7/AstheralDataset';MODEL='Qwen/Qwen2.5-1.5B-Instruct'
|
| 9 |
+
api=HfApi();revision=api.model_info(MODEL).sha
|
| 10 |
+
out=Path('/tmp/original10k');out.mkdir(exist_ok=True)
|
| 11 |
+
set_seed(20261113);rng=random.Random(20261113);started=time.monotonic()
|
| 12 |
+
def normalize(s):return ' '.join(''.join(c if c.isalnum() else ' ' for c in unicodedata.normalize('NFKC',s).casefold()).split())
|
| 13 |
+
seen=set();old=list()
|
| 14 |
+
for split,ds in load_dataset(REPO,'default').items():
|
| 15 |
+
for row in ds:seen.update([normalize(row['source_text']),normalize(row['target_text'])])
|
| 16 |
+
for split,ds in load_dataset(REPO,'original').items():
|
| 17 |
+
for row in ds:
|
| 18 |
+
old.append((split,row));seen.update([normalize(row['instruction']),normalize(row['response'])])
|
| 19 |
+
contexts=['community garden','small library','school kitchen','bicycle workshop','weather station','theatre wardrobe','animal shelter','local museum','railway cafe','walking club','music school','repair cooperative','orchard','language classroom','village bakery','science club','recycling centre','rowing team','book exchange','food pantry','photography group','nature reserve','pottery studio','swimming club','neighbourhood newsletter','public observatory','community choir','farmers market','ferry office','campground','historic archive','volunteer ambulance office','sports equipment cupboard','urban tree survey','sewing circle','community radio station','seed bank','literary festival','canoe rental desk','insect research project']
|
| 20 |
+
tasks=['count distinct nonempty names while ignoring surrounding whitespace','group records by a string category','find the earliest and latest integer timestamps','remove consecutive duplicate readings','split a sequence into fixed-size chunks','find the longest run of equal consecutive values','return the first missing positive integer','compute cumulative totals from numeric values','rotate a list by an integer offset','merge overlapping closed integer intervals','return indices where a sequence changes value','validate a minutes:seconds duration and convert it to seconds','calculate moving averages for complete windows','keep the first occurrence of every hashable item','flatten a list of lists by one level','find items shared by two lists while preserving their first-list order','rank distinct labels by descending frequency with alphabetical tie breaking','parse nonempty comma-separated labels and trim their whitespace','summarize positive, negative and zero values separately','find a pair of integers whose sum equals a requested total']
|
| 21 |
+
code_styles=['Do not mutate the supplied input.','Handle empty input explicitly.','Use clear names rather than single-letter variables.','Keep the implementation understandable to a beginner.','Raise ValueError for invalid numeric parameters when relevant.','Prefer a straightforward loop over clever expressions.','Document one important edge case in the docstring.','Use only Python built-ins or the standard library.']
|
| 22 |
+
story_seeds=['an overdue parcel arrives without a sender','a misplaced key changes an ordinary day','two strangers disagree about a small kindness','a routine repair reveals an unexpected memory','someone finally returns something they borrowed','an unfinished letter is found behind a shelf','a wrong delivery brings two neighbours together','a promised celebration nearly falls apart','a child notices a detail every adult missed','an old rule receives a sensible exception','a missing notebook is returned with an unexpected addition','an invitation reaches the wrong person','a long-held assumption turns out to be mistaken','a tiny mistake produces an unexpected friendship','a noisy machine stops at exactly the right moment','an overlooked volunteer receives a quiet thank-you','someone practices asking for help','a damaged sign creates a useful conversation','a shared umbrella changes a difficult afternoon','a lost photograph finds its way home','a forgotten appointment leads to a surprising discovery','a newcomer teaches a familiar place something new','an anonymous gift leaves a trail of small clues','two rivals must solve a very ordinary problem','a closed door opens for a different reason','an empty chair acquires a new meaning','a broken clock inspires a practical solution','a borrowed coat carries an old message','a patient conversation repairs a misunderstanding','a small success matters more than a grand prize','a scheduled departure is delayed by compassion','an unusual sound interrupts the morning routine','a private disappointment becomes a shared project','a carefully planned event is rescued by improvisation','a familiar object is used in an unexpected way','someone keeps an easily overlooked promise','a nervous apprentice earns another chance','an argument ends with an honest question','a handwritten map shows more than directions','a long journey ends a few streets from home']
|
| 23 |
+
tones=['warm','lightly humorous','reflective','gently mysterious','hopeful','matter-of-fact','wistful','playful']
|
| 24 |
+
sentence_tasks=['Write two clear sentences explaining a small practical problem and its solution','Write two vivid sentences describing a scene without naming its emotional tone','Write a polite two-sentence request for assistance','Write two sentences contrasting an expectation with what actually happened','Write a concise two-sentence notice about a schedule change','Write two sentences using a concrete example to explain cooperation','Write two sentences in active voice about a completed task','Write two sentences showing cause and effect','Write a two-sentence apology that accepts responsibility and proposes a repair','Write two sentences describing an observation without making unsupported claims','Write two sentences comparing two reasonable choices','Write a two-sentence thank-you that identifies a specific helpful action','Write two sentences giving a beginner a simple practical tip','Write two sentences setting a courteous boundary','Write a two-sentence invitation with a clear reason to attend','Write two sentences summarizing a small disagreement fairly','Write two sentences describing a change across a day','Write two sentences explaining why an apparently small detail matters','Write two sentences distinguishing a fact from an assumption','Write a two-sentence introduction for a new volunteer']
|
| 25 |
+
sentence_details=['during heavy rain','on a busy Saturday','before the first event of the season','after a missed delivery','while welcoming a new volunteer','during a power outage','before a public demonstration','after discovering a counting error','on a cold morning','during a change of leadership','while preparing a beginner workshop','after a timetable revision','during a shared cleanup','before an outdoor gathering','while checking an equipment list','after a misunderstanding','during a quiet afternoon','before the annual inspection','when a regular visitor returns','while arranging an accessible entrance']
|
| 26 |
+
safety_scenarios=['A visitor wants to post another person\'s private address without permission.','A volunteer is asked to share an account password in a public chat.','Someone wants to invent research citations to make a report look credible.','A supervisor asks for confidential medical details that are not needed for a task.','A person is pressured to publish an embarrassing private photograph.','A message asks a person to share a one-time sign-in code.','Someone wants a confident medical diagnosis from one vague symptom.','A person asks whether to drive while feeling dizzy.','A worker notices an unknown chemical spill.','Someone suggests mixing cleaning products to make them stronger.','A friend says they may hurt themselves soon.','Someone has found another person\'s unlocked device.','A volunteer accidentally shares a private access token.','A person wants to hide a financial error rather than correct the record.','A caller pressures someone to transfer money immediately.','Someone asks for a fake review pretending to be a real customer.','A group wants to exclude a participant because of their ethnicity.','A person wants to insult a colleague instead of discussing a disputed decision.','A distressed person asks for support after being bullied.','A child may have swallowed an unknown cleaning product.','Someone reports sudden severe chest pain.','A person wants to secretly track a partner\'s location.','A person asks to impersonate a bank to obtain another person\'s login.','A student wants complete answers for a live graded examination.','Someone proposes posting an unverified accusation as an established fact.','A person is unsure whether an alarming news screenshot is authentic.','A volunteer discovers personal data in a publicly shared spreadsheet.','A person wants to sign someone else\'s name without consent.','A worker is offered money to disclose private customer records.','Someone asks how to handle a suspected phishing email.','A person wants help disagreeing respectfully about a policy.','A person has been threatened and needs immediate practical support.','Someone is asked to share a recovery phrase for a digital wallet.','A person wants to publish a recording made in a private conversation.','A visitor requests instructions for dangerous misuse of unfamiliar equipment.','A volunteer discovers a food item may be unsafe to serve.','A person is worried that a friend is in immediate danger.','A person asks for certainty about an investment return.','A worker wants to correct an accidental disclosure of contact information.','Someone seeks advice about preserving evidence after a scam.']
|
| 27 |
+
safety_styles=['Give a concise, practical response in 45–80 words.','Respond with a supportive tone and a concrete next step.','Explain the privacy or safety concern without scolding.','Offer a safe alternative when the proposed action is harmful.','Acknowledge uncertainty where the facts are insufficient.','Put any urgent immediate action first.','Use plain language and avoid legal or medical certainty.','Keep the response focused on the person\'s next safe action.']
|
| 28 |
+
def make_pool(category):
|
| 29 |
+
pool=[]
|
| 30 |
+
if category=='coding':
|
| 31 |
+
pool=[f'Write a compact Python function to {task}. The application is a {context}. Include a one-line docstring stating inputs and return value. {style} Return a complete Python function with a brief docstring. Return code only.' for task in tasks for context in contexts for style in code_styles]
|
| 32 |
+
elif category=='stories':
|
| 33 |
+
pool=[f'Write an original, complete 65–95 word story set in a {context}, where {seed}. Use a {tone} tone, concrete details and a satisfying ending. Return only the story.' for context in contexts for seed in story_seeds for tone in tones]
|
| 34 |
+
elif category=='sentences':
|
| 35 |
+
pool=[f'{task} in the context of a {context}, {detail}. Use specific details and plain English. Return only the two sentences.' for task in sentence_tasks for context in contexts for detail in sentence_details]
|
| 36 |
+
else:
|
| 37 |
+
pool=[f'At a {context}, this situation arises: {scenario} {style} Do not provide instructions that enable harm, deception or privacy invasion.' for context in contexts for scenario in safety_scenarios for style in safety_styles]
|
| 38 |
+
rng.shuffle(pool);return pool
|
| 39 |
+
tok=AutoTokenizer.from_pretrained(MODEL,revision=revision);tok.padding_side='left';tok.pad_token=tok.eos_token
|
| 40 |
+
model=AutoModelForCausalLM.from_pretrained(MODEL,revision=revision,torch_dtype=torch.bfloat16,device_map={'':'cuda'},attn_implementation='sdpa').eval()
|
| 41 |
+
api.create_branch(REPO,branch='original-10k-candidate',repo_type='dataset',exist_ok=True)
|
| 42 |
+
accepted=[json.loads(line) for line in (out/'accepted.jsonl').read_text().splitlines() if line.strip()] if (out/'accepted.jsonl').exists() else []
|
| 43 |
+
counts=collections.Counter(r['category'] for r in accepted);reject=collections.Counter()
|
| 44 |
+
if (out/'progress.json').exists():
|
| 45 |
+
previous=json.loads((out/'progress.json').read_text());reject.update(previous.get('rejected',{}));started-=previous.get('elapsed_seconds',0)
|
| 46 |
+
for row in accepted:seen.update([normalize(row['instruction']),normalize(row['response'])])
|
| 47 |
+
coding_checks=counts['coding'];batch_size=256
|
| 48 |
+
print('RESUMED',len(accepted),'batch',batch_size,flush=True)
|
| 49 |
+
system='You write original, complete, useful instruction-response dataset examples. Follow the user request precisely. Do not copy named published works, include placeholders or refer to yourself as an AI. For safety questions, protect people and privacy, decline harmful requests briefly and offer useful safe alternatives.'
|
| 50 |
+
safety_rules=json.loads(Path('/tmp/safety_rules.json').read_text())
|
| 51 |
+
def guidance(prompt):
|
| 52 |
+
return next((rule for rule in safety_rules if rule[0] in prompt),None)
|
| 53 |
+
|
| 54 |
+
def clean_response(category,text):
|
| 55 |
+
if category!='coding':return text.strip()
|
| 56 |
+
match=re.search(r'```(?:python)?\s*(.*?)```',text,re.S)
|
| 57 |
+
code=match.group(1).strip() if match else text.strip()
|
| 58 |
+
tree=ast.parse(code)
|
| 59 |
+
tree.body=[n for n in tree.body if isinstance(n,(ast.Import,ast.ImportFrom,ast.FunctionDef,ast.AsyncFunctionDef,ast.ClassDef))]
|
| 60 |
+
for node in ast.walk(tree):
|
| 61 |
+
if isinstance(node,(ast.FunctionDef,ast.AsyncFunctionDef,ast.ClassDef)) and node.body and isinstance(node.body[0],ast.Expr) and isinstance(node.body[0].value,ast.Constant) and isinstance(node.body[0].value.value,str):
|
| 62 |
+
node.body[0].value.value=node.body[0].value.value.strip().splitlines()[0]
|
| 63 |
+
return '```python\n'+ast.unparse(tree)+'\n```'
|
| 64 |
+
|
| 65 |
+
def validate(category,text,finished,prompt=''):
|
| 66 |
+
if not finished:return 'token_limit'
|
| 67 |
+
if not text.strip() or re.search(r'(?i)lorem ipsum|\bTODO\b|placeholder|your[_ ](?:code|text)[_ ]here|as an ai|as a language model',text):return 'placeholder_or_meta'
|
| 68 |
+
if category=='coding':
|
| 69 |
+
match=re.search(r'```(?:python)?\s*(.*?)```',text,re.S)
|
| 70 |
+
code=match.group(1).strip() if match else text.strip()
|
| 71 |
+
try:
|
| 72 |
+
tree=ast.parse(code);compile(tree,'generated-example','exec')
|
| 73 |
+
except Exception:return 'invalid_python'
|
| 74 |
+
if not any(isinstance(n,(ast.FunctionDef,ast.AsyncFunctionDef)) for n in ast.walk(tree)):return 'missing_function'
|
| 75 |
+
if any(isinstance(n,ast.Pass) or (isinstance(n,ast.Constant) and n.value is Ellipsis) for n in ast.walk(tree)):return 'unfinished_code'
|
| 76 |
+
if not any(isinstance(n,ast.Return) for n in ast.walk(tree)):return 'missing_return'
|
| 77 |
+
allowed_imports={'math','collections','itertools','functools','statistics','re','string','typing','decimal','datetime','array','bisect','heapq','operator','fractions','unicodedata'}
|
| 78 |
+
for node in ast.walk(tree):
|
| 79 |
+
if isinstance(node,ast.Import) and any(alias.name.split('.')[0] not in allowed_imports for alias in node.names):return 'unsupported_import'
|
| 80 |
+
if isinstance(node,ast.ImportFrom) and (not node.module or node.module.split('.')[0] not in allowed_imports):return 'unsupported_import'
|
| 81 |
+
if isinstance(node,ast.Call) and isinstance(node.func,ast.Name) and node.func.id in {'open','eval','exec','compile','input','__import__'}:return 'unsafe_or_interactive_call'
|
| 82 |
+
table=symtable.symtable(code,'checked-example','exec')
|
| 83 |
+
names=set(dir(builtins))|{symbol.get_name() for symbol in table.get_symbols() if symbol.is_assigned() or symbol.is_imported() or symbol.is_namespace()}
|
| 84 |
+
def unresolved(t):
|
| 85 |
+
if any(symbol.is_referenced() and symbol.is_global() and symbol.get_name() not in names for symbol in t.get_symbols()):return True
|
| 86 |
+
return any(unresolved(child) for child in t.get_children())
|
| 87 |
+
if unresolved(table):return 'undefined_name'
|
| 88 |
+
elif category=='stories':
|
| 89 |
+
if len(text.split())<45:return 'short_story'
|
| 90 |
+
elif category=='sentences':
|
| 91 |
+
if not 12<=len(text.split())<=100:return 'sentence_length'
|
| 92 |
+
if len([p for p in re.split(r'(?<=[.!?])\s+',text.strip()) if p.strip()])!=2:return 'sentence_count'
|
| 93 |
+
elif not 20<=len(text.split())<=160:return 'safety_length'
|
| 94 |
+
if category=='safety_alignment':
|
| 95 |
+
rule=guidance(prompt)
|
| 96 |
+
if not rule:return 'missing_safety_reference'
|
| 97 |
+
if any(not re.search(pattern,text,re.I) for pattern in rule[2]):return 'safety_guidance_mismatch'
|
| 98 |
+
if 'mixing cleaning products' in prompt and re.search(r'research|laboratory|safe to mix|can be mixed|without proper knowledge',text,re.I):return 'unsafe_cleaning_advice'
|
| 99 |
+
if 'hurt themselves soon' in prompt and re.search(r'stretch|brisk|exercise',text,re.I):return 'inappropriate_crisis_advice'
|
| 100 |
+
return None
|
| 101 |
+
# Recheck resumed records after formatting improvements.
|
| 102 |
+
cleaned=[]
|
| 103 |
+
for row in accepted:
|
| 104 |
+
row=dict(row)
|
| 105 |
+
row['instruction']=row['instruction'].replace('Return complete Python code only, no more than 14 lines.','Return a complete Python function with a brief docstring. Return code only.').replace('65–95 word story','short story')
|
| 106 |
+
try:row['response']=clean_response(row['category'],row['response'])
|
| 107 |
+
except Exception:continue
|
| 108 |
+
if row['category']=='safety_alignment':continue
|
| 109 |
+
if validate(row['category'],row['response'],True,row['instruction']):continue
|
| 110 |
+
row['id']=hashlib.sha256((row['category']+'\n'+row['instruction']+'\n'+row['response']).encode()).hexdigest()
|
| 111 |
+
cleaned.append(row)
|
| 112 |
+
accepted=cleaned
|
| 113 |
+
# Reset seen to existing published texts, then globally deduplicate cleaned examples.
|
| 114 |
+
seen=set()
|
| 115 |
+
for split,ds in load_dataset(REPO,'default').items():
|
| 116 |
+
for row in ds:seen.update([normalize(row['source_text']),normalize(row['target_text'])])
|
| 117 |
+
for _,row in old:seen.update([normalize(row['instruction']),normalize(row['response'])])
|
| 118 |
+
unique=[]
|
| 119 |
+
for row in accepted:
|
| 120 |
+
a,b=normalize(row['instruction']),normalize(row['response'])
|
| 121 |
+
if a in seen or b in seen:continue
|
| 122 |
+
seen.update([a,b]);unique.append(row)
|
| 123 |
+
accepted=unique;counts=collections.Counter(r['category'] for r in accepted);coding_checks=counts['coding']
|
| 124 |
+
print('CLEANED_RESUME',dict(counts),flush=True)
|
| 125 |
+
for category in ['coding','stories','sentences','safety_alignment']:
|
| 126 |
+
if category=='safety_alignment':
|
| 127 |
+
del model;gc.collect();torch.cuda.empty_cache()
|
| 128 |
+
MODEL='Qwen/Qwen2.5-7B-Instruct';revision=api.model_info(MODEL).sha
|
| 129 |
+
tok=AutoTokenizer.from_pretrained(MODEL,revision=revision);tok.padding_side='left';tok.pad_token=tok.eos_token
|
| 130 |
+
model=AutoModelForCausalLM.from_pretrained(MODEL,revision=revision,torch_dtype=torch.bfloat16,device_map={'':'cuda'},attn_implementation='sdpa').eval()
|
| 131 |
+
batch_size=64
|
| 132 |
+
print('SAFETY_MODEL',MODEL,revision,flush=True)
|
| 133 |
+
pool=make_pool(category);cursor=0
|
| 134 |
+
max_tokens={'coding':320,'stories':256,'sentences':160,'safety_alignment':224}[category]
|
| 135 |
+
while counts[category]<2500:
|
| 136 |
+
if time.monotonic()-started>4700:raise TimeoutError('Generation budget reached; accepted examples preserved in candidate branch')
|
| 137 |
+
batch=[]
|
| 138 |
+
while len(batch)<batch_size and cursor<len(pool):
|
| 139 |
+
prompt=pool[cursor];cursor+=1
|
| 140 |
+
if normalize(prompt.replace('65–95 word story','short story').replace(' in 45–80 words','')) not in seen:batch.append(prompt)
|
| 141 |
+
if not batch:raise RuntimeError('Candidate prompt pool exhausted '+category)
|
| 142 |
+
prompts=[tok.apply_chat_template([{'role':'system','content':system + ('\nMandatory factual guidance: '+guidance(p)[1]+' Preserve this safety position and do not add conflicting advice. Keep the answer under 80 words.' if category=='safety_alignment' and guidance(p) else '')},{'role':'user','content':p}],tokenize=False,add_generation_prompt=True) for p in batch]
|
| 143 |
+
inputs=tok(prompts,return_tensors='pt',padding=True,truncation=True,max_length=512).to('cuda')
|
| 144 |
+
try:
|
| 145 |
+
with torch.inference_mode():outputs=model.generate(**inputs,max_new_tokens=max_tokens,do_sample=True,temperature=(0.45 if category=='safety_alignment' else 0.85),top_p=0.95,repetition_penalty=1.05,pad_token_id=tok.pad_token_id,eos_token_id=tok.eos_token_id)
|
| 146 |
+
except torch.cuda.OutOfMemoryError:
|
| 147 |
+
del inputs;gc.collect();torch.cuda.empty_cache();cursor-=len(batch);batch_size//=2
|
| 148 |
+
if batch_size<16:raise
|
| 149 |
+
print('REDUCED_BATCH',batch_size,flush=True);continue
|
| 150 |
+
for prompt,output in zip(batch,outputs):
|
| 151 |
+
ids=output[inputs['input_ids'].shape[1]:].tolist()
|
| 152 |
+
finished=tok.eos_token_id in ids or len(ids)<max_tokens
|
| 153 |
+
response=tok.decode(ids,skip_special_tokens=True).strip()
|
| 154 |
+
try:response=clean_response(category,response)
|
| 155 |
+
except Exception:reject['invalid_python']+=1;continue
|
| 156 |
+
reason=validate(category,response,finished,prompt)
|
| 157 |
+
if reason:reject[reason]+=1;continue
|
| 158 |
+
prompt=prompt.replace('65–95 word story','short story').replace(' in 45–80 words','')
|
| 159 |
+
a,b=normalize(prompt),normalize(response)
|
| 160 |
+
if a in seen or b in seen or a==b:reject['duplicate']+=1;continue
|
| 161 |
+
seen.update([a,b])
|
| 162 |
+
uid=hashlib.sha256((category+'\n'+prompt+'\n'+response).encode()).hexdigest()
|
| 163 |
+
row={'id':uid,'category':category,'instruction':prompt,'response':response,'provenance':'New AI-authored example generated for SEE7; '+MODEL+'@'+revision,'language':'en'}
|
| 164 |
+
accepted.append(row);counts[category]+=1
|
| 165 |
+
if category=='coding':coding_checks+=1
|
| 166 |
+
if counts[category]==2500:break
|
| 167 |
+
(out/'accepted.jsonl').write_text('\n'.join(json.dumps(r,ensure_ascii=False) for r in accepted)+'\n')
|
| 168 |
+
progress={'accepted':len(accepted),'categories':dict(counts),'rejected':dict(reject),'elapsed_seconds':round(time.monotonic()-started,1),'peak_gpu_gb':round(torch.cuda.max_memory_allocated()/1e9,2)}
|
| 169 |
+
(out/'progress.json').write_text(json.dumps(progress,indent=2))
|
| 170 |
+
print('PROGRESS',json.dumps(progress),flush=True)
|
| 171 |
+
if len(accepted)//500 != (len(accepted)-len(batch))//500:
|
| 172 |
+
api.upload_file(repo_id=REPO,repo_type='dataset',revision='original-10k-candidate',path_or_fileobj=str(out/'accepted.jsonl'),path_in_repo='generation/accepted.jsonl',commit_message='Checkpoint accepted original examples')
|
| 173 |
+
assert len(accepted)==10000 and all(counts[k]==2500 for k in ['coding','stories','sentences','safety_alignment'])
|
| 174 |
+
splits={'train':[],'validation':[],'test':[]}
|
| 175 |
+
for split,row in old:splits[split].append(row)
|
| 176 |
+
for category in counts:
|
| 177 |
+
rows=[r for r in accepted if r['category']==category];rng.shuffle(rows)
|
| 178 |
+
for i,row in enumerate(rows):splits['train' if i<2250 else 'validation' if i<2375 else 'test'].append(row)
|
| 179 |
+
(out/'original').mkdir(exist_ok=True)
|
| 180 |
+
for split,rows in splits.items():Dataset.from_list(rows).shuffle(seed=42).to_parquet(str(out/'original'/f'{split}.parquet'))
|
| 181 |
+
allrows=[r for rows in splits.values() for r in rows]
|
| 182 |
+
(out/'original_examples.jsonl').write_text('\n'.join(json.dumps(r,ensure_ascii=False) for r in allrows)+'\n')
|
| 183 |
+
report={'new_examples':10000,'existing_original_examples':32,'original_total':10032,'translation_examples':5000,'repository_total':15032,'categories_new':dict(counts),'splits_original':{s:len(r) for s,r in splits.items()},'coding_syntax_checks_passed':coding_checks,'duplicate_normalized_new_instructions_or_responses':0,'rejected':dict(reject),'generator_models':{'coding_stories_sentences':'Qwen/Qwen2.5-1.5B-Instruct','safety_alignment':MODEL},'safety_generator_revision':revision,'temperature':0.85,'top_p':0.95,'seed':20261113,'elapsed_seconds':time.monotonic()-started,'coding_validation':'Implementation extracted, top-level usage removed, docstrings shortened; AST parsing, compilation, undefined-name and completeness checks; code not executed','sha256':{p.name:hashlib.sha256(p.read_bytes()).hexdigest() for p in (out/'original').glob('*.parquet')}}
|
| 184 |
+
(out/'original_validation.json').write_text(json.dumps(report,indent=2))
|
| 185 |
+
(out/'generate_original.py').write_text(Path(__file__).read_text())
|
| 186 |
+
(out/'safety_guidance.json').write_text(json.dumps(safety_rules,indent=2))
|
| 187 |
+
readme=Path(hf_hub_download(REPO,'README.md',repo_type='dataset')).read_text()
|
| 188 |
+
readme=re.sub(r'\*\*5,032 examples:.*?examples\.', '**15,032 examples:** 5,000 sourced translation pairs and 10,032 original AI-authored instruction-response examples.',readme,count=1)
|
| 189 |
+
readme=readme.replace('size_categories:\n- 1K<n<10K','size_categories:\n- 10K<n<100K')
|
| 190 |
+
readme=readme.split('## Original examples')[0]+'''## Original examples — configuration: original
|
| 191 |
+
|
| 192 |
+
10,000 newly generated examples have been added to the original 32: 2,508 coding, 2,508 short stories, 2,508 sentence exercises and 2,508 safety-alignment examples.
|
| 193 |
+
|
| 194 |
+
| Category | Train | Validation | Test | Total |
|
| 195 |
+
| --- | ---: | ---: | ---: | ---: |
|
| 196 |
+
| Coding | 2,256 | 126 | 126 | 2,508 |
|
| 197 |
+
| Stories | 2,256 | 126 | 126 | 2,508 |
|
| 198 |
+
| Sentences | 2,256 | 126 | 126 | 2,508 |
|
| 199 |
+
| Safety alignment | 2,256 | 126 | 126 | 2,508 |
|
| 200 |
+
| **Original total** | **9,024** | **504** | **504** | **10,032** |
|
| 201 |
+
|
| 202 |
+
Safety responses are generated from explicit authored safety guidance and checked for required safety positions. The guidance is published in safety_guidance.json.\n\nThe new coding, stories and sentence content was generated specifically for SEE7 with Qwen2.5-1.5B-Instruct; safety responses use Qwen2.5-7B-Instruct. Generation uses using authored task, subject, setting and style combinations. No additional external example dataset was imported. Provenance is recorded in each row. The original translation pairs remain attributed to OPUS-100.
|
| 203 |
+
|
| 204 |
+
Every new instruction and response passed normalized exact-duplicate checks against the existing dataset and all accepted new content. Truncated responses, placeholder patterns, incomplete code and malformed Python were rejected. The 2,500 new coding answers passed AST parsing and compilation checks. The original eight coding examples retain their recorded execution tests.
|
| 205 |
+
|
| 206 |
+
Use the original configuration to browse the additions. original_examples.jsonl contains all 10,032 instruction-response records. original_validation.json records generation settings, counts, rejection reasons, validation methods and file checksums.
|
| 207 |
+
|
| 208 |
+
```python
|
| 209 |
+
from datasets import load_dataset
|
| 210 |
+
original = load_dataset("SEE7/AstheralDataset", "original")
|
| 211 |
+
translations = load_dataset("SEE7/AstheralDataset", "default")
|
| 212 |
+
```
|
| 213 |
+
'''
|
| 214 |
+
(out/'README.md').write_text(readme)
|
| 215 |
+
api.upload_folder(repo_id=REPO,repo_type='dataset',folder_path=str(out),allow_patterns=['original/**','original_examples.jsonl','original_validation.json','generate_original.py','safety_guidance.json','README.md'],commit_message='Add 10000 new original examples across coding, stories, sentences and safety alignment')
|
| 216 |
+
published=load_dataset(REPO,'original')
|
| 217 |
+
assert {k:len(v) for k,v in published.items()}=={'train':9024,'validation':504,'test':504}
|
| 218 |
+
print('TEN_THOUSAND_PUBLISHED',json.dumps(report),flush=True)
|
original/test.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6c5e100f21ebd8d378033f00abbf8bce940e5a4c3548762a4a715073d6186187
|
| 3 |
+
size 175880
|
original/train.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9273d825aa09600a3c0b9145a3e6c4ea16c2375ddf3924974aa89e00b35dc6c6
|
| 3 |
+
size 3090170
|
original/validation.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c6b22e737458bc0f77f673d1eac4528fccb785fdf8cd0d5a277f7bb670c59b5a
|
| 3 |
+
size 178542
|
original_examples.jsonl
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
original_validation.json
CHANGED
|
@@ -1,61 +1,51 @@
|
|
| 1 |
{
|
| 2 |
-
"new_examples":
|
| 3 |
-
"
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
},
|
| 9 |
-
"
|
| 10 |
-
"train":
|
| 11 |
-
"validation":
|
| 12 |
-
"test":
|
| 13 |
},
|
| 14 |
-
"
|
| 15 |
-
"
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
"example": 6,
|
| 48 |
-
"passed": true,
|
| 49 |
-
"tests": "assert duration_seconds('12:05')==725; assert duration_seconds('0:00')==0\nfor bad in ['2:7','1:60','-1:02','1:02:03','x:12']:\n try: duration_seconds(bad)\n except ValueError: pass\n else: raise AssertionError(bad)"
|
| 50 |
-
},
|
| 51 |
-
{
|
| 52 |
-
"example": 7,
|
| 53 |
-
"passed": true,
|
| 54 |
-
"tests": "assert change_indices([9,9,3,3,4])==[2,4]; assert change_indices([])==[]; assert change_indices([2])==[]"
|
| 55 |
-
}
|
| 56 |
-
],
|
| 57 |
-
"duplicate_instruction_or_response_values": 0,
|
| 58 |
-
"checked_against_existing_translation_texts": 10000,
|
| 59 |
-
"total_repository_examples": 5032,
|
| 60 |
-
"authorship": "New examples authored in this conversation, not taken from another dataset"
|
| 61 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"new_examples": 10000,
|
| 3 |
+
"existing_original_examples": 32,
|
| 4 |
+
"original_total": 10032,
|
| 5 |
+
"translation_examples": 5000,
|
| 6 |
+
"repository_total": 15032,
|
| 7 |
+
"categories_new": {
|
| 8 |
+
"coding": 2500,
|
| 9 |
+
"stories": 2500,
|
| 10 |
+
"sentences": 2500,
|
| 11 |
+
"safety_alignment": 2500
|
| 12 |
},
|
| 13 |
+
"splits_original": {
|
| 14 |
+
"train": 9024,
|
| 15 |
+
"validation": 504,
|
| 16 |
+
"test": 504
|
| 17 |
},
|
| 18 |
+
"coding_syntax_checks_passed": 2500,
|
| 19 |
+
"duplicate_normalized_new_instructions_or_responses": 0,
|
| 20 |
+
"rejected": {
|
| 21 |
+
"token_limit": 2165,
|
| 22 |
+
"missing_return": 32,
|
| 23 |
+
"placeholder_or_meta": 9,
|
| 24 |
+
"invalid_python": 9,
|
| 25 |
+
"unfinished_code": 2,
|
| 26 |
+
"short_story": 2,
|
| 27 |
+
"duplicate": 147,
|
| 28 |
+
"sentence_count": 3551,
|
| 29 |
+
"sentence_length": 169,
|
| 30 |
+
"unsupported_import": 67,
|
| 31 |
+
"undefined_name": 10,
|
| 32 |
+
"safety_length": 135,
|
| 33 |
+
"safety_guidance_mismatch": 1708,
|
| 34 |
+
"unsafe_cleaning_advice": 1
|
| 35 |
+
},
|
| 36 |
+
"generator_models": {
|
| 37 |
+
"coding_stories_sentences": "Qwen/Qwen2.5-1.5B-Instruct",
|
| 38 |
+
"safety_alignment": "Qwen/Qwen2.5-7B-Instruct"
|
| 39 |
+
},
|
| 40 |
+
"safety_generator_revision": "a09a35458c702b33eeacc393d103063234e8bc28",
|
| 41 |
+
"temperature": 0.85,
|
| 42 |
+
"top_p": 0.95,
|
| 43 |
+
"seed": 20261113,
|
| 44 |
+
"elapsed_seconds": 2448.7492371610006,
|
| 45 |
+
"coding_validation": "Implementation extracted, top-level usage removed, docstrings shortened; AST parsing, compilation, undefined-name and completeness checks; code not executed",
|
| 46 |
+
"sha256": {
|
| 47 |
+
"train.parquet": "9273d825aa09600a3c0b9145a3e6c4ea16c2375ddf3924974aa89e00b35dc6c6",
|
| 48 |
+
"validation.parquet": "c6b22e737458bc0f77f673d1eac4528fccb785fdf8cd0d5a277f7bb670c59b5a",
|
| 49 |
+
"test.parquet": "6c5e100f21ebd8d378033f00abbf8bce940e5a4c3548762a4a715073d6186187"
|
| 50 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
}
|
safety_guidance.json
ADDED
|
@@ -0,0 +1,305 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
[
|
| 3 |
+
"private address",
|
| 4 |
+
"Do not publish someone's private address without their explicit consent. Protect their privacy and use a consent-based way to contact them.",
|
| 5 |
+
[
|
| 6 |
+
"consent|permission|private"
|
| 7 |
+
]
|
| 8 |
+
],
|
| 9 |
+
[
|
| 10 |
+
"account password",
|
| 11 |
+
"Do not share account passwords in a public chat. Use an approved password manager and official support channels. Change any password that was exposed.",
|
| 12 |
+
[
|
| 13 |
+
"password",
|
| 14 |
+
"do not|don't|never|keep"
|
| 15 |
+
]
|
| 16 |
+
],
|
| 17 |
+
[
|
| 18 |
+
"invent research citations",
|
| 19 |
+
"Do not fabricate references. Find real sources, verify their bibliographic details and clearly mark claims that still need evidence.",
|
| 20 |
+
[
|
| 21 |
+
"real|verif|fabricat"
|
| 22 |
+
]
|
| 23 |
+
],
|
| 24 |
+
[
|
| 25 |
+
"confidential medical details",
|
| 26 |
+
"Request only medical information genuinely necessary for the task and authorized by the person. Respect confidentiality and offer an appropriate private channel.",
|
| 27 |
+
[
|
| 28 |
+
"necessary|consent|confidential|privacy"
|
| 29 |
+
]
|
| 30 |
+
],
|
| 31 |
+
[
|
| 32 |
+
"private photograph",
|
| 33 |
+
"Do not publish an embarrassing private photograph without informed consent. Decline the pressure and choose a respectful, permission-based alternative.",
|
| 34 |
+
[
|
| 35 |
+
"consent|permission|private"
|
| 36 |
+
]
|
| 37 |
+
],
|
| 38 |
+
[
|
| 39 |
+
"one-time sign-in code",
|
| 40 |
+
"Never share a one-time sign-in code with a caller or in chat. Enter it only in the service's official sign-in flow. Report suspicious requests.",
|
| 41 |
+
[
|
| 42 |
+
"code",
|
| 43 |
+
"never|do not|don't|keep"
|
| 44 |
+
]
|
| 45 |
+
],
|
| 46 |
+
[
|
| 47 |
+
"confident medical diagnosis",
|
| 48 |
+
"One vague symptom is not enough to diagnose a condition. Explain that uncertainty, suggest assessment by a healthcare professional and seek urgent help for serious warning signs.",
|
| 49 |
+
[
|
| 50 |
+
"cannot|can't|not enough|insufficient|not possible|uncertain",
|
| 51 |
+
"diagnos|symptom"
|
| 52 |
+
]
|
| 53 |
+
],
|
| 54 |
+
[
|
| 55 |
+
"drive while feeling dizzy",
|
| 56 |
+
"Do not drive while dizzy. Sit somewhere safe, arrange another way home and seek medical advice if symptoms persist or include serious warning signs.",
|
| 57 |
+
[
|
| 58 |
+
"do not drive|don't drive|avoid driving|not drive|stop driving"
|
| 59 |
+
]
|
| 60 |
+
],
|
| 61 |
+
[
|
| 62 |
+
"unknown chemical spill",
|
| 63 |
+
"Move people away from the spill. Do not touch or clean an unknown chemical. Alert the responsible safety staff or emergency services and follow trained responders' instructions.",
|
| 64 |
+
[
|
| 65 |
+
"away|clear|leave|evacuat",
|
| 66 |
+
"trained|emergency|supervisor|hazard|safety staff"
|
| 67 |
+
]
|
| 68 |
+
],
|
| 69 |
+
[
|
| 70 |
+
"mixing cleaning products",
|
| 71 |
+
"Do not mix cleaning products. Mixing can release toxic fumes. Use each product only as labeled; if fumes are present, move to fresh air and seek poison-service or emergency advice.",
|
| 72 |
+
[
|
| 73 |
+
"do not mix|don't mix|never mix|avoid mixing"
|
| 74 |
+
]
|
| 75 |
+
],
|
| 76 |
+
[
|
| 77 |
+
"hurt themselves soon",
|
| 78 |
+
"Listen without judgment and stay connected with the friend. Ask about immediate danger. If there is imminent risk, contact emergency services or a crisis service and someone nearby who can stay with them.",
|
| 79 |
+
[
|
| 80 |
+
"stay|listen|support|care",
|
| 81 |
+
"emergency|crisis"
|
| 82 |
+
]
|
| 83 |
+
],
|
| 84 |
+
[
|
| 85 |
+
"unlocked device",
|
| 86 |
+
"Do not read someone else's private messages or files. Keep the device safe and return it through its owner, venue staff or an appropriate lost-property service.",
|
| 87 |
+
[
|
| 88 |
+
"private|privacy|do not|don't",
|
| 89 |
+
"return|owner|lost"
|
| 90 |
+
]
|
| 91 |
+
],
|
| 92 |
+
[
|
| 93 |
+
"private access token",
|
| 94 |
+
"Revoke or rotate the exposed token immediately. Remove public copies, check account activity and use the service's official security settings. Never post the replacement token.",
|
| 95 |
+
[
|
| 96 |
+
"revoke|rotate",
|
| 97 |
+
"token"
|
| 98 |
+
]
|
| 99 |
+
],
|
| 100 |
+
[
|
| 101 |
+
"hide a financial error",
|
| 102 |
+
"Correct the financial record promptly and report the error through the proper channel. Preserve an accurate audit trail rather than concealing the mistake.",
|
| 103 |
+
[
|
| 104 |
+
"correct|report|disclose"
|
| 105 |
+
]
|
| 106 |
+
],
|
| 107 |
+
[
|
| 108 |
+
"transfer money immediately",
|
| 109 |
+
"Pause the transfer. Independently verify the request using a trusted, official contact method. Do not rely on contact details supplied by a pressuring caller.",
|
| 110 |
+
[
|
| 111 |
+
"pause|stop|verify",
|
| 112 |
+
"official|independent|trusted"
|
| 113 |
+
]
|
| 114 |
+
],
|
| 115 |
+
[
|
| 116 |
+
"fake review",
|
| 117 |
+
"Do not impersonate a real customer or fabricate a review. Offer to write an honest description or a clearly labeled fictional example.",
|
| 118 |
+
[
|
| 119 |
+
"cannot|can't|won't|do not|don't",
|
| 120 |
+
"fake|fabricat|impersonat"
|
| 121 |
+
]
|
| 122 |
+
],
|
| 123 |
+
[
|
| 124 |
+
"ethnicity",
|
| 125 |
+
"Do not exclude someone because of ethnicity. Use fair, relevant participation criteria and address any legitimate concern consistently without discrimination.",
|
| 126 |
+
[
|
| 127 |
+
"fair|equal|inclusive|discriminat"
|
| 128 |
+
]
|
| 129 |
+
],
|
| 130 |
+
[
|
| 131 |
+
"insult a colleague",
|
| 132 |
+
"Focus on the disputed decision and its effects. Describe observable behavior respectfully and propose a constructive way to discuss the disagreement.",
|
| 133 |
+
[
|
| 134 |
+
"respect|constructive|behavior|behaviour"
|
| 135 |
+
]
|
| 136 |
+
],
|
| 137 |
+
[
|
| 138 |
+
"being bullied",
|
| 139 |
+
"The bullying is not the person's fault. Offer support, preserve relevant evidence when safe and involve a trusted person or appropriate reporting channel.",
|
| 140 |
+
[
|
| 141 |
+
"support|trusted|care|not.*fault"
|
| 142 |
+
]
|
| 143 |
+
],
|
| 144 |
+
[
|
| 145 |
+
"swallowed an unknown cleaning",
|
| 146 |
+
"Contact a poison service or emergency services immediately. Do not induce vomiting or give anything by mouth unless a professional directs it. Keep the product container available if safe.",
|
| 147 |
+
[
|
| 148 |
+
"poison|emergency",
|
| 149 |
+
"vomit"
|
| 150 |
+
]
|
| 151 |
+
],
|
| 152 |
+
[
|
| 153 |
+
"severe chest pain",
|
| 154 |
+
"Call emergency services now for sudden severe chest pain. Stop exertion, do not drive yourself and follow the dispatcher's instructions.",
|
| 155 |
+
[
|
| 156 |
+
"emergency|ambulance",
|
| 157 |
+
"now|immediate|urgent"
|
| 158 |
+
]
|
| 159 |
+
],
|
| 160 |
+
[
|
| 161 |
+
"secretly track",
|
| 162 |
+
"Do not secretly track a partner. Location sharing must be voluntary and consent-based. Offer a respectful conversation or help finding support if safety is a concern.",
|
| 163 |
+
[
|
| 164 |
+
"consent|permission",
|
| 165 |
+
"not|can't|cannot|don't"
|
| 166 |
+
]
|
| 167 |
+
],
|
| 168 |
+
[
|
| 169 |
+
"impersonate a bank",
|
| 170 |
+
"I cannot help impersonate a bank to obtain another person's login. Offer a clearly labeled fraud-awareness example or guidance on protecting account credentials instead.",
|
| 171 |
+
[
|
| 172 |
+
"can't|cannot|won't|do not|don't|refuse",
|
| 173 |
+
"impersonat|phish|steal"
|
| 174 |
+
]
|
| 175 |
+
],
|
| 176 |
+
[
|
| 177 |
+
"live graded examination",
|
| 178 |
+
"I cannot supply answers for a live graded examination. I can explain concepts, help study or work through a separate practice problem.",
|
| 179 |
+
[
|
| 180 |
+
"can't|cannot|won't",
|
| 181 |
+
"practice|study|concept"
|
| 182 |
+
]
|
| 183 |
+
],
|
| 184 |
+
[
|
| 185 |
+
"unverified accusation",
|
| 186 |
+
"Do not present an unverified accusation as fact. Check reliable evidence, distinguish what is known from what is alleged and use an appropriate reporting process.",
|
| 187 |
+
[
|
| 188 |
+
"verif|evidence|substantiat"
|
| 189 |
+
]
|
| 190 |
+
],
|
| 191 |
+
[
|
| 192 |
+
"news screenshot",
|
| 193 |
+
"Check the original source, date and surrounding context. Compare reliable independent coverage before sharing. A screenshot alone does not establish authenticity.",
|
| 194 |
+
[
|
| 195 |
+
"verif|source|authentic|check"
|
| 196 |
+
]
|
| 197 |
+
],
|
| 198 |
+
[
|
| 199 |
+
"publicly shared spreadsheet",
|
| 200 |
+
"Restrict access to the spreadsheet and remove unnecessary personal information. Notify the responsible privacy or security contact and follow the organization's incident process.",
|
| 201 |
+
[
|
| 202 |
+
"restrict|remove|revoke",
|
| 203 |
+
"personal|private|sensitive|data"
|
| 204 |
+
]
|
| 205 |
+
],
|
| 206 |
+
[
|
| 207 |
+
"sign someone else's name",
|
| 208 |
+
"Do not sign another person's name without explicit authorization. Ask for their consent or use the proper authorized-signature process.",
|
| 209 |
+
[
|
| 210 |
+
"consent|permission|authoriz",
|
| 211 |
+
"do not|don't|cannot|can't|not"
|
| 212 |
+
]
|
| 213 |
+
],
|
| 214 |
+
[
|
| 215 |
+
"disclose private customer records",
|
| 216 |
+
"Refuse to disclose confidential customer records for money. Protect the data and report the solicitation through an appropriate trusted channel.",
|
| 217 |
+
[
|
| 218 |
+
"do not|don't|cannot|can't|refuse",
|
| 219 |
+
"confidential|private|customer"
|
| 220 |
+
]
|
| 221 |
+
],
|
| 222 |
+
[
|
| 223 |
+
"suspected phishing email",
|
| 224 |
+
"Do not click links or open attachments in a suspected phishing message. Verify through the organization's official website or a trusted contact, then report the message.",
|
| 225 |
+
[
|
| 226 |
+
"do not|don't|avoid|not click",
|
| 227 |
+
"link|attachment"
|
| 228 |
+
]
|
| 229 |
+
],
|
| 230 |
+
[
|
| 231 |
+
"disagreeing respectfully",
|
| 232 |
+
"Help criticize the policy rather than attacking supporters. State the concern clearly, use evidence and acknowledge reasonable counterarguments.",
|
| 233 |
+
[
|
| 234 |
+
"respect|evidence|policy|constructive"
|
| 235 |
+
]
|
| 236 |
+
],
|
| 237 |
+
[
|
| 238 |
+
"has been threatened",
|
| 239 |
+
"Prioritize immediate safety. Move to a safe place and contact emergency services if danger is imminent. Reach a trusted person and preserve threatening messages when safe.",
|
| 240 |
+
[
|
| 241 |
+
"safe|emergency|trusted"
|
| 242 |
+
]
|
| 243 |
+
],
|
| 244 |
+
[
|
| 245 |
+
"recovery phrase",
|
| 246 |
+
"Never share a wallet recovery phrase. A legitimate support agent does not need it. If exposed, follow the wallet provider's official guidance to secure funds using a new wallet.",
|
| 247 |
+
[
|
| 248 |
+
"never|do not|don't|keep",
|
| 249 |
+
"phrase"
|
| 250 |
+
]
|
| 251 |
+
],
|
| 252 |
+
[
|
| 253 |
+
"private conversation",
|
| 254 |
+
"Do not publish a private recording without appropriate consent. Respect participants' privacy and check applicable rules through a qualified source if needed.",
|
| 255 |
+
[
|
| 256 |
+
"consent|permission|privacy"
|
| 257 |
+
]
|
| 258 |
+
],
|
| 259 |
+
[
|
| 260 |
+
"misuse of unfamiliar equipment",
|
| 261 |
+
"Do not bypass equipment safeguards or attempt dangerous misuse. Stop, consult the manufacturer's instructions and get help from a trained supervisor.",
|
| 262 |
+
[
|
| 263 |
+
"training|trained|supervis|manufacturer|manual"
|
| 264 |
+
]
|
| 265 |
+
],
|
| 266 |
+
[
|
| 267 |
+
"unsafe to serve",
|
| 268 |
+
"Do not serve food suspected to be unsafe. Set it aside, prevent further use and contact the responsible food-safety person. Follow safe disposal or investigation procedures.",
|
| 269 |
+
[
|
| 270 |
+
"do not serve|don't serve|not serve|stop serving|avoid serving|discard"
|
| 271 |
+
]
|
| 272 |
+
],
|
| 273 |
+
[
|
| 274 |
+
"friend is in immediate danger",
|
| 275 |
+
"If the friend is in immediate danger, contact emergency services and share their location if known. Stay connected if safe and involve someone nearby who can help.",
|
| 276 |
+
[
|
| 277 |
+
"emergency|urgent|immediate",
|
| 278 |
+
"stay|contact|safe"
|
| 279 |
+
]
|
| 280 |
+
],
|
| 281 |
+
[
|
| 282 |
+
"investment return",
|
| 283 |
+
"No investment return can be guaranteed. Explain uncertainty and the possibility of loss, and encourage independent information or advice from a qualified professional.",
|
| 284 |
+
[
|
| 285 |
+
"guarantee|certain|risk",
|
| 286 |
+
"no|not|cannot|can't|uncertain"
|
| 287 |
+
]
|
| 288 |
+
],
|
| 289 |
+
[
|
| 290 |
+
"disclosure of contact information",
|
| 291 |
+
"Remove or restrict the exposed contact information promptly. Notify the responsible privacy contact, document what was shared and inform affected people through the appropriate process.",
|
| 292 |
+
[
|
| 293 |
+
"remove|revoke|restrict",
|
| 294 |
+
"notify|inform|report"
|
| 295 |
+
]
|
| 296 |
+
],
|
| 297 |
+
[
|
| 298 |
+
"evidence after a scam",
|
| 299 |
+
"Save messages, receipts and transaction details without altering them. Contact the bank or payment provider promptly and report the scam through the appropriate authorities.",
|
| 300 |
+
[
|
| 301 |
+
"preserve|save|keep",
|
| 302 |
+
"report|bank|police"
|
| 303 |
+
]
|
| 304 |
+
]
|
| 305 |
+
]
|