We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
reference_topics
TopicAdherenceScore
1 parent 0f412de commit 400f243Copy full SHA for 400f243
src/ragas/metrics/_topic_adherence.py
@@ -135,7 +135,12 @@ class TopicExtractionPrompt(
135
class TopicAdherenceScore(MetricWithLLM, MultiTurnMetric):
136
name: str = "topic_adherence" # type: ignore
137
_required_columns: t.Dict[MetricType, t.Set[str]] = field(
138
- default_factory=lambda: {MetricType.MULTI_TURN: {"user_input"}}
+ default_factory=lambda: {
139
+ MetricType.MULTI_TURN: {
140
+ "user_input",
141
+ "reference_topics",
142
+ }
143
144
)
145
mode: t.Literal["precision", "recall", "f1"] = "f1"
146
topic_extraction_prompt: PydanticPrompt = TopicExtractionPrompt()
0 commit comments