karenina-qa

Build and run single-turn QA benchmarks for LLM evaluation with karenina.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) components.

What problem does it solve? Evaluating LLMs on factual questions requires structured benchmarks with ground-truth answers, extraction templates, and judge models. This Skill guides the full workflow of creating, running, and analyzing single-turn QA benchmarks with the karenina framework. ## Core Features & Use Cases - Benchmark Authoring: Define questions with ground-truth answers, import them in bulk from CSV/TSV/Excel, and auto-generate or manually author answer templates. - Verification Pipeline: Configure answering and judge models, attach rubrics, run verification, and save checkpoints in JSON-LD format. - Result Analysis: Inspect per-question results, failure categories, and export template or rubric scores to DataFrames and files. - Use Case: A researcher wants to test whether a model correctly identifies drug targets. They load 200 expert-authored questions from a CSV, auto-generate answer templates with Claude, run verification, and export per-question pass/fail results for analysis. ## Quick Start Ask the assistant to create a karenina QA benchmark from your questions CSV, generate answer templates, and run verification with your chosen answering and judge models.

Frequently Asked Questions about karenina-qa

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

FAQPage Schema
How do I create a QA benchmark to evaluate an LLM with karenina?

Create a Benchmark object, add Question objects with question text and raw_answer ground truth, attach answer templates (auto-generated or manual), then call run_verification with a VerificationConfig specifying answering and parsing models.

How do I import questions from a CSV file into a karenina benchmark?

Use extract_questions_from_file with the file path, question column, and answer column names. It supports CSV, TSV, and Excel, plus optional keyword and metadata columns, returning Question objects for add_questions.

Does karenina save verification results in the benchmark checkpoint?

No. Benchmark.save() persists only questions, templates, and rubrics in JSON-LD. Verification results stay in memory and must be exported separately via ResultsStore with add() and export_to_file().

Why is my rubric not being evaluated during karenina verification?

The default evaluation_mode is template_only, which skips attached rubrics. Set evaluation_mode to template_and_rubric or rubric_only explicitly in the VerificationConfig to run rubric evaluation.

Why does karenina verification fail with an authentication error?

The provider API key must be present in the process environment, such as ANTHROPIC_API_KEY exported in the shell. The repo-root .env is not auto-loaded, so source it explicitly or pass the key via ModelConfig.

What happens when two karenina questions have identical text?

Question.id is the MD5 hash of the question text, so identical text produces the same ID. Adding a duplicate silently overwrites the previous entry including its template; change the text to get a distinct ID.