Shortcuts

Extension Mechanisms Overview

OpenCompass builds its major components through registries and configuration. Before extending it, first identify the layer to which the requirement belongs:

Requirement

Extension point

New data format or download logic

Dataset

New prompt, retrieval, or generation workflow

PromptTemplate / Retriever / Inferencer

New answer extraction or metric

Postprocessor / Evaluator

New model protocol or runtime

Model

New task partitioning or execution environment

Partitioner / Runner / Task

New leaderboard aggregation convention

Summarizer

Prefer reusing existing components and adding configuration. Add a Python class only when the existing interfaces cannot express the required behavior. Extension code should be registered in the corresponding Registry and accompanied by a minimal configuration, unit tests, and relevant documentation.

@沪ICP备2021009351号-23 OpenCompass Open Platform Service Agreement