Skip to main content

module cleanlab_codex.types.tlm

Types for TLM.


class TLMOptions

Customization options for querying TLM. For details, see the TLM documentation.

class TLMOptions(TypedDict):
custom_eval_criteria: 'typing.Iterable[object]'
log: 'typing.List[str]'
max_tokens: 'int'
model: 'str'
num_candidate_responses: 'int'
num_consistency_samples: 'int'
reasoning_effort: 'str'
similarity_measure: 'str'
use_self_reflection: 'bool'

class TLMPromptResponse

The response from prompting TLM.

class TLMPromptResponse:
response: 'str'
trustworthiness_score: 'float'
log: 'typing.Optional[object]'

class TLMScoreResponse

The result of scoring a response with TLM.

class TLMScoreResponse:
trustworthiness_score: 'float'
log: 'typing.Optional[object]'

class TLMConfig

Advanced configuration options for TLM.

class TLMConfig(BaseModel):
quality_preset: 'typing.Optional[typing.Literal['best', 'high', 'medium', 'low', 'base']]'
task: 'typing.Optional[str]'
options: 'typing.Optional[cleanlab_codex.types.tlm.TLMOptions]'

Args: