Skip to content

Update metrics to take answer model as argument#749

Merged
davidgisbey merged 1 commit into
mainfrom
update-metrics-to-take-answer-model
Jan 6, 2026
Merged

Update metrics to take answer model as argument#749
davidgisbey merged 1 commit into
mainfrom
update-metrics-to-take-answer-model

Conversation

@davidgisbey
Copy link
Copy Markdown
Contributor

@davidgisbey davidgisbey commented Jan 6, 2026

Description

When I added the EvaluateAnswerFromQuestionMessage class, I made a faulty assumption that the metric inputs would always be a question and answer message.

However, the remaining two metrics take an answer message and used sources. This commit updates the AnswerRelevancy and Coherence metrics to take the answer model as an argument. The class then decides what it wants to do with it, allowing us more flexibility.

I've updated the EvaluateAnswerFromQuestionMessage class to reflect this change by calling the evaluation class with the answer.

Trello card

https://trello.com/c/cUIagBUx/2996-ruby-auto-eval-for-coherence-metric

When I added the EvaluateAnswerFromQuestionMessage class, I made a faulty
assumption that the metric inputs would be a question and answer message.

However, the remaining two metrics take an answer message and used sources.
This commit updates the AnswerRelevancy and Coherence metrics to take the
answer model as an argument. The class then decides what it wants to
do with it, allowing us more flexibility.

I've updated the EvaluateAnswerFromQuestionMessage class to reflect this
change by calling the evaluation class with the answer.
@davidgisbey davidgisbey force-pushed the update-metrics-to-take-answer-model branch from c619449 to 1d1f131 Compare January 6, 2026 13:21
@govuk-ci govuk-ci temporarily deployed to govuk-chat-update-metri-gbfkjo January 6, 2026 13:22 Inactive
@davidgisbey davidgisbey merged commit 1434d83 into main Jan 6, 2026
12 checks passed
@davidgisbey davidgisbey deleted the update-metrics-to-take-answer-model branch January 6, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants