Quality Scoring

Overview

Quality scoring evaluates the reliability of cell type annotations by analyzing the reasoning and evidence behind each prediction. The scoring agent assigns confidence scores (0-100) to each annotation, helping identify clusters that may need further validation through the Annotation Boost or Compare agents.


Quick Start

runCASSIA_score_batch(
    input_file = "my_annotation_summary.csv",  # JSON auto-detected
    output_file = "my_annotation_scored.csv",
    model = "openai/gpt-5.1",
    provider = "openrouter"
)
R

Input

Quality scoring requires two files generated by runCASSIA_batch:

  1. Summary CSV (*_summary.csv) - Contains cluster identifiers, predicted cell types, marker gene lists, and metadata
  2. Conversations JSON (*_conversations.json) - Contains the complete conversation history with reasoning

Auto-detection: When you provide the summary CSV as input, CASSIA automatically finds the corresponding conversations JSON file in the same directory. No need to specify both files manually.


Parameters

Required

ParameterDescription
input_filePath to summary CSV (from runCASSIA_batch). The conversations JSON is auto-detected.
modelLLM model ID for scoring
providerAPI provider ("openrouter", "openai", "anthropic") or custom base URL

Optional

ParameterDefaultDescription
output_file{input}_scored.csvOutput file name for scored results
conversations_json_pathAuto-detectedPath to conversations JSON. By default, auto-detected from input CSV name.
max_workers4Number of parallel scoring threads
reasoningNULLReasoning depth for GPT-5 series via OpenRouter only ("low", "medium", "high"). See Reasoning Effort Parameter.

Parameter Details

Model Selection

  • Highly recommended: openai/gpt-5.1 or anthropic/claude-sonnet-4.5 for best accuracy
  • Scoring requires strong reasoning capabilities to evaluate annotation quality

Output

Files Generated

FileDescription
{output_file}Scored results CSV with quality scores and reasoning
{output_file}_report.htmlInteractive HTML report with all CASSIA outputs

Output Contents

The scored CSV file includes:

  • Original annotation data
  • Quality scores (0-100)
  • Detailed reasoning for each score

Interpreting Scores

Score RangeConfidenceRecommended Action
90-100HighStrong evidence, annotation is reliable
76-89GoodAdequate evidence, generally trustworthy
<75LowRun through Annotation Boost Agent and Compare Agent