What Is the Median Principle Heuristic in Zhangxuefeng-skill?

The Median Principle is a data-driven decision heuristic that advises evaluating career and education choices based on the outcomes of the middle 50% of people who made the same decision, deliberately ignoring both top performers and worst-case scenarios.

The Median Principle (中文 "中位数原则") serves as one of eight core decision-making heuristics in the zhangxuefeng-skill open-source project. This pragmatic rule-of-thumb prioritizes statistical median outcomes over outliers when generating advice about majors, careers, or educational institutions. As implemented in the alchaincyf/zhangxuefeng-skill repository, the principle ensures recommendations reflect sustainable, typical trajectories rather than aspirational exceptions.

Understanding the Median Principle Heuristic

Definition and Core Logic

According to the source documentation in README.md, the Median Principle is explicitly defined as: "不看顶尖不看最差,看中间50%的人过得怎么样" (Don't look at the top, don't look at the worst, look at how the middle 50% are doing).

This heuristic operates on a three-step methodology:

  1. Collect real-world outcome data for graduates of specific majors or universities
  2. Rank these outcomes by metrics like salary, employment rate, and job stability
  3. Select the median segment as the primary reference point for recommendations

Why Ignore the Extremes?

The principle filters out outliers because extreme success stories and failure cases are rarely reproducible for the typical individual. By focusing on the median 50%, the skill generates advice aligned with the most probable and sustainable career trajectory, avoiding the distortion caused by exceptional cases.

Source Files and Implementation

The heuristic is documented across multiple files in the repository:

Practical Usage Examples

The Median Principle is not a separate API endpoint but a logical sub-routine embedded in the skill's answer generation pipeline.

Direct Prompt Invocation

> 用张雪峰的视角帮我分析:选读计算机专业的中位数就业前景怎么样?

When processing this query, the skill retrieves average salary, employment rate, and typical job titles for the median 50% of computer science graduates, basing its recommendation on reproducible outcomes (e.g., "约10-12万年薪,主要进入互联网公司研发或运维岗位") rather than rare high-profile cases.

Implicit Invocation via Employment-Backward Method

> 张雪峰,给我做一次就业倒推:如果我想学金融,应该先查哪些中位数数据?

The response generates a step-by-step data collection plan, explicitly stating it will "查看金融相关专业毕业生的中位数去向" (check the median destinations of finance graduates) and compare median salaries before forming an opinion.

Integration with the Employment-Backward Model

The Median Principle aligns with Zhang Xuefeng's broader "employment-backward" (就业倒推法) methodology. Rather than relying on aspirational claims or anecdotal evidence, the skill derives advice from actual post-graduation data sets, applying the median filter to ensure statistical relevance.

Summary

  • The Median Principle filters out career and education outliers to focus on the middle 50% of outcomes
  • It is explicitly defined in README.md and references/research/05-decisions.md as one of eight core heuristics
  • The principle operates automatically during answer generation, not as a separate function call
  • It supports the "employment-backward" model by prioritizing reproducible, data-driven trajectories over exceptional cases

Frequently Asked Questions

How does the Median Principle differ from using average statistics?

The Median Principle specifically targets the middle 50% of outcomes, whereas averages can be skewed by extreme high or low values. By explicitly excluding both top performers and worst-offenders as documented in the source files, the heuristic provides a more realistic baseline for typical individuals that cannot be distorted by outlier salaries or unemployment rates.

Is the Median Principle a standalone function in the codebase?

No. According to the source analysis, the Median Principle functions as a logical sub-routine embedded within the skill's answer generation pipeline. When users query career or education data, the skill automatically applies this heuristic when relevant data is available in SKILL.md or reference files.

Where is the Median Principle documented in the repository?

The principle is documented in two primary locations: README.md lists it among eight decision heuristics, and references/research/05-decisions.md reiterates the definition as the second heuristic in the decision research file. Both files contain the exact Chinese phrasing: "不看顶尖不看最差,看中间50%的人过得怎么样".

Can users trigger the Median Principle manually?

Yes. Users can invoke the principle explicitly by asking about "中位数" (median) outcomes in their prompts, or implicitly through the "employment-backward" method (就业倒推法), which automatically incorporates median data collection steps as shown in examples/demo-conversation.md.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →