@pharmatools/opengate 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@ One JSON file per case in `datasets/cases/` (files starting with `_` are ignored
7
7
  | `id` | yes | all | Unique slug. |
8
8
  | `title` / `notes` | no | — | Human context / provenance. |
9
9
  | `manuscript` | yes | claim-extraction | The pasted section, with citation markers exactly as authored. |
10
- | `goldClaims[]` | yes | citation-detection, claim-extraction | The verifiable claims a reviewer should extract. Each has `originalText` (with markers), `text` (clean), and `citations` (number array). |
10
+ | `goldClaims[]` | yes | citation-detection, claim-extraction | The verifiable claims a reviewer should extract. Each has `originalText` (with markers), `text` (clean), and `citations` — an array of numbers and/or author-year string keys (e.g. "Smith 2020", "Meyer 2020a"). Numeric [N] markers are stripped from `text`; author-year mentions are grammatical prose and are never stripped, so for pure author-year claims `text === originalText`. |
11
11
  | `goldNonClaims[]` | no | claim-extraction | Sentences that should **not** be extracted (background, aims, transitions). Drives precision/leakage. |
12
12
  | `references{}` | online only | verdict-accuracy | Map of citation-number → `{ name, text }`. |
13
13
  | `goldVerdicts[]` | online only | verdict-accuracy | `{ claimText, citation, verdict }` where `verdict` ∈ the six-point scale. Mark `_requires: "online"`. |
@@ -0,0 +1,56 @@
1
+ {
2
+ "id": "case-authoryear-harvard",
3
+ "title": "Author-year (Harvard) citation style — thyroid eye disease",
4
+ "notes": "SYNTHETIC manuscript exercising pure author-year citations. Unlike numeric [N] markers, author-year mentions are grammatical prose and are never stripped: text === originalText.",
5
+ "manuscript": "Teprotumumab reduced proptosis by 2.82 mm versus placebo (Douglas et al., 2020). Smith and Jones (2019) reported durable responses at 52 weeks in an open-label extension. The safety profile was consistent with earlier findings (Kim, 2023). This study aimed to characterise long-term outcomes in routine practice.",
6
+ "goldClaims": [
7
+ {
8
+ "originalText": "Teprotumumab reduced proptosis by 2.82 mm versus placebo (Douglas et al., 2020).",
9
+ "text": "Teprotumumab reduced proptosis by 2.82 mm versus placebo (Douglas et al., 2020).",
10
+ "citations": [
11
+ "Douglas 2020"
12
+ ]
13
+ },
14
+ {
15
+ "originalText": "Smith and Jones (2019) reported durable responses at 52 weeks in an open-label extension.",
16
+ "text": "Smith and Jones (2019) reported durable responses at 52 weeks in an open-label extension.",
17
+ "citations": [
18
+ "Smith 2019"
19
+ ]
20
+ },
21
+ {
22
+ "originalText": "The safety profile was consistent with earlier findings (Kim, 2023).",
23
+ "text": "The safety profile was consistent with earlier findings (Kim, 2023).",
24
+ "citations": [
25
+ "Kim 2023"
26
+ ]
27
+ }
28
+ ],
29
+ "goldNonClaims": [
30
+ "This study aimed to characterise long-term outcomes in routine practice."
31
+ ],
32
+ "references": {
33
+ "Douglas 2020": {
34
+ "name": "douglas-2020-nejm.txt",
35
+ "text": "In this randomised trial of teprotumumab for thyroid eye disease, the least-squares mean reduction in proptosis was 2.82 mm greater with teprotumumab than with placebo at week 24."
36
+ },
37
+ "Smith 2019": {
38
+ "name": "smith-2019-extension.txt",
39
+ "text": "In the 52-week open-label extension, proptosis responses were maintained in the majority of participants, indicating durable treatment effect."
40
+ }
41
+ },
42
+ "goldVerdicts": [
43
+ {
44
+ "_requires": "online",
45
+ "claimText": "Teprotumumab reduced proptosis by 2.82 mm versus placebo (Douglas et al., 2020).",
46
+ "citation": "Douglas 2020",
47
+ "verdict": "strong_support"
48
+ },
49
+ {
50
+ "_requires": "online",
51
+ "claimText": "Smith and Jones (2019) reported durable responses at 52 weeks in an open-label extension.",
52
+ "citation": "Smith 2019",
53
+ "verdict": "strong_support"
54
+ }
55
+ ]
56
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "id": "case-authoryear-mixed",
3
+ "title": "Mixed numeric + author-year citations in one manuscript",
4
+ "notes": "SYNTHETIC. Exercises numeric superscript and author-year styles side by side, an apostrophe surname (O'Connor), and a 2020a/2020b suffix pair that must stay distinct.",
5
+ "manuscript": "Adalimumab improved ACR20 response rates versus placebo.1,2 O'Connor et al. (2021) confirmed the effect in a real-world cohort. Retention was higher with combination therapy (Meyer 2020a; Meyer 2020b). Baseline characteristics are summarised in Table 1.",
6
+ "goldClaims": [
7
+ {
8
+ "originalText": "Adalimumab improved ACR20 response rates versus placebo.1,2",
9
+ "text": "Adalimumab improved ACR20 response rates versus placebo.",
10
+ "citations": [
11
+ 1,
12
+ 2
13
+ ]
14
+ },
15
+ {
16
+ "originalText": "O'Connor et al. (2021) confirmed the effect in a real-world cohort.",
17
+ "text": "O'Connor et al. (2021) confirmed the effect in a real-world cohort.",
18
+ "citations": [
19
+ "O'Connor 2021"
20
+ ]
21
+ },
22
+ {
23
+ "originalText": "Retention was higher with combination therapy (Meyer 2020a; Meyer 2020b).",
24
+ "text": "Retention was higher with combination therapy (Meyer 2020a; Meyer 2020b).",
25
+ "citations": [
26
+ "Meyer 2020a",
27
+ "Meyer 2020b"
28
+ ]
29
+ }
30
+ ],
31
+ "goldNonClaims": [
32
+ "Baseline characteristics are summarised in Table 1."
33
+ ],
34
+ "references": {
35
+ "O'Connor 2021": {
36
+ "name": "oconnor-2021-cohort.txt",
37
+ "text": "In this prospective real-world cohort of 412 patients with rheumatoid arthritis, adalimumab was associated with significantly improved ACR20 response rates compared with historical placebo controls."
38
+ }
39
+ },
40
+ "goldVerdicts": [
41
+ {
42
+ "_requires": "online",
43
+ "claimText": "O'Connor et al. (2021) confirmed the effect in a real-world cohort.",
44
+ "citation": "O'Connor 2021",
45
+ "verdict": "strong_support"
46
+ }
47
+ ]
48
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pharmatools/opengate",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "description": "OpenGATE — Open Grounded AI Testing & Evaluation. An open-source framework for evaluating evidence-grounded AI systems.",
6
6
  "license": "MIT",
@@ -69,7 +69,9 @@ const ETAL = String.raw`(?:et al\.?|and colleagues|and coworkers)`;
69
69
  /** Detect author-year citations in raw text; returns sorted unique keys. */
70
70
  export function detectAuthorYear(text) {
71
71
  const found = new Set();
72
- const add = (name, year) => found.add(`${name} ${year.slice(0, 4)}`);
72
+ // Year suffixes are kept: "Smith 2020a" and "Smith 2020b" are distinct
73
+ // references in author-year styles.
74
+ const add = (name, year) => found.add(`${name} ${year}`);
73
75
 
74
76
  // 1. Narrative with parenthetical year: "Smith et al. (2020)",
75
77
  // "Smith and Jones (2019)", "Smith (2020)".