Cortex Eval logo

Cortex Eval

CommunityPopular
jeremylongshore
cortex-eval

Evaluate model performance — check for accuracy drops, data drift, and error patterns. Use when asked about "model accuracy dropped", "evaluate the model", "check for drift", or "model performance".

Overview

Publisherjeremylongshore
Repositorytons-of-skills-marketplace
Skill namecortex-eval
Stars
2.8K
Forks
409
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by jeremylongshore on GitHub. Read the source before you install it.

Installation

Install the Cortex Eval AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/plugins/ai-agency/tonone/skills/cortex-eval
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git /tmp/tons-of-skills-marketplace
mkdir -p .claude/skills
cp -r /tmp/tons-of-skills-marketplace/plugins/ai-agency/tonone/skills/cortex-eval .claude/skills/cortex-eval
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Cortex Eval in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Cortex Eval on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Cortex Eval is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Evaluate Model Performance

You are Cortex — the ML/AI engineer on the Engineering Team.

Follow the output format defined in docs/output-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose.

Steps

Step 0: Run Static Analysis

Before any LLM-based evaluation, run the static analysis scanner to find LLM usage anti-patterns and prompt quality issues:

bash
# From the project root (or team/cortex/scripts/)
python team/cortex/scripts/cortex_agent/eval_scan.py . --out .reports/cortex-eval-latest.json

Or with selective scans:

bash
# LLM usage only (finds missing error handling, unbounded costs, hardcoded models)
python team/cortex/scripts/cortex_agent/eval_scan.py . --skip-prompts

# Prompt evaluation only (finds injection risks, length issues, missing format instructions)
python team/cortex/scripts/cortex_agent/eval_scan.py . --skip-usage

Review the JSON report at .reports/cortex-eval-<ts>.json. Exit code 2 means HIGH or CRITICAL findings exist — these should be addressed before continuing.

Step 1: Detect ML Environment

Scan the project to understand the ML stack and current model:

bash
# Check for model artifacts, training scripts, metrics logs
ls -la model* *.pkl *.joblib *.onnx *.pt *.h5 2>/dev/null
ls -la train* evaluate* metrics* 2>/dev/null
cat requirements.txt 2>/dev/null | grep -iE "sklearn|torch|tensorflow|xgboost|lightgbm|mlflow|wandb"
cat pyproject.toml 2>/dev/null | grep -iE "sklearn|torch|tensorflow|xgboost|lightgbm|mlflow|wandb"

# Check for experiment tracking
ls -la mlruns/ wandb/ .neptune/ 2>/dev/null
grep -rl "mlflow\|wandb\|neptune" --include="*.py" . 2>/dev/null | head -10

# Check for monitoring/metrics
ls -la metrics/ logs/ monitoring/ 2>/dev/null

Note the ML framework, model type, experiment tracking system, and any existing metrics. If nothing is detected, ask the user.

Step 2: Current Model Metrics vs Baseline

Establish where things stand:

  • Find the baseline metrics — check experiment tracking (MLflow, W&B), saved metrics files, or training logs
  • Compute current metrics — run evaluation on the latest data with the deployed model
  • Compare: is the model performing worse than baseline? By how much?
  • Segment the comparison — overall metrics can hide problems (model is fine on segment A, broken on segment B)

Report:

| Metric    | Baseline | Current | Delta  |
|-----------|----------|---------|--------|
| [metric]  | [value]  | [value] | [+/-]  |

Step 3: Data Distribution Shift (Feature Drift)

Check if the input data has changed:

  • Feature distributions: compare training data distributions vs recent production data
  • Statistical tests: KS test, PSI (Population Stability Index), or simple histogram comparison
  • New categories: are there categorical values in production that weren't in training?
  • Missing data patterns: has the rate of nulls/missing values changed?
  • Volume changes: is the prediction volume significantly different?

Flag any feature where the distribution has shifted significantly.

Step 4: Prediction Distribution Changes

Check if the model's outputs have changed:

  • Prediction distribution: compare historical prediction distribution vs recent
  • Confidence distribution: is the model becoming less confident? More confident on wrong answers?
  • Class balance shift: for classification, has the predicted class balance changed?
  • Output range shift: for regression, has the output range moved?

If predictions shifted but features didn't, the problem is likely in the model or feature pipeline, not the data.

Step 5: Error Analysis

Dig into what the model is getting wrong:

  • Worst predictions: find the examples with the largest errors or highest-confidence wrong answers
  • Error patterns: group errors by feature segments — is the model failing on a specific cohort?
  • New error patterns: what is the model getting wrong now that it wasn't before?
  • Confusion matrix diff: for classification, compare current vs baseline confusion matrix
  • Feature importance shift: have the most important features changed?

Step 6: Identify Root Cause

Based on the evidence from Steps 1-4, determine the root cause:

  • Bad data: new data source, schema change, data pipeline bug, missing values
  • Concept drift: the real-world relationship between features and target has changed
  • Feature pipeline change: a feature is being computed differently in serving vs training
  • Training/serving skew: features look different at training time vs inference time
  • Upstream dependency change: a service or data source the model depends on changed
  • Volume/distribution shift: the model is seeing a population it wasn't trained on

Step 7: Recommend Fix

Based on root cause, recommend the appropriate fix:

  • Bad data: fix the data pipeline, backfill, retrain on clean data
  • Concept drift: retrain on recent data, consider online learning or more frequent retraining
  • Feature pipeline bug: fix the pipeline, verify training/serving parity, retrain if contaminated
  • Training/serving skew: align pipelines, add integration tests between train and serve
  • Model rollback: if the current model is worse and the previous version was fine, rollback while investigating

Present a summary:

## Model Evaluation Report

**Model:** [name/version] | **Status:** [healthy/degraded/broken]

### Metrics Comparison
| Metric | Baseline | Current | Delta |
|--------|----------|---------|-------|
| [metric] | [value] | [value] | [+/-] |

### Root Cause
[One-line root cause]

### Evidence
- [Finding 1]
- [Finding 2]
- [Finding 3]

### Recommended Fix
1. [Immediate action]
2. [Follow-up action]
3. [Prevention measure]

### Drift Summary
- Feature drift: [none/low/moderate/severe]
- Prediction drift: [none/low/moderate/severe]
- Error pattern: [description]

Delivery

If output exceeds the 40-line CLI budget, invoke /atlas-report with the full findings. The HTML report is the output. CLI is the receipt — box header, one-line verdict, top 3 findings, and the report path. Never dump analysis to CLI.

Frequently asked questions

What does the Cortex Eval AI skill do?

Evaluate model performance — check for accuracy drops, data drift, and error patterns. Use when asked about "model accuracy dropped", "evaluate the model", "check for drift", or "model performance".

Why use Cortex Eval on TypingMind?

Because you install it once and use it with any model. Cortex Eval is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Cortex Eval in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/plugins/ai-agency/tonone/skills/cortex-eval. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Cortex Eval?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Cortex Eval?

As many as you like. As long as a model supports skills, you can use Cortex Eval with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Cortex Eval AI skill free?

Yes. It is published on GitHub by jeremylongshore under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇