Topic Relevance Decorator

class ibm_watsonx_gov.metrics.topic_relevance.topic_relevance_decorator.TopicRelevanceDecorator(api_client: APIClient = None, configuration: AgenticAIConfiguration = None, compute_real_time: bool = True, metric_results: list[AgentMetricResult] = [], execution_counts: dict[str, dict[str, int]] = {}, nodes_being_run: dict[str, Set[str]] = {}, lock: allocate_lock = None)

Bases: BaseMetricDecorator

evaluate_topic_relevance(func: Callable | None = None, *, configuration: AgenticAIConfiguration | None = None, metrics: list[GenAIMetric]) dict

An evaluation decorator for computing topic relevance metric on an agentic node.