gamedevelop commited on
Commit
a2ffa53
·
verified ·
1 Parent(s): 3f45d6f

Create chatcode/create_article_examples.py

Browse files
Files changed (1) hide show
  1. chatcode/create_article_examples.py +64 -0
chatcode/create_article_examples.py ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Build small authored behavior examples; these fictional packets are not factual training data."""
2
+ import json
3
+ from pathlib import Path
4
+
5
+
6
+ def build():
7
+ # Deliberately fictional topics and reserved example.org URLs avoid presenting
8
+ # synthetic bibliography entries as genuine research or real model outputs.
9
+ specifications = [
10
+ ("alder", "train", "Alder Valley Observatory", "an astronomical observatory", "2008",
11
+ "opened to visitors", "2014", "added a public telescope-viewing programme"),
12
+ ("birch", "train", "Birch Harbour Library", "a public library", "1996",
13
+ "opened its reading room", "2011", "introduced a local-history collection"),
14
+ ("cedar", "train", "Cedar Ridge Railway Museum", "a transport museum", "1982",
15
+ "opened a collection of railway equipment", "2005", "added a carriage-restoration workshop"),
16
+ ("dune", "train", "Dune Field Wetland Reserve", "a wetland reserve", "2001",
17
+ "opened a marked visitor trail", "2017", "introduced seasonal bird counts"),
18
+ ("elm", "train", "Elm River Chamber Ensemble", "a chamber music ensemble", "1993",
19
+ "gave its first documented public concert", "2010", "began an annual series of school concerts"),
20
+ ("fern", "train", "Fern Coast Maritime Archive", "a maritime archive", "1978",
21
+ "opened a reading room", "2009", "began digitising shipping registers"),
22
+ ("glen", "validation", "Glen Brook Textile Museum", "a textile museum", "1987",
23
+ "opened a loom display", "2013", "introduced demonstrations of weaving techniques"),
24
+ ("hazel", "validation", "Hazel Plain Seed Library", "a community seed library", "2006",
25
+ "started lending seed packets", "2018", "added workshops on seed storage"),
26
+ ("iris", "test", "Iris Bay Community Theatre", "a community theatre", "1999",
27
+ "staged its first documented production", "2016", "introduced a youth drama workshop"),
28
+ ("juniper", "test", "Juniper Hill Geological Centre", "a geology education centre", "2003",
29
+ "opened a rock collection", "2019", "added guided geology walks"),
30
+ ]
31
+ packets = []
32
+ for key, split, name, category, first_year, event, second_year, activity in specifications:
33
+ topic = f"{name} (fictional practice topic)"
34
+ rows = [
35
+ [f"Practice Gazette report about {name}", f"https://example.org/practice/{key}/report",
36
+ f"Fictional practice material: {name} is {category}. It {event} in {first_year}."],
37
+ [f"Practice Review account of {name}", f"https://example.org/practice/{key}/review",
38
+ f"Fictional practice material: {name} {activity} in {second_year}. No founder or visitor total is stated."],
39
+ ]
40
+ article = {
41
+ "lead": [{"text": f"{name} is {category} in a fictional practice setting.", "sources": ["S1"]}],
42
+ "sections": [{"heading": "Development", "paragraphs": [
43
+ {"text": f"The organisation {event} in {first_year}.", "sources": ["S1"]},
44
+ {"text": f"It {activity} in {second_year}.", "sources": ["S2"]}]}],
45
+ "gaps": ["The supplied excerpts do not identify a founder or provide visitor figures.",
46
+ "These are fictional practice sources, not evidence of a real topic's notability."],
47
+ }
48
+ outline = {"sections": [{"heading": "History and activities", "questions": [
49
+ "Which dated milestones do the supplied excerpts support?",
50
+ "What further independent coverage would a human editor need?"], "sources": ["S1", "S2"]}],
51
+ "gaps": ["Do not draft article prose for English Wikipedia using an LLM.",
52
+ "These fictional sources cannot establish a real subject's notability."]}
53
+ packets.append({"id": key, "split": split, "topic": topic, "sources": rows,
54
+ "article_target": article, "outline_target": outline})
55
+ payload = {"license": "GPL-3.0-only", "authorship": "Project-authored synthetic behavior examples",
56
+ "limitations": "Fictional topics and reserved URLs. Not real references, model outputs, or accuracy evidence.",
57
+ "packets": packets}
58
+ return payload
59
+
60
+
61
+ if __name__ == "__main__":
62
+ path = Path(__file__).with_name("article_examples.json")
63
+ path.write_text(json.dumps(build(), ensure_ascii=False, indent=2), encoding="utf-8")
64
+ print(f"Wrote {path}")