// Numbas version: finer_feedback_settings {"name": "Auditing RPC Event Retrieval with Precision, Recall, and F1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Auditing RPC Event Retrieval with Precision, Recall, and F1", "tags": ["blockchain", "data engineering", "event logs", "precision and recall", "reproducibility", "RPC"], "metadata": {"description": "

A deterministic upper-level data-engineering exercise that audits an RPC log filter against a block-hash-pinned receipt reference set. Learners compute precision, recall, and F1, then identify why retrieval accuracy is distinct from node independence and semantic validity. All counts are synthetic.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

A block-audit compares an RPC log filter with a receipt-derived reference set for one finalized block range. The reference set contains 250 target logs. The provider returns 242 logs; 238 are true positives and 4 belong to removed blocks.

\n

Compute the F1 score as a percentage, where precision = TP/(TP+FP), recall = TP/(TP+FN), and F1 = 2PR/(P+R). Round only the final percentage to two decimal places.

", "advice": "

Worked solution

\n
    \n
  1. True positives: TP = 238.
  2. \n
  3. False positives: FP = 4.
  4. \n
  5. False negatives: FN = 250 - 238 = 12.
  6. \n
  7. Precision = 238/242 = 0.983471.
  8. \n
  9. Recall = 238/250 = 0.952.
  10. \n
  11. F1 = 2TP/(2TP + FP + FN) = 476/492 = 0.967479..., so the audited F1 score is 96.75%.
  12. \n
\n

Evidence boundary

\n

The receipt-derived set is a valid reference only if the receipts are complete, tied to explicit block hashes, and evaluated under a stated canonicality/finality policy. A high F1 score does not prove node independence or semantic correctness.

\n

Primary sources

\n\n

Independent educational resource prepared for publication by Mushegh Manukyan, Founder & CEO of ARMCP. No affiliation with the cited organisations is claimed. AI-assisted language editing; the named author remains responsible for the final material. CC BY 4.0.

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": true, "customName": "F1 score for the audited RPC result", "marks": "10", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

Enter the F1 score as a percentage to two decimal places.

", "minValue": "96.745", "maxValue": "96.755", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "96.75", "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false, "contributors": [{"name": "Mushegh Manukyan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/39968/"}], "resources": []}]}], "contributors": [{"name": "Mushegh Manukyan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/39968/"}]}