karenina-results

Load, analyze, and export karenina verification results as DataFrames.

13|3|Updated Jun 27, 2025
One-click install
npx skills add https://github.com/biocypher/karenina --skill karenina-results-biocypher
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: karenina-results
Source: https://github.com/biocypher/karenina/tree/main/skills/karenina-results
Command: npx skills add https://github.com/biocypher/karenina --skill karenina-results-biocypher

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? After running LLM verification pipelines, results live in nested Pydantic models and versioned JSON exports that are hard to navigate, compare across models, or turn into analysis-ready tables. This Skill explains how to load VerificationResultSet objects, traverse their sub-objects, extract DataFrames, and export or repair results. ## Core Features & Use Cases - Result Loading: Load results from benchmark runs, v2.2 JSON exports, legacy v2.0/v2.1 files, extended runs, and scenario runs, with guidance on which loader handles which export shape. - DataFrame Extraction: Convert template, rubric, judgment, and scenario results into pandas DataFrames with documented column definitions for field-level, trait-level, regex, and token-usage views. - Comparison and Aggregation: Group results by model or question, filter by replicate or pass/fail status, and aggregate scores with strategies like mean, median, and majority vote. - Use Case: After verifying 500 biomedical QA answers across three models, load the exported JSON, build a rubric DataFrame filtered to LLM traits, and compute per-model pass rates to compare model behavior. ## Quick Start Load my karenina results.json file and show me the per-model pass rates as a DataFrame.

Frequently Asked Questions about karenina-results

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I load karenina verification results from a JSON file?

Use ResultsIOManager.load_result_set_from_json(path) for current v2.2 exports, which validates rows and preserves metadata. For legacy v2.0/v2.1 exports, use ResultsIOManager.load_legacy_result_set(path), which migrates old row shapes before validation.

How do I convert verification results to a pandas DataFrame?

Call result_set.get_template_results().to_dataframe() for one row per parsed field, or result_set.get_rubrics_results().to_dataframe() for one row per trait. Scenario runs offer to_dataframe(), to_turn_dataframe(), and to_outcome_dataframe() views.

Why does filtering by model name return an empty result set?

The answering_models filter matches the full display string like 'langchain:claude-sonnet-4-6', not the bare model name, using exact string equality. Inspect actual keys first with sorted({r.metadata.answering_model for r in result_set}).

How do I check whether a verification result succeeded or failed?

Check result.metadata.failure: it is None on success and a Failure object on failure, exposing category, stage, reason, and group. There is no error or completed_without_errors field on the result.

Can I re-score old results against a new rubric without re-running the pipeline?

Yes, use evaluate_rubric_on_results from karenina.benchmark with a VerificationResultSet, a Rubric, and a parsing model. It returns PostHocJudgment objects carrying scores, labels, and errors per row.

Why does streaming iteration yield zero rows on my results file?

ResultsIOManager.iter_from_json only supports the v2.2 {"results": [...]} shape and legacy bare arrays. Merged {"runs": {...}} exports from ResultsStore.export_to_file must be loaded with load_result_set_from_json instead.