cueaudit 0.1.0__tar.gz
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.
- cueaudit-0.1.0/CHANGELOG.md +9 -0
- cueaudit-0.1.0/CITATION.cff +55 -0
- cueaudit-0.1.0/MANIFEST.in +2 -0
- cueaudit-0.1.0/PKG-INFO +226 -0
- cueaudit-0.1.0/README.md +213 -0
- cueaudit-0.1.0/pyproject.toml +26 -0
- cueaudit-0.1.0/setup.cfg +4 -0
- cueaudit-0.1.0/src/cueaudit/__init__.py +40 -0
- cueaudit-0.1.0/src/cueaudit/_core.py +673 -0
- cueaudit-0.1.0/src/cueaudit/stopwords.txt +161 -0
- cueaudit-0.1.0/src/cueaudit.egg-info/PKG-INFO +226 -0
- cueaudit-0.1.0/src/cueaudit.egg-info/SOURCES.txt +24 -0
- cueaudit-0.1.0/src/cueaudit.egg-info/dependency_links.txt +1 -0
- cueaudit-0.1.0/src/cueaudit.egg-info/top_level.txt +1 -0
- cueaudit-0.1.0/tests/fixtures/bad_few.json +1 -0
- cueaudit-0.1.0/tests/fixtures/bad_key.json +1 -0
- cueaudit-0.1.0/tests/fixtures/bad_line.jsonl +2 -0
- cueaudit-0.1.0/tests/fixtures/bad_many.json +1 -0
- cueaudit-0.1.0/tests/fixtures/bad_stem.json +1 -0
- cueaudit-0.1.0/tests/fixtures/clean50.json +562 -0
- cueaudit-0.1.0/tests/fixtures/items.csv +3 -0
- cueaudit-0.1.0/tests/fixtures/items.json +23 -0
- cueaudit-0.1.0/tests/fixtures/items.jsonl +2 -0
- cueaudit-0.1.0/tests/fixtures/worked_example.json +134 -0
- cueaudit-0.1.0/tests/fixtures/worked_example_expected.txt +25 -0
- cueaudit-0.1.0/tests/test_cueaudit.py +334 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0, 2026-11-27
|
|
4
|
+
|
|
5
|
+
First release. Nine deterministic rules for item writing flaws over
|
|
6
|
+
the stem, the options, and the key of multiple choice items, with
|
|
7
|
+
loaders for JSON, JSONL, and CSV files, per item flags with plain
|
|
8
|
+
language detail sentences, flag counts split by stratum, and bank
|
|
9
|
+
level cue statistics. Standard library only at runtime.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use this software, please cite it as below."
|
|
3
|
+
title: "cueaudit: a deterministic audit of multiple choice benchmark items for item writing flaws"
|
|
4
|
+
type: software
|
|
5
|
+
authors:
|
|
6
|
+
- family-names: "Rangaraju"
|
|
7
|
+
given-names: "Prabhu"
|
|
8
|
+
version: "0.1.0"
|
|
9
|
+
date-released: "2026-11-27"
|
|
10
|
+
license: "MIT"
|
|
11
|
+
abstract: >-
|
|
12
|
+
cueaudit reads the stem, the options, and the key of each multiple
|
|
13
|
+
choice item and flags item writing flaws under nine deterministic
|
|
14
|
+
rules drawn from the published item writing flaw taxonomy, with
|
|
15
|
+
bank level cue statistics. It never runs a model and never judges
|
|
16
|
+
whether a key is correct.
|
|
17
|
+
references:
|
|
18
|
+
- type: article
|
|
19
|
+
authors:
|
|
20
|
+
- family-names: "Haladyna"
|
|
21
|
+
given-names: "Thomas M."
|
|
22
|
+
- family-names: "Downing"
|
|
23
|
+
given-names: "Steven M."
|
|
24
|
+
- family-names: "Rodriguez"
|
|
25
|
+
given-names: "Michael C."
|
|
26
|
+
title: "A review of multiple-choice item-writing guidelines for classroom assessment"
|
|
27
|
+
journal: "Applied Measurement in Education"
|
|
28
|
+
volume: "15"
|
|
29
|
+
issue: "3"
|
|
30
|
+
year: 2002
|
|
31
|
+
- type: article
|
|
32
|
+
authors:
|
|
33
|
+
- family-names: "Tarrant"
|
|
34
|
+
given-names: "Michelle"
|
|
35
|
+
- family-names: "Knierim"
|
|
36
|
+
given-names: "Aimee"
|
|
37
|
+
- family-names: "Hayes"
|
|
38
|
+
given-names: "Sandra K."
|
|
39
|
+
- family-names: "Ware"
|
|
40
|
+
given-names: "James"
|
|
41
|
+
title: "The frequency of item writing flaws in multiple-choice questions used in high stakes nursing assessments"
|
|
42
|
+
journal: "Nurse Education in Practice"
|
|
43
|
+
volume: "6"
|
|
44
|
+
issue: "6"
|
|
45
|
+
year: 2006
|
|
46
|
+
doi: "10.1016/j.nepr.2006.07.002"
|
|
47
|
+
- type: article
|
|
48
|
+
authors:
|
|
49
|
+
- family-names: "Gundam"
|
|
50
|
+
given-names: "R."
|
|
51
|
+
title: "Item-writing flaws and answer-position bias in large language model-generated medical multiple-choice questions: a benchmark study of 15 models with an open corpus and a rule-based detector"
|
|
52
|
+
journal: "Journal of Educational Evaluation for Health Professions"
|
|
53
|
+
volume: "23"
|
|
54
|
+
year: 2026
|
|
55
|
+
doi: "10.3352/jeehp.2026.23.36"
|
cueaudit-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cueaudit
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Deterministic audit of multiple choice benchmark items for item writing flaws
|
|
5
|
+
Author: Prabhu Rangaraju
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Keywords: benchmark,multiple choice,item analysis,evaluation
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Classifier: Topic :: Scientific/Engineering
|
|
11
|
+
Requires-Python: <3.13,>=3.11
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
|
|
14
|
+
# cueaudit
|
|
15
|
+
|
|
16
|
+
cueaudit audits multiple choice benchmark items for item writing
|
|
17
|
+
flaws. It reads only the stem, the options, and the key of each
|
|
18
|
+
item, and flags flaws under nine mechanical rules drawn from the
|
|
19
|
+
published item writing flaw taxonomy. It runs before any model is
|
|
20
|
+
queried. It never runs a model, never calls a network, and never
|
|
21
|
+
judges whether a key is correct.
|
|
22
|
+
|
|
23
|
+
## What it takes in and what it returns
|
|
24
|
+
|
|
25
|
+
An item is a record with an item id, a stem, an ordered set of 2 to
|
|
26
|
+
6 options, and the key given as the integer position of the correct
|
|
27
|
+
option, counting from 0. Items load from JSON, JSONL, or CSV files with the
|
|
28
|
+
load_items function, or are built directly as Item records.
|
|
29
|
+
|
|
30
|
+
A JSON or JSONL record carries four fields: item_id (a string),
|
|
31
|
+
stem (a string), options (a list of 2 to 6 strings), and key (the
|
|
32
|
+
integer position of the correct option, counting from 0). A JSON
|
|
33
|
+
file holds a list of records; a JSONL file holds one record on
|
|
34
|
+
each line. A CSV file carries a header row naming the columns
|
|
35
|
+
item_id, stem, and key, and one column per option named option_1
|
|
36
|
+
through option_6, of which the file need carry only as many as
|
|
37
|
+
its widest item needs; a missing or empty option cell is dropped
|
|
38
|
+
wherever it sits in the row, and the remaining cells, in column
|
|
39
|
+
order, are the options. A record that fails validation raises
|
|
40
|
+
ValueError naming the record position.
|
|
41
|
+
|
|
42
|
+
audit_items returns a report holding one result per item. Each
|
|
43
|
+
result carries the flags the rules raised on that item. A flag
|
|
44
|
+
names its rule, its severity (the word cue for a flag that points
|
|
45
|
+
at a guessing advantage, the word structural for a flag that points
|
|
46
|
+
at the form of the item), and a plain sentence naming the measured
|
|
47
|
+
values behind the flag. The report also holds the flag counts per
|
|
48
|
+
rule, and the same counts split by stratum: an item sits in the
|
|
49
|
+
numeric_heavy stratum when at least half of its options are numeric
|
|
50
|
+
only, and in the text stratum otherwise.
|
|
51
|
+
|
|
52
|
+
bank_statistics returns the bank level cue statistics: the mean
|
|
53
|
+
option count, the share of keys at each option position and the
|
|
54
|
+
spread of those shares, the count of items with a unique longest
|
|
55
|
+
option and the rate at which the key is that longest option with
|
|
56
|
+
its edge over chance, and the count and share of items holding
|
|
57
|
+
duplicate options. Chance, in the edge, is the rate expected if
|
|
58
|
+
the key were placed uniformly at random among the options of
|
|
59
|
+
each item with a unique longest option: one over the number of
|
|
60
|
+
options of that item, averaged over those items. Two definition
|
|
61
|
+
details govern the position figures: the share at a position is
|
|
62
|
+
taken over the items that have that many or more options, and
|
|
63
|
+
the spread compares only positions present in at least 10 items.
|
|
64
|
+
|
|
65
|
+
## The nine rules
|
|
66
|
+
|
|
67
|
+
All nine rules are deterministic on normalised text. Normalisation
|
|
68
|
+
is Unicode NFC, case folding, whitespace collapsed to single
|
|
69
|
+
spaces, and surrounding quotation marks removed. Length means the
|
|
70
|
+
character count after normalisation.
|
|
71
|
+
|
|
72
|
+
- R1, key length cue. The key option is the unique longest option
|
|
73
|
+
and its length is at least 1.25 times the mean length of the
|
|
74
|
+
other options.
|
|
75
|
+
- R2, duplicate options. Two or more options in one item are equal
|
|
76
|
+
after normalisation.
|
|
77
|
+
- R3, overlapping ranges. Two options parse as numeric ranges and
|
|
78
|
+
the ranges share more than a single endpoint value. A range is
|
|
79
|
+
two numbers joined by the word to, an en dash, or a hyphen.
|
|
80
|
+
Ranges that only touch at one endpoint do not fire this rule.
|
|
81
|
+
- R4, all or none of the above. An option equals one of those two
|
|
82
|
+
phrases after normalisation.
|
|
83
|
+
- R5, negative stem. The stem contains one of the whole words not,
|
|
84
|
+
except, or never. This flag is a prompt to read the stem, and the
|
|
85
|
+
package says so wherever the rule is described.
|
|
86
|
+
- R6, absolute terms. A non key option contains one of the whole
|
|
87
|
+
words always, never, all, or none, and the key option contains
|
|
88
|
+
none of them.
|
|
89
|
+
- R7, stem echo. A content word of the stem (length 5 or more, and
|
|
90
|
+
not in the frozen stopword list the package ships) appears in
|
|
91
|
+
exactly one option, and that option is the key. The list ships
|
|
92
|
+
in the package as the file stopwords.txt.
|
|
93
|
+
- R8, length spread. The longest option in the item is at least
|
|
94
|
+
twice the length of the shortest option.
|
|
95
|
+
- R9, mixed option form. The options mix numeric only options with
|
|
96
|
+
options containing letters. An option that is neither completes
|
|
97
|
+
neither side of the mix.
|
|
98
|
+
|
|
99
|
+
## Where cueaudit sits
|
|
100
|
+
|
|
101
|
+
Response based item analysis already exists: the CTT package on
|
|
102
|
+
CRAN is the named example, and it reports how options performed
|
|
103
|
+
once students or models have answered. Flaw detection research
|
|
104
|
+
systems also exist: SAQUET and BenchMarkerUI both detect item
|
|
105
|
+
writing flaws, and both use model judges to do it. cueaudit covers
|
|
106
|
+
the ground before either of those: the item text alone, read by
|
|
107
|
+
fixed rules, at the moment a bank is written or audited, with no
|
|
108
|
+
responses collected and no model in the loop.
|
|
109
|
+
|
|
110
|
+
## Limits
|
|
111
|
+
|
|
112
|
+
- The validated scope is items whose options are text. Items whose
|
|
113
|
+
options are mostly numeric or code are placed in the
|
|
114
|
+
numeric_heavy stratum and reported apart, and the flaw reading
|
|
115
|
+
for that stratum is the measured result for that stratum, not
|
|
116
|
+
the headline reading for text items.
|
|
117
|
+
- The statistics are cue measurements, not item quality
|
|
118
|
+
judgments, and a flagged item can still be a good item.
|
|
119
|
+
- Rule R5 flags a word, not a fault: a negative stem can be the
|
|
120
|
+
right way to write an item, and the flag only asks a reader to
|
|
121
|
+
check the negation emphasis.
|
|
122
|
+
- The package reads item text only. It says nothing about whether
|
|
123
|
+
a key is right, whether an item is hard, or whether a bank is
|
|
124
|
+
fair.
|
|
125
|
+
|
|
126
|
+
## Install
|
|
127
|
+
|
|
128
|
+
cueaudit has no runtime dependency beyond the standard library.
|
|
129
|
+
It is built and tested on Python 3.12, and the package metadata
|
|
130
|
+
declares support for Python 3.11 and 3.12.
|
|
131
|
+
|
|
132
|
+
pip install cueaudit
|
|
133
|
+
|
|
134
|
+
## Worked example
|
|
135
|
+
|
|
136
|
+
The bank below holds 12 constructed items: one firing case for
|
|
137
|
+
each rule, and three items that draw no flag. The same bank ships
|
|
138
|
+
with the source distribution at tests/fixtures/worked_example.json.
|
|
139
|
+
Keys are stated as positions, counting from 0.
|
|
140
|
+
|
|
141
|
+
- we-01. Stem: What is the capital of France? Options: Paris,
|
|
142
|
+
London, Berlin, Madrid. Key position 0.
|
|
143
|
+
- we-02. Stem: Which city is the capital of France? Options:
|
|
144
|
+
Paris, the seat of the French government; A port city on the
|
|
145
|
+
channel; A town in the green hills; A city near the border. Key
|
|
146
|
+
position 0.
|
|
147
|
+
- we-03. Stem: Which of these is a primary colour? Options: Red,
|
|
148
|
+
Blue, Red, Green. Key position 0.
|
|
149
|
+
- we-04. Stem: Which band holds the value 25? Options: 10 to 30,
|
|
150
|
+
20 to 40, 50 to 60, 70 to 80. Key position 0.
|
|
151
|
+
- we-05. Stem: Which of these is a metal? Options: Iron plate,
|
|
152
|
+
Wooden plank, Glass panel, All of the above. Key position 0.
|
|
153
|
+
- we-06. Stem: Which of the following is not a fruit? Options: A
|
|
154
|
+
carrot, An apple, A grape, A peach. Key position 0.
|
|
155
|
+
- we-07. Stem: Which statement about sound is correct? Options:
|
|
156
|
+
Sound travels through air as a wave; Sound always travels in a
|
|
157
|
+
straight line; Sound moves through water; Sound fades with
|
|
158
|
+
distance. Key position 0.
|
|
159
|
+
- we-08. Stem: A cartographer draws maps of coastlines. What does
|
|
160
|
+
a cartographer produce? Options: Maps drawn by a trained
|
|
161
|
+
cartographer; Charts of ocean temperatures at depth; Lists of
|
|
162
|
+
mountain heights in the alps; Tables of river lengths by region.
|
|
163
|
+
Key position 0.
|
|
164
|
+
- we-09. Stem: Which animal lives in the sea? Options: Cod; A
|
|
165
|
+
very large whale shark specimen; A small coastal crab; A young
|
|
166
|
+
harbour seal. Key position 2.
|
|
167
|
+
- we-10. Stem: Which of these values is the largest? Options: 42,
|
|
168
|
+
17, 99, six. Key position 2.
|
|
169
|
+
- we-11. Stem: Which value is twice ten? Options: 10, 20, 30, 40.
|
|
170
|
+
Key position 1.
|
|
171
|
+
- we-12. Stem: Which bird cannot fly? Options: A swift in flight;
|
|
172
|
+
An ostrich; A sparrow of hedges; A grey heron. Key position 1.
|
|
173
|
+
|
|
174
|
+
The audit and the bank statistics for this bank, exactly as the
|
|
175
|
+
package prints them:
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
we-01: no flags
|
|
179
|
+
we-02: R1 (cue) The key option is the longest option at 40 characters, which is 1.64 times the mean length of the other options at 24.3 characters.
|
|
180
|
+
we-03: R2 (structural) Options 1 and 3 are identical after normalisation: 'red'.
|
|
181
|
+
we-04: R3 (structural) The ranges '10 to 30' and '20 to 40' overlap beyond a shared endpoint.
|
|
182
|
+
we-05: R4 (structural) Option 4 is 'all of the above', an all or none of the above option.
|
|
183
|
+
we-05: R6 (cue) Option 4 contains the absolute term 'all', and the key option contains none of the absolute terms.
|
|
184
|
+
we-06: R5 (structural) The stem contains the word 'not'; the stem needs a reader check for negation emphasis.
|
|
185
|
+
we-07: R6 (cue) Option 2 contains the absolute term 'always', and the key option contains none of the absolute terms.
|
|
186
|
+
we-08: R7 (cue) The stem words 'cartographer' appear in the key option and in no other option.
|
|
187
|
+
we-09: R8 (cue) The longest option is 33 characters and the shortest is 3 characters, a spread of 11.00 times.
|
|
188
|
+
we-10: R9 (structural) The item mixes 3 numeric only options with 1 option containing letters.
|
|
189
|
+
we-11: no flags
|
|
190
|
+
we-12: no flags
|
|
191
|
+
Counts: R1 1, R2 1, R3 1, R4 1, R5 1, R6 2, R7 1, R8 1, R9 1
|
|
192
|
+
Stratum numeric_heavy: R9 1
|
|
193
|
+
Stratum text: R1 1, R2 1, R3 1, R4 1, R5 1, R6 2, R7 1, R8 1
|
|
194
|
+
Bank items: 12
|
|
195
|
+
Mean options per item: 4.0
|
|
196
|
+
Key position shares: 0.6666666666666666, 0.16666666666666666, 0.16666666666666666, 0.0
|
|
197
|
+
Key position spread: 0.6666666666666666
|
|
198
|
+
Unique longest items: 7
|
|
199
|
+
Longest option key rate: 0.14285714285714285
|
|
200
|
+
Longest option edge: -0.10714285714285715
|
|
201
|
+
Duplicate option items: 1
|
|
202
|
+
Duplicate option share: 0.08333333333333333
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
Two readings worth noting. Item we-05 draws two flags, because the
|
|
206
|
+
all or none of the above option also carries an absolute term, and
|
|
207
|
+
flags are independent per rule by design. Item we-12 draws no flag
|
|
208
|
+
even though its longest option is not the key: a long distractor on
|
|
209
|
+
its own breaks no rule in the set.
|
|
210
|
+
|
|
211
|
+
## Sources for the rule set
|
|
212
|
+
|
|
213
|
+
The rules are narrowed from the item writing flaw taxonomy of
|
|
214
|
+
Haladyna, Downing, and Rodriguez (2002), A review of
|
|
215
|
+
multiple-choice item-writing guidelines for classroom assessment,
|
|
216
|
+
Applied Measurement in Education 15(3), and from the flaw list of
|
|
217
|
+
Tarrant, Knierim, Hayes, and Ware (2006), The frequency of item
|
|
218
|
+
writing flaws in multiple-choice questions used in high stakes
|
|
219
|
+
nursing assessments, Nurse Education in Practice 6(6). A 2026
|
|
220
|
+
study in the Journal of Educational Evaluation for Health
|
|
221
|
+
Professions measured flaws of the same family in machine generated
|
|
222
|
+
medical items. Full citations sit in CITATION.cff.
|
|
223
|
+
|
|
224
|
+
## Licence
|
|
225
|
+
|
|
226
|
+
MIT. See the licence expression in the package metadata.
|
cueaudit-0.1.0/README.md
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
# cueaudit
|
|
2
|
+
|
|
3
|
+
cueaudit audits multiple choice benchmark items for item writing
|
|
4
|
+
flaws. It reads only the stem, the options, and the key of each
|
|
5
|
+
item, and flags flaws under nine mechanical rules drawn from the
|
|
6
|
+
published item writing flaw taxonomy. It runs before any model is
|
|
7
|
+
queried. It never runs a model, never calls a network, and never
|
|
8
|
+
judges whether a key is correct.
|
|
9
|
+
|
|
10
|
+
## What it takes in and what it returns
|
|
11
|
+
|
|
12
|
+
An item is a record with an item id, a stem, an ordered set of 2 to
|
|
13
|
+
6 options, and the key given as the integer position of the correct
|
|
14
|
+
option, counting from 0. Items load from JSON, JSONL, or CSV files with the
|
|
15
|
+
load_items function, or are built directly as Item records.
|
|
16
|
+
|
|
17
|
+
A JSON or JSONL record carries four fields: item_id (a string),
|
|
18
|
+
stem (a string), options (a list of 2 to 6 strings), and key (the
|
|
19
|
+
integer position of the correct option, counting from 0). A JSON
|
|
20
|
+
file holds a list of records; a JSONL file holds one record on
|
|
21
|
+
each line. A CSV file carries a header row naming the columns
|
|
22
|
+
item_id, stem, and key, and one column per option named option_1
|
|
23
|
+
through option_6, of which the file need carry only as many as
|
|
24
|
+
its widest item needs; a missing or empty option cell is dropped
|
|
25
|
+
wherever it sits in the row, and the remaining cells, in column
|
|
26
|
+
order, are the options. A record that fails validation raises
|
|
27
|
+
ValueError naming the record position.
|
|
28
|
+
|
|
29
|
+
audit_items returns a report holding one result per item. Each
|
|
30
|
+
result carries the flags the rules raised on that item. A flag
|
|
31
|
+
names its rule, its severity (the word cue for a flag that points
|
|
32
|
+
at a guessing advantage, the word structural for a flag that points
|
|
33
|
+
at the form of the item), and a plain sentence naming the measured
|
|
34
|
+
values behind the flag. The report also holds the flag counts per
|
|
35
|
+
rule, and the same counts split by stratum: an item sits in the
|
|
36
|
+
numeric_heavy stratum when at least half of its options are numeric
|
|
37
|
+
only, and in the text stratum otherwise.
|
|
38
|
+
|
|
39
|
+
bank_statistics returns the bank level cue statistics: the mean
|
|
40
|
+
option count, the share of keys at each option position and the
|
|
41
|
+
spread of those shares, the count of items with a unique longest
|
|
42
|
+
option and the rate at which the key is that longest option with
|
|
43
|
+
its edge over chance, and the count and share of items holding
|
|
44
|
+
duplicate options. Chance, in the edge, is the rate expected if
|
|
45
|
+
the key were placed uniformly at random among the options of
|
|
46
|
+
each item with a unique longest option: one over the number of
|
|
47
|
+
options of that item, averaged over those items. Two definition
|
|
48
|
+
details govern the position figures: the share at a position is
|
|
49
|
+
taken over the items that have that many or more options, and
|
|
50
|
+
the spread compares only positions present in at least 10 items.
|
|
51
|
+
|
|
52
|
+
## The nine rules
|
|
53
|
+
|
|
54
|
+
All nine rules are deterministic on normalised text. Normalisation
|
|
55
|
+
is Unicode NFC, case folding, whitespace collapsed to single
|
|
56
|
+
spaces, and surrounding quotation marks removed. Length means the
|
|
57
|
+
character count after normalisation.
|
|
58
|
+
|
|
59
|
+
- R1, key length cue. The key option is the unique longest option
|
|
60
|
+
and its length is at least 1.25 times the mean length of the
|
|
61
|
+
other options.
|
|
62
|
+
- R2, duplicate options. Two or more options in one item are equal
|
|
63
|
+
after normalisation.
|
|
64
|
+
- R3, overlapping ranges. Two options parse as numeric ranges and
|
|
65
|
+
the ranges share more than a single endpoint value. A range is
|
|
66
|
+
two numbers joined by the word to, an en dash, or a hyphen.
|
|
67
|
+
Ranges that only touch at one endpoint do not fire this rule.
|
|
68
|
+
- R4, all or none of the above. An option equals one of those two
|
|
69
|
+
phrases after normalisation.
|
|
70
|
+
- R5, negative stem. The stem contains one of the whole words not,
|
|
71
|
+
except, or never. This flag is a prompt to read the stem, and the
|
|
72
|
+
package says so wherever the rule is described.
|
|
73
|
+
- R6, absolute terms. A non key option contains one of the whole
|
|
74
|
+
words always, never, all, or none, and the key option contains
|
|
75
|
+
none of them.
|
|
76
|
+
- R7, stem echo. A content word of the stem (length 5 or more, and
|
|
77
|
+
not in the frozen stopword list the package ships) appears in
|
|
78
|
+
exactly one option, and that option is the key. The list ships
|
|
79
|
+
in the package as the file stopwords.txt.
|
|
80
|
+
- R8, length spread. The longest option in the item is at least
|
|
81
|
+
twice the length of the shortest option.
|
|
82
|
+
- R9, mixed option form. The options mix numeric only options with
|
|
83
|
+
options containing letters. An option that is neither completes
|
|
84
|
+
neither side of the mix.
|
|
85
|
+
|
|
86
|
+
## Where cueaudit sits
|
|
87
|
+
|
|
88
|
+
Response based item analysis already exists: the CTT package on
|
|
89
|
+
CRAN is the named example, and it reports how options performed
|
|
90
|
+
once students or models have answered. Flaw detection research
|
|
91
|
+
systems also exist: SAQUET and BenchMarkerUI both detect item
|
|
92
|
+
writing flaws, and both use model judges to do it. cueaudit covers
|
|
93
|
+
the ground before either of those: the item text alone, read by
|
|
94
|
+
fixed rules, at the moment a bank is written or audited, with no
|
|
95
|
+
responses collected and no model in the loop.
|
|
96
|
+
|
|
97
|
+
## Limits
|
|
98
|
+
|
|
99
|
+
- The validated scope is items whose options are text. Items whose
|
|
100
|
+
options are mostly numeric or code are placed in the
|
|
101
|
+
numeric_heavy stratum and reported apart, and the flaw reading
|
|
102
|
+
for that stratum is the measured result for that stratum, not
|
|
103
|
+
the headline reading for text items.
|
|
104
|
+
- The statistics are cue measurements, not item quality
|
|
105
|
+
judgments, and a flagged item can still be a good item.
|
|
106
|
+
- Rule R5 flags a word, not a fault: a negative stem can be the
|
|
107
|
+
right way to write an item, and the flag only asks a reader to
|
|
108
|
+
check the negation emphasis.
|
|
109
|
+
- The package reads item text only. It says nothing about whether
|
|
110
|
+
a key is right, whether an item is hard, or whether a bank is
|
|
111
|
+
fair.
|
|
112
|
+
|
|
113
|
+
## Install
|
|
114
|
+
|
|
115
|
+
cueaudit has no runtime dependency beyond the standard library.
|
|
116
|
+
It is built and tested on Python 3.12, and the package metadata
|
|
117
|
+
declares support for Python 3.11 and 3.12.
|
|
118
|
+
|
|
119
|
+
pip install cueaudit
|
|
120
|
+
|
|
121
|
+
## Worked example
|
|
122
|
+
|
|
123
|
+
The bank below holds 12 constructed items: one firing case for
|
|
124
|
+
each rule, and three items that draw no flag. The same bank ships
|
|
125
|
+
with the source distribution at tests/fixtures/worked_example.json.
|
|
126
|
+
Keys are stated as positions, counting from 0.
|
|
127
|
+
|
|
128
|
+
- we-01. Stem: What is the capital of France? Options: Paris,
|
|
129
|
+
London, Berlin, Madrid. Key position 0.
|
|
130
|
+
- we-02. Stem: Which city is the capital of France? Options:
|
|
131
|
+
Paris, the seat of the French government; A port city on the
|
|
132
|
+
channel; A town in the green hills; A city near the border. Key
|
|
133
|
+
position 0.
|
|
134
|
+
- we-03. Stem: Which of these is a primary colour? Options: Red,
|
|
135
|
+
Blue, Red, Green. Key position 0.
|
|
136
|
+
- we-04. Stem: Which band holds the value 25? Options: 10 to 30,
|
|
137
|
+
20 to 40, 50 to 60, 70 to 80. Key position 0.
|
|
138
|
+
- we-05. Stem: Which of these is a metal? Options: Iron plate,
|
|
139
|
+
Wooden plank, Glass panel, All of the above. Key position 0.
|
|
140
|
+
- we-06. Stem: Which of the following is not a fruit? Options: A
|
|
141
|
+
carrot, An apple, A grape, A peach. Key position 0.
|
|
142
|
+
- we-07. Stem: Which statement about sound is correct? Options:
|
|
143
|
+
Sound travels through air as a wave; Sound always travels in a
|
|
144
|
+
straight line; Sound moves through water; Sound fades with
|
|
145
|
+
distance. Key position 0.
|
|
146
|
+
- we-08. Stem: A cartographer draws maps of coastlines. What does
|
|
147
|
+
a cartographer produce? Options: Maps drawn by a trained
|
|
148
|
+
cartographer; Charts of ocean temperatures at depth; Lists of
|
|
149
|
+
mountain heights in the alps; Tables of river lengths by region.
|
|
150
|
+
Key position 0.
|
|
151
|
+
- we-09. Stem: Which animal lives in the sea? Options: Cod; A
|
|
152
|
+
very large whale shark specimen; A small coastal crab; A young
|
|
153
|
+
harbour seal. Key position 2.
|
|
154
|
+
- we-10. Stem: Which of these values is the largest? Options: 42,
|
|
155
|
+
17, 99, six. Key position 2.
|
|
156
|
+
- we-11. Stem: Which value is twice ten? Options: 10, 20, 30, 40.
|
|
157
|
+
Key position 1.
|
|
158
|
+
- we-12. Stem: Which bird cannot fly? Options: A swift in flight;
|
|
159
|
+
An ostrich; A sparrow of hedges; A grey heron. Key position 1.
|
|
160
|
+
|
|
161
|
+
The audit and the bank statistics for this bank, exactly as the
|
|
162
|
+
package prints them:
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
we-01: no flags
|
|
166
|
+
we-02: R1 (cue) The key option is the longest option at 40 characters, which is 1.64 times the mean length of the other options at 24.3 characters.
|
|
167
|
+
we-03: R2 (structural) Options 1 and 3 are identical after normalisation: 'red'.
|
|
168
|
+
we-04: R3 (structural) The ranges '10 to 30' and '20 to 40' overlap beyond a shared endpoint.
|
|
169
|
+
we-05: R4 (structural) Option 4 is 'all of the above', an all or none of the above option.
|
|
170
|
+
we-05: R6 (cue) Option 4 contains the absolute term 'all', and the key option contains none of the absolute terms.
|
|
171
|
+
we-06: R5 (structural) The stem contains the word 'not'; the stem needs a reader check for negation emphasis.
|
|
172
|
+
we-07: R6 (cue) Option 2 contains the absolute term 'always', and the key option contains none of the absolute terms.
|
|
173
|
+
we-08: R7 (cue) The stem words 'cartographer' appear in the key option and in no other option.
|
|
174
|
+
we-09: R8 (cue) The longest option is 33 characters and the shortest is 3 characters, a spread of 11.00 times.
|
|
175
|
+
we-10: R9 (structural) The item mixes 3 numeric only options with 1 option containing letters.
|
|
176
|
+
we-11: no flags
|
|
177
|
+
we-12: no flags
|
|
178
|
+
Counts: R1 1, R2 1, R3 1, R4 1, R5 1, R6 2, R7 1, R8 1, R9 1
|
|
179
|
+
Stratum numeric_heavy: R9 1
|
|
180
|
+
Stratum text: R1 1, R2 1, R3 1, R4 1, R5 1, R6 2, R7 1, R8 1
|
|
181
|
+
Bank items: 12
|
|
182
|
+
Mean options per item: 4.0
|
|
183
|
+
Key position shares: 0.6666666666666666, 0.16666666666666666, 0.16666666666666666, 0.0
|
|
184
|
+
Key position spread: 0.6666666666666666
|
|
185
|
+
Unique longest items: 7
|
|
186
|
+
Longest option key rate: 0.14285714285714285
|
|
187
|
+
Longest option edge: -0.10714285714285715
|
|
188
|
+
Duplicate option items: 1
|
|
189
|
+
Duplicate option share: 0.08333333333333333
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Two readings worth noting. Item we-05 draws two flags, because the
|
|
193
|
+
all or none of the above option also carries an absolute term, and
|
|
194
|
+
flags are independent per rule by design. Item we-12 draws no flag
|
|
195
|
+
even though its longest option is not the key: a long distractor on
|
|
196
|
+
its own breaks no rule in the set.
|
|
197
|
+
|
|
198
|
+
## Sources for the rule set
|
|
199
|
+
|
|
200
|
+
The rules are narrowed from the item writing flaw taxonomy of
|
|
201
|
+
Haladyna, Downing, and Rodriguez (2002), A review of
|
|
202
|
+
multiple-choice item-writing guidelines for classroom assessment,
|
|
203
|
+
Applied Measurement in Education 15(3), and from the flaw list of
|
|
204
|
+
Tarrant, Knierim, Hayes, and Ware (2006), The frequency of item
|
|
205
|
+
writing flaws in multiple-choice questions used in high stakes
|
|
206
|
+
nursing assessments, Nurse Education in Practice 6(6). A 2026
|
|
207
|
+
study in the Journal of Educational Evaluation for Health
|
|
208
|
+
Professions measured flaws of the same family in machine generated
|
|
209
|
+
medical items. Full citations sit in CITATION.cff.
|
|
210
|
+
|
|
211
|
+
## Licence
|
|
212
|
+
|
|
213
|
+
MIT. See the licence expression in the package metadata.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools==80.9.0", "wheel==0.45.1"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "cueaudit"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Deterministic audit of multiple choice benchmark items for item writing flaws"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
requires-python = ">=3.11,<3.13"
|
|
12
|
+
authors = [
|
|
13
|
+
{name = "Prabhu Rangaraju"},
|
|
14
|
+
]
|
|
15
|
+
keywords = ["benchmark", "multiple choice", "item analysis", "evaluation"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"Operating System :: OS Independent",
|
|
19
|
+
"Topic :: Scientific/Engineering",
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
[tool.setuptools.packages.find]
|
|
23
|
+
where = ["src"]
|
|
24
|
+
|
|
25
|
+
[tool.setuptools.package-data]
|
|
26
|
+
cueaudit = ["stopwords.txt"]
|
cueaudit-0.1.0/setup.cfg
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""cueaudit: a deterministic audit of multiple choice items.
|
|
2
|
+
|
|
3
|
+
The package reads multiple choice benchmark items (a stem, the
|
|
4
|
+
options, and the key) and flags item writing flaws under nine
|
|
5
|
+
mechanical rules drawn from the published item writing flaw
|
|
6
|
+
taxonomy. It never runs a model and never judges whether a key is
|
|
7
|
+
correct. Bank level cue statistics sit alongside the per item
|
|
8
|
+
flags.
|
|
9
|
+
|
|
10
|
+
The statistics are cue measurements, not item quality judgments,
|
|
11
|
+
and a flagged item can still be a good item.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
from ._core import (
|
|
15
|
+
RULE_IDS,
|
|
16
|
+
AuditReport,
|
|
17
|
+
BankStats,
|
|
18
|
+
FlawFlag,
|
|
19
|
+
Item,
|
|
20
|
+
ItemResult,
|
|
21
|
+
audit_items,
|
|
22
|
+
bank_statistics,
|
|
23
|
+
load_items,
|
|
24
|
+
normalise,
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
__version__ = "0.1.0"
|
|
28
|
+
|
|
29
|
+
__all__ = [
|
|
30
|
+
"RULE_IDS",
|
|
31
|
+
"AuditReport",
|
|
32
|
+
"BankStats",
|
|
33
|
+
"FlawFlag",
|
|
34
|
+
"Item",
|
|
35
|
+
"ItemResult",
|
|
36
|
+
"audit_items",
|
|
37
|
+
"bank_statistics",
|
|
38
|
+
"load_items",
|
|
39
|
+
"normalise",
|
|
40
|
+
]
|