classify_complexity()

Estimate the complexity of a task from its prompt text.

Usage

Source

classify_complexity(prompt)

Uses heuristics based on prompt length, vocabulary, and structural markers to classify the task into one of four complexity levels.

Parameters

prompt: str
The prompt text to classify.

Returns

TaskComplexity
The estimated complexity level.

Examples

import talk_box as tb

tb.classify_complexity("What is Python?")
# TaskComplexity.SIMPLE

tb.classify_complexity("Design a distributed caching system with consistency guarantees")
# TaskComplexity.EXPERT