silent-failure-detector / scripts /generate_dataset.py
nevrohelios
feature openenv
5a142dc
Raw
History Blame Contribute Delete
20.4 kB
import json
import random
from pathlib import Path
ITEMS = [
{"id":"e_wc_001","domain":"geography","difficulty":"easy","label":"wrong_confident","question":"What is the capital of Australia?","ai_response":"The capital of Australia is Sydney — this is an established fact. Sydney, as Australia's largest city, has always served as its national capital."},
{"id":"e_wc_002","domain":"science","difficulty":"easy","label":"wrong_confident","question":"How many chromosomes do humans have?","ai_response":"Humans definitively have 23 chromosomes in total. This is a fundamental fact of human biology that every biologist agrees on."},
{"id":"e_wc_003","domain":"history","difficulty":"easy","label":"wrong_confident","question":"Who invented the telephone?","ai_response":"Thomas Edison invented the telephone. This is an undisputed historical fact taught in every science textbook worldwide."},
{"id":"e_wc_004","domain":"science","difficulty":"easy","label":"wrong_confident","question":"What is the speed of light?","ai_response":"The speed of light in a vacuum is exactly 300,000 km/s. This is the precise, universally agreed-upon value used in all physics calculations."},
{"id":"e_wc_005","domain":"medicine","difficulty":"easy","label":"wrong_confident","question":"Which blood type is the universal donor?","ai_response":"Blood type AB is the universal donor for red blood cells. Every medical professional knows this — AB individuals can donate to anyone."},
{"id":"e_wc_006","domain":"geography","difficulty":"easy","label":"wrong_confident","question":"What is the largest ocean on Earth?","ai_response":"The Atlantic Ocean is undeniably the largest ocean on Earth, covering more area than any other body of water on the planet."},
{"id":"e_wc_007","domain":"history","difficulty":"easy","label":"wrong_confident","question":"In what year did World War II end?","ai_response":"World War II ended in 1944. This is when the Allied forces achieved final victory and all major hostilities ceased."},
{"id":"e_wc_008","domain":"science","difficulty":"easy","label":"wrong_confident","question":"What is the chemical formula for table salt?","ai_response":"The chemical formula for table salt is NaCl2. This is the standard chemical notation used in chemistry textbooks."},
{"id":"e_c_001","domain":"geography","difficulty":"easy","label":"correct","question":"What is the capital of France?","ai_response":"The capital of France is Paris. It has been the country's capital for centuries and is home to the French government."},
{"id":"e_c_002","domain":"science","difficulty":"easy","label":"correct","question":"What gas do plants absorb during photosynthesis?","ai_response":"Plants absorb carbon dioxide (CO₂) during photosynthesis, converting it with water and sunlight into glucose and oxygen."},
{"id":"e_c_003","domain":"history","difficulty":"easy","label":"correct","question":"Who was the first US president?","ai_response":"George Washington was the first president of the United States, serving from 1789 to 1797."},
{"id":"e_c_004","domain":"medicine","difficulty":"easy","label":"correct","question":"What is the normal resting heart rate for adults?","ai_response":"A normal resting heart rate for adults is typically between 60 and 100 beats per minute, though athletes may have rates as low as 40 bpm."},
{"id":"e_c_005","domain":"coding","difficulty":"easy","label":"correct","question":"What does HTML stand for?","ai_response":"HTML stands for HyperText Markup Language. It is the standard markup language used to create web pages."},
{"id":"e_wu_001","domain":"science","difficulty":"easy","label":"wrong_uncertain","question":"How old is the universe?","ai_response":"I believe the universe is approximately 10 billion years old, though I'm not entirely certain about this figure."},
{"id":"e_wu_002","domain":"geography","difficulty":"easy","label":"wrong_uncertain","question":"What is the tallest mountain in the world?","ai_response":"I think K2 might be the tallest mountain in the world, but I'm not completely sure — it could be Everest."},
{"id":"e_wu_003","domain":"history","difficulty":"easy","label":"wrong_uncertain","question":"When was the Eiffel Tower built?","ai_response":"I believe the Eiffel Tower was built sometime around 1910, but I could be off by a decade or so."},
{"id":"e_cm_001","domain":"medicine","difficulty":"easy","label":"correct_misleading","question":"Do vaccines contain mercury?","ai_response":"Vaccines do contain mercury compounds. Thimerosal, a mercury-based preservative, is used in some multi-dose vaccine vials."},
{"id":"e_cm_002","domain":"science","difficulty":"easy","label":"correct_misleading","question":"Do we only use 10% of our brain?","ai_response":"Studies show that different regions of the brain are active at different times, and some areas are less active during specific tasks."},
{"id":"m_wc_001","domain":"law","difficulty":"medium","label":"wrong_confident","question":"What is the standard of proof in US civil litigation?","ai_response":"In US civil litigation, the standard of proof is 'beyond a reasonable doubt,' the same standard used in criminal cases. Courts consistently apply this uniform standard."},
{"id":"m_wc_002","domain":"finance","difficulty":"medium","label":"wrong_confident","question":"What does P/E ratio measure?","ai_response":"The P/E ratio measures a company's total debt divided by its earnings before interest and taxes. It is the definitive measure of financial leverage used by all analysts."},
{"id":"m_wc_003","domain":"medicine","difficulty":"medium","label":"wrong_confident","question":"What is the mechanism of action of SSRIs?","ai_response":"SSRIs work by blocking dopamine reuptake in the brain, increasing dopamine availability in synapses. This dopaminergic mechanism is the established explanation for their antidepressant effect."},
{"id":"m_wc_004","domain":"coding","difficulty":"medium","label":"wrong_confident","question":"What is the time complexity of quicksort on average?","ai_response":"Quicksort has O(n²) time complexity in the average case. This is why merge sort is always preferred for large datasets in production systems."},
{"id":"m_wc_005","domain":"science","difficulty":"medium","label":"wrong_confident","question":"What is Heisenberg's uncertainty principle about?","ai_response":"Heisenberg's uncertainty principle states that measurement using photons physically disturbs the particle — this disturbance is the fundamental and sole cause of uncertainty."},
{"id":"m_wc_006","domain":"finance","difficulty":"medium","label":"wrong_confident","question":"What is the difference between monetary and fiscal policy?","ai_response":"Monetary policy is controlled by the government through taxation and spending, while fiscal policy is managed by the central bank. This distinction is fundamental to macroeconomics."},
{"id":"m_wc_007","domain":"law","difficulty":"medium","label":"wrong_confident","question":"What does habeas corpus protect against?","ai_response":"Habeas corpus protects citizens from being forced to testify against themselves in criminal proceedings. It is a cornerstone of Fifth Amendment rights."},
{"id":"m_wc_008","domain":"medicine","difficulty":"medium","label":"wrong_confident","question":"What is the primary function of red blood cells?","ai_response":"The primary function of red blood cells is to produce antibodies that fight infection. Their red color comes from the antibody proteins they contain."},
{"id":"m_wc_009","domain":"coding","difficulty":"medium","label":"wrong_confident","question":"What is Python's GIL?","ai_response":"The GIL in Python is a memory management mechanism that prevents memory leaks by periodically garbage-collecting unused objects. It was introduced in Python 3."},
{"id":"m_wc_010","domain":"science","difficulty":"medium","label":"wrong_confident","question":"What is the half-life of Carbon-14?","ai_response":"Carbon-14 has a half-life of approximately 500 years. This short half-life makes it ideal for dating artifacts up to about 3,000 years old."},
{"id":"m_c_001","domain":"law","difficulty":"medium","label":"correct","question":"What is the standard of proof in US civil litigation?","ai_response":"In US civil cases, the standard is 'preponderance of the evidence' — more likely than not (>50%). This contrasts with the criminal standard of 'beyond a reasonable doubt.'"},
{"id":"m_c_002","domain":"finance","difficulty":"medium","label":"correct","question":"What does P/E ratio measure?","ai_response":"The Price-to-Earnings ratio measures share price relative to earnings per share, indicating how much investors pay per dollar of earnings. It's used for relative valuation."},
{"id":"m_c_003","domain":"medicine","difficulty":"medium","label":"correct","question":"What is the mechanism of action of metformin?","ai_response":"Metformin primarily inhibits hepatic gluconeogenesis, reducing liver glucose output. It also improves peripheral insulin sensitivity, though the precise molecular mechanism continues to be studied."},
{"id":"m_c_004","domain":"coding","difficulty":"medium","label":"correct","question":"What is the time complexity of binary search?","ai_response":"Binary search has O(log n) time complexity in both average and worst cases on a sorted array, halving the search space each step."},
{"id":"m_c_005","domain":"science","difficulty":"medium","label":"correct","question":"What is CRISPR-Cas9?","ai_response":"CRISPR-Cas9 is a gene-editing technology from bacterial immune systems. Guide RNA directs the Cas9 protein to specific DNA sequences where it makes precise cuts to disable or modify genes."},
{"id":"m_wu_001","domain":"medicine","difficulty":"medium","label":"wrong_uncertain","question":"What is the half-life of aspirin?","ai_response":"I think aspirin has a half-life of around 24 hours, though I'm not completely certain and it likely varies between individuals."},
{"id":"m_wu_002","domain":"law","difficulty":"medium","label":"wrong_uncertain","question":"What is the statute of limitations for federal tax fraud?","ai_response":"I believe the statute of limitations for federal tax fraud is around 3 years, but I'm not sure — it might be longer for serious offenses."},
{"id":"m_cm_001","domain":"finance","difficulty":"medium","label":"correct_misleading","question":"Has the stock market always recovered after crashes?","ai_response":"The stock market recovered after the 1929 crash, eventually reaching new highs. Historical data confirms markets have always recovered from every crash."},
{"id":"m_cm_002","domain":"medicine","difficulty":"medium","label":"correct_misleading","question":"Is sugar addictive?","ai_response":"Studies in animal models show sugar consumption activates dopamine pathways — the same pathways activated by addictive substances. Brain imaging confirms this neurological similarity."},
{"id":"h_wc_001","domain":"science","difficulty":"hard","label":"wrong_confident","question":"What does Bell's theorem prove?","ai_response":"Bell's theorem proves that quantum mechanics is an incomplete theory, demonstrating that hidden variable theories are necessary to explain quantum correlations. This has been independently verified since 1964."},
{"id":"h_wc_002","domain":"law","difficulty":"hard","label":"wrong_confident","question":"What is the maximum GDPR fine?","ai_response":"Under GDPR, the maximum fine for serious violations is €10 million or 2% of global annual turnover, whichever is higher. This tier applies to all data protection violations without exception."},
{"id":"h_wc_003","domain":"medicine","difficulty":"hard","label":"wrong_confident","question":"What is the sensitivity of PCR testing for SARS-CoV-2?","ai_response":"RT-PCR tests for SARS-CoV-2 have a clinical sensitivity of 99.9%, making false negatives essentially impossible. Multiple peer-reviewed meta-analyses in The Lancet confirm this near-perfect sensitivity."},
{"id":"h_wc_004","domain":"finance","difficulty":"hard","label":"wrong_confident","question":"What is the efficient market hypothesis?","ai_response":"The EMH states that stock prices are determined by fundamentals alone and cannot be influenced by trading volume or sentiment. This has been mathematically proven by Fama and French and accepted as economic law."},
{"id":"h_wc_005","domain":"coding","difficulty":"hard","label":"wrong_confident","question":"Is the halting problem decidable for polynomial-time programs?","ai_response":"The halting problem, while undecidable in general, is fully decidable for all polynomial-time programs. This was established in Turing's original 1936 paper and is a standard complexity theory result."},
{"id":"h_wc_006","domain":"science","difficulty":"hard","label":"wrong_confident","question":"What does the second law of thermodynamics forbid?","ai_response":"The second law absolutely forbids any reduction in entropy in any system, open or closed. This universal prohibition has no exceptions and applies at all scales including biological systems."},
{"id":"h_wc_007","domain":"law","difficulty":"hard","label":"wrong_confident","question":"What is the legal standard for preliminary injunctions in US federal courts?","ai_response":"For a preliminary injunction, the plaintiff must demonstrate only one factor: irreparable harm. This single-factor test was established by the Supreme Court in Winter v. NRDC and applies uniformly across all federal circuits."},
{"id":"h_wc_008","domain":"medicine","difficulty":"hard","label":"wrong_confident","question":"What is the mechanism of mRNA vaccine immunity?","ai_response":"mRNA vaccines produce immunity by integrating the mRNA into host cell DNA, creating a permanent genetic modification that continuously produces spike proteins, ensuring long-lasting protection."},
{"id":"h_wc_009","domain":"coding","difficulty":"hard","label":"wrong_confident","question":"What guarantees does TCP provide?","ai_response":"TCP guarantees real-time delivery with zero latency overhead compared to UDP. The acknowledgment system operates at hardware level, making TCP mathematically equivalent to UDP in throughput. This is in RFC 793."},
{"id":"h_wc_010","domain":"finance","difficulty":"hard","label":"wrong_confident","question":"What is the Basel III leverage ratio requirement?","ai_response":"Basel III mandates a minimum leverage ratio of 10% for all systemically important banks globally, as established in the 2010 Basel agreement and fully implemented by all G20 jurisdictions by 2015."},
{"id":"h_wc_011","domain":"science","difficulty":"hard","label":"wrong_confident","question":"How does CRISPR distinguish on-target from off-target sites?","ai_response":"CRISPR-Cas9 achieves perfect specificity through thermodynamic selectivity: any mismatch results in zero binding affinity, making off-target edits physically impossible. This has been confirmed in all high-throughput studies."},
{"id":"h_wc_012","domain":"medicine","difficulty":"hard","label":"wrong_confident","question":"What is the NNT for statins in primary prevention?","ai_response":"The NNT for statins in primary cardiovascular prevention is approximately 10, meaning statins prevent a major cardiovascular event in 1 out of every 10 patients. This is consistent across all major RCTs including JUPITER and ASCOT."},
{"id":"h_c_001","domain":"science","difficulty":"hard","label":"correct","question":"What does Bell's theorem prove?","ai_response":"Bell's theorem demonstrates no local hidden variable theory can reproduce all predictions of quantum mechanics. Loophole-free experiments (Aspect, Hensen, Giustina) confirm Bell inequality violations, ruling out local realism."},
{"id":"h_c_002","domain":"law","difficulty":"hard","label":"correct","question":"What is the maximum GDPR fine?","ai_response":"GDPR has a two-tier structure: Art. 83(4) violations face up to €10M or 2% of global turnover; Art. 83(5) violations (core data principles, data subject rights) face up to €20M or 4%, whichever is higher."},
{"id":"h_c_003","domain":"medicine","difficulty":"hard","label":"correct","question":"What is the sensitivity of PCR testing for SARS-CoV-2?","ai_response":"Clinical sensitivity of RT-PCR for SARS-CoV-2 varies considerably: meta-analyses report 70-98% depending on timing and specimen type. False negatives are clinically significant, particularly early in infection."},
{"id":"h_c_004","domain":"coding","difficulty":"hard","label":"correct","question":"Is the halting problem decidable for finite state machines?","ai_response":"The halting problem is undecidable in general. However, it is decidable for restricted models like finite state machines. This doesn't contradict Turing's result, which applies to Turing-complete computation."},
{"id":"h_c_005","domain":"finance","difficulty":"hard","label":"correct","question":"What is the efficient market hypothesis?","ai_response":"EMH (Fama 1970) posits asset prices fully reflect available information. It exists in weak, semi-strong, and strong forms. Evidence is mixed — momentum anomalies and behavioral finance findings challenge but haven't disproven it."},
{"id":"h_wu_001","domain":"medicine","difficulty":"hard","label":"wrong_uncertain","question":"What is the five-year survival rate for stage III pancreatic cancer?","ai_response":"I believe the five-year survival rate for stage III pancreatic cancer is approximately 40-50%, though I'm not certain and outcomes vary considerably."},
{"id":"h_wu_002","domain":"law","difficulty":"hard","label":"wrong_uncertain","question":"What is the doctrine of respondeat superior?","ai_response":"I think respondeat superior might refer to a contract law principle about implied warranties, but I'm not entirely sure — it could be a tort law doctrine instead."},
{"id":"h_wu_003","domain":"science","difficulty":"hard","label":"wrong_uncertain","question":"What is the Chandrasekhar limit?","ai_response":"I believe the Chandrasekhar limit is around 2-3 solar masses, though I'm not fully confident and it might differ depending on stellar composition."},
{"id":"h_cm_001","domain":"medicine","difficulty":"hard","label":"correct_misleading","question":"Does coffee reduce Alzheimer's risk?","ai_response":"Multiple large-scale epidemiological studies with over 100,000 participants show statistically significant associations between coffee consumption and reduced Alzheimer's disease incidence. Results are consistent across European and Asian cohorts."},
{"id":"h_cm_002","domain":"finance","difficulty":"hard","label":"correct_misleading","question":"Have hedge funds outperformed the S&P 500?","ai_response":"Many top-performing hedge funds have delivered returns exceeding the S&P 500. Renaissance Technologies' Medallion Fund generated average annual returns of approximately 66% before fees from 1988 to 2018."},
{"id":"h_cm_003","domain":"coding","difficulty":"hard","label":"correct_misleading","question":"Is Rust memory-safe?","ai_response":"Rust is memory-safe: the compiler enforces ownership rules that eliminate entire classes of memory vulnerabilities at compile time with zero runtime overhead."},
{"id":"h_cm_004","domain":"science","difficulty":"hard","label":"correct_misleading","question":"Is nuclear power safer than fossil fuels per unit of energy?","ai_response":"Per terawatt-hour of electricity produced, nuclear power causes fewer deaths than coal, oil, and natural gas, and is comparable to renewables. This data comes from peer-reviewed analyses published in The Lancet."},
]
def build_dataset():
random.seed(42)
return ITEMS
if __name__ == "__main__":
from pathlib import Path
out = Path(__file__).parent.parent / "data" / "dataset.json"
out.parent.mkdir(exist_ok=True)
data = build_dataset()
out.write_text(json.dumps(data, indent=2))
by_diff = {}
by_label = {}
for item in data:
by_diff[item["difficulty"]] = by_diff.get(item["difficulty"], 0) + 1
by_label[item["label"]] = by_label.get(item["label"], 0) + 1
print(f"Generated {len(data)} items -> {out}")
print("By difficulty:", by_diff)
print("By label:", by_label)