code wiki / (root) / nx_survey_quality.nx

nx_survey_quality.nx

buildroot/runtime/nx_survey_quality.nx

5366 B114 linesdepth 10pulls 11 transitivereach 6 importersview sourcekind librarytopic survey
docsdependenciesstructsconstsfunctions

about

nx_survey_quality.nx -- careless / insufficient-effort responding (C/IER) detection, the DATA-QUALITY guard (operator 2026-07-10: evidence-driven, "the feedback and questions identify quant+qual areas of improvement" -- and careless responses corrupt the very metrics nx_survey_stats computes, so trust must be measured). Evidence base (banked 2024-26, knowledge/library/swc_svy_quality.txt): "Response Satisficing Across Online Data Sources", "reducing careless responding in crowdsourced online surveys". Methods, integer, gate-KAT'd: - ATTENTION CHECK (instructed-response item, the C/IER gold standard): the survey's @check meta (qid:val,) names a question with a KNOWN correct answer; a respondent whose answer != expected (or absent) is flagged. - LONGSTRING / straight-lining: the longest run of identical consecutive answers across a block of same-format items; a maxed run = suspected careless. HONEST: a weak signal on SHORT blocks -> data-driven threshold + caveat; the attention check is the strong signal. - CONSISTENCY: two items that should agree diverging beyond a data-driven max (available; spec-wire later). FLAG, NEVER silently drop -- the admin sees the count + can recompute on the trusted subset. Composes nx_survey_stats' st_answer_int (so ballots decode identically). license_tier: ORIGINAL

dependencies 1 imports · 2 importers

nx_survey_stats.nx nx_survey_quality.nx nx_survey_quality_gate.nx nx_survey_sentiment.nx

imports: nx_survey_stats.nx

imported by: nx_survey_quality_gate.nxnx_survey_sentiment.nx

structs

none

consts

15const K_MAGIC_999999: i64 = 999999

functions

19func sq_attention(vp: *u8, vl: i64, checks: *u8, out: *i64) -> i64
58func sq_longstring(vp: *u8, vl: i64, qids: *i64, nq: i64) -> i64
74func sq_consistency(vp: *u8, vl: i64, qa: *u8, qb: *u8, maxdiff: i64) -> i64
called by 1: main calls 1: st_answer_int
86func sq_ballot_careless(vp: *u8, vl: i64, checks: *u8, sqids: *i64, nsq: i64, ls_thresh: i64, reason: *i64) -> i64
99func sq_rollup(vout: *i64, lout: *i64, nb: i64, checks: *u8, sqids: *i64, nsq: i64, ls_thresh: i64, out: *i64) -> i64