MCPcopy Create free account

hub / github.com/Raj-glitch-max/kubernetes-llm-incident-response-benchmark / functions

Functions108 in github.com/Raj-glitch-max/kubernetes-llm-incident-response-benchmark

↓ 9 callersFunctionanalyze_incident
Analyzes an incident using the specified LLM. Returns the parsed LLMOutput and the latency in seconds. Supported: - 'gpt-4-turbo'
ai/llm_engine.py:189
↓ 7 callersFunction_style_ax
Apply dark theme styling to an axes.
eval/generate_paper_figures.py:57
↓ 7 callersFunctionrun_command
(cmd, cwd=".")
scripts/benchmark_ritual.py:7
↓ 7 callersFunctionsafe_float
(val, default=0.0)
eval/leaderboard.py:29
↓ 6 callersFunctionscore_rca_accuracy
Exact match of LLM predicted category against ground truth. Returns True if they match (case-insensitive).
eval/run_benchmark.py:49
↓ 5 callersFunction_load_incidents
()
eval/generate_paper_figures.py:71
↓ 5 callersFunctionclassify_regime
Classify a (model, incident) run into one of five behavioral regimes. (benchmark_spec.md § 6.2)
eval/run_benchmark.py:218
↓ 5 callersFunctionrule_based_faithfulness
Rule-Based Deterministic Faithfulness Scorer (from benchmark_spec.md § 5) Does NOT use an LLM judge to avoid circular evaluation when GPT-4
eval/run_benchmark.py:77
↓ 4 callersMethodget_last_hidden_state
(self, prompt)
eval/delta_decoding.py:29
↓ 4 callersFunctionsafe_float
(val, default=None)
eval/phase1_migrate.py:40
↓ 3 callersFunctionextract_confidence
Extract confidence score from LLM output.
eval/bayesian_violation.py:121
↓ 3 callersFunctionget_true_severity
Return P1/P2/P3 severity (1=P1) from chaos scenario name.
eval/run_benchmark.py:239
↓ 3 callersFunctionsafe_float
(val, default=0.0)
eval/confident_liar.py:30
↓ 3 callersFunctionscore_remediation
Safety check: ensures commands are valid kubectl/helm/aws commands that don't contain destructive patterns. Returns True if all commands
eval/run_benchmark.py:171
↓ 2 callersFunctionget_scenario
Normalise chaos_type to canonical scenario string.
eval/run_benchmark.py:244
↓ 2 callersFunctionload_raw_incident
Load raw telemetry files for an incident.
eval/bayesian_violation.py:67
↓ 2 callersFunctionscore_command_executability
Command Executability Score — novel metric. Dry-runs each kubectl command using `--dry-run=client`. Returns the fraction of commands tha
eval/run_benchmark.py:130
↓ 2 callersFunctionscore_severity_risk
P1 Severity Risk — novel safety metric (from findings_and_safety.md). Identifies the most dangerous operational failure mode: - P1 inc
eval/run_benchmark.py:201
↓ 1 callersFunction_extract_json_from_raw
Robustly extracts a JSON dict from a raw string that may have leading/trailing conversational text outside the JSON block.
ai/llm_engine.py:116
↓ 1 callersFunction_parse_nvidia_stream_response
Consumes an OpenAI-compatible streaming response from NVIDIA NIM. Returns the assembled content string. Handles both standard content chu
ai/llm_engine.py:87
↓ 1 callersFunctionaggregate
Group by model, compute means for all numeric columns.
eval/leaderboard.py:36
↓ 1 callersFunctionanalyze
(model_filter=None)
eval/confident_liar.py:37
↓ 1 callersMethodattribute
(self, prompt, target_token_text=None)
eval/mechanistic_proof.py:39
↓ 1 callersFunctionbootstrap_ci
Bootstrap confidence interval for the mean of a list of values.
eval/statistics.py:155
↓ 1 callersFunctionbuild_condition_prompt
Build IncidentInput for condition A (full) or D (metadata only).
eval/evidence_eval.py:65
↓ 1 callersFunctionbuild_contradicting_prompt
Condition X — metadata from incident A + logs from incident B (contradicting).
eval/bayesian_violation.py:109
↓ 1 callersFunctionbuild_incident_for_condition
Build an IncidentInput with telemetry blanked according to the condition. strict=True: for Condition D (or D-strict), strips LABEL_LEAK_FIEL
eval/ablation.py:87
↓ 1 callersFunctionbuild_novel_prompt
Build prompt for novel incident under condition A, D, or G.
eval/novel_incidents.py:162
↓ 1 callersFunctionbuild_prior_prompt
Condition D — metadata only, telemetry blanked.
eval/bayesian_violation.py:85
↓ 1 callersFunctionbuild_supporting_prompt
Condition A — full telemetry (logs consistent with label).
eval/bayesian_violation.py:97
↓ 1 callersFunctioncalibration_curve
Reliability diagram: confidence bins (x-axis) vs actual accuracy (y-axis). Perfect calibration = diagonal line. Models scattered above/b
eval/visualize.py:76
↓ 1 callersFunctioncall_claude3_sonnet
(incident: IncidentInput)
ai/llm_engine.py:56
↓ 1 callersFunctioncall_gpt4_turbo
(incident: IncidentInput)
ai/llm_engine.py:30
↓ 1 callersFunctioncall_nvidia_nim
Generic NVIDIA NIM caller. Works with any model available at integrate.api.nvidia.com. model_id should be the canonical NVIDIA model slug, e.
ai/llm_engine.py:144
↓ 1 callersFunctioncheck_dependencies
()
scripts/check_env.py:35
↓ 1 callersFunctioncheck_env_vars
()
scripts/check_env.py:16
↓ 1 callersFunctioncheck_k8s
()
scripts/check_env.py:48
↓ 1 callersFunctioncheck_python_version
()
scripts/check_env.py:7
↓ 1 callersFunctioncompare_strict_d
Compare Condition D (with label fields) vs D-strict (label fields stripped). If accuracy drops when labels are stripped, that proves the labe
eval/statistics.py:107
↓ 1 callersMethoddelta_decode
(self, prompt_full, prompt_meta)
eval/delta_decoding.py:37
↓ 1 callersFunctionevaluate_incident
Run conditions A and D, compute all EI metrics for one incident.
eval/evidence_eval.py:90
↓ 1 callersFunctionextract_kubectl_commands
Pull any kubectl-looking strings from freeform text.
eval/rescore.py:62
↓ 1 callersFunctionextract_sentence_claims
Split root_cause_description into sentence-level claims to use as a proxy for evidence_cited in old rows.
eval/rescore.py:52
↓ 1 callersFunctionformat_incident_prompts
(incident_path)
eval/delta_decoding.py:61
↓ 1 callersFunctiongenerate_diagnostic_quadrant
()
eval/visualize.py:27
↓ 1 callersFunctionget_chaos_type
(incident_id: str)
eval/phase1_migrate.py:59
↓ 1 callersFunctionget_metadata
(incident_id)
scripts/benchmark_ritual.py:15
↓ 1 callersFunctionleaderboard_with_ci
Augment the leaderboard with 95% bootstrap CIs on rca_accuracy. Returns a DataFrame ready for the paper table.
eval/statistics.py:166
↓ 1 callersFunctionload_evaluated_pairs
()
scripts/benchmark_ritual.py:22
↓ 1 callersFunctionload_incident
(incident_id: str)
eval/rlhf_test.py:64
↓ 1 callersFunctionload_raw_incident
Load raw telemetry files for an incident.
eval/evidence_eval.py:47
↓ 1 callersFunctionload_raw_incident
Load raw telemetry files for an incident.
eval/ablation.py:66
↓ 1 callersFunctionload_raw_logs
Load all raw text files for an incident into a dict.
eval/rescore.py:41
↓ 1 callersFunctionload_results
()
eval/leaderboard.py:22
↓ 1 callersFunctionload_telemetry
(incident_id: str)
eval/phase1_migrate.py:47
↓ 1 callersFunctionmain
()
eval/bayesian_violation.py:220
↓ 1 callersFunctionmain
()
eval/rlhf_test.py:217
↓ 1 callersFunctionmain
()
eval/statistics.py:219
↓ 1 callersFunctionmain
()
eval/evidence_eval.py:196
↓ 1 callersFunctionmain
()
eval/novel_incidents.py:310
↓ 1 callersFunctionmain
()
eval/mechanistic_proof.py:90
↓ 1 callersFunctionmain
()
eval/ablation.py:242
↓ 1 callersFunctionmain
()
eval/generate_paper_figures.py:420
↓ 1 callersFunctionmain
()
eval/delta_decoding.py:87
↓ 1 callersFunctionmain
()
scripts/benchmark_ritual.py:49
↓ 1 callersFunctionmain
()
scripts/check_env.py:60
↓ 1 callersFunctionmcnemar_ablation
For each (incident, model) pair, compare accuracy in Condition A vs D. McNemar's test asks: is the drop from A→D significant? Discordant
eval/statistics.py:29
↓ 1 callersFunctionoutput_references_logs
Check if the model output references content from the log files.
eval/novel_incidents.py:201
↓ 1 callersFunctionprint_leaderboard_ci
(df: pd.DataFrame)
eval/statistics.py:199
↓ 1 callersFunctionprint_markdown_table
(leaderboard: dict)
eval/leaderboard.py:68
↓ 1 callersFunctionprint_mcnemar
(results: dict)
eval/statistics.py:82
↓ 1 callersFunctionprint_strict_d_comparison
(df: pd.DataFrame)
eval/statistics.py:131
↓ 1 callersFunctionprocess
()
eval/phase1_migrate.py:67
↓ 1 callersFunctionrescore_row
Fill in missing metric columns for a single CSV row.
eval/rescore.py:67
↓ 1 callersFunctionrun_ablation_for_incident
Run 4 conditions for a given incident + model pair. strict=True: runs Condition D with label fields stripped (D-strict). Results are labelled
eval/ablation.py:134
↓ 1 callersFunctionrun_bayesian_test
Run the 3-condition Bayesian violation test for a single incident × model.
eval/bayesian_violation.py:126
↓ 1 callersFunctionrun_novel_experiment
Run all novel incidents through 3 conditions.
eval/novel_incidents.py:214
↓ 1 callersFunctionrun_rlhf_test
(dry_run: bool = False, incident_filter: str = None, instruct_model: str = None, base_mode
eval/rlhf_test.py:88
↓ 1 callersFunctionscore_hallucination
Binary hallucination penalty: fraction of cited evidence that does NOT appear verbatim anywhere in the raw input logs. Returns float in
eval/run_benchmark.py:57
↓ 1 callersFunctionscore_hallucination_simple
(llm_evidence: list, pod_logs: str, describe: str, events: str)
eval/rlhf_test.py:80
↓ 1 callersFunctionscore_log_faithfulness
Substring-based log faithfulness — legacy scorer (used when raw telemetry text is not available separately, only the combined input_data dict
eval/run_benchmark.py:112
↓ 1 callersFunctionsummarise
Print Bayesian violation summary.
eval/bayesian_violation.py:196
↓ 1 callersFunctionsummarise
Print ECS summary per model.
eval/evidence_eval.py:169
↓ 1 callersFunctionsummarise
Print novel vs familiar ECS comparison.
eval/novel_incidents.py:270
↓ 1 callersFunctionsummarise_ablation
Print a 4-condition accuracy table for each (incident, model).
eval/ablation.py:217
↓ 1 callersFunctionsummarise_rlhf
Print confidence calibration comparison: instruct vs base, hits vs misses, per family.
eval/rlhf_test.py:178
↓ 1 callersMethodvisualise
(self, attributions, input_ids, output_path)
eval/mechanistic_proof.py:70
↓ 1 callersFunctionwrite_results
(rows: list)
eval/bayesian_violation.py:186
↓ 1 callersFunctionwrite_results
(rows: list)
eval/rlhf_test.py:163
↓ 1 callersFunctionwrite_results
(rows: list)
eval/evidence_eval.py:159
↓ 1 callersFunctionwrite_results
(rows: list)
eval/novel_incidents.py:260
↓ 1 callersFunctionwrite_results
(rows: list, strict: bool = False)
eval/ablation.py:206
Method__init__
(self, model_name="distilgpt2")
eval/mechanistic_proof.py:25
Method__init__
(self, model_name="distilgpt2")
eval/delta_decoding.py:21
Functionclassify
(row)
eval/generate_paper_figures.py:211
Functionfigure_1_quadrant
Scatter: faithfulness (x) vs accuracy (y) — reveals 4 behavioral regimes.
eval/generate_paper_figures.py:79
Functionfigure_2_confidence_faithfulness
Shows r ≈ −0.124 visually — confidence predicts NOTHING about faithfulness.
eval/generate_paper_figures.py:115
Functionfigure_3_p1_risk
Bar chart of P1 Severity Risk Rate per model — the safety metric.
eval/generate_paper_figures.py:157
Functionfigure_4_regime_distribution
Pie chart showing distribution of behavioral regimes across all runs.
eval/generate_paper_figures.py:206
Functionfigure_5_ablation
Grouped bar — accuracy across 4 telemetry conditions. The causal proof.
eval/generate_paper_figures.py:273
next →1–100 of 108, ranked by callers