Skip to main content
Factual accuracy score measures the degree to which a claim made in the response is true according to the context provided. This check is important since unvalidated facts can reduce the credibility of the generated response. It is crucial in fields like Healthcare, Finance, and Law, where decisions are made based on the accuracy of the information provided. Columns required:
  • question: The question asked by the user
  • context: Information retrieved to answer the question
  • response: The response given by the model

How to use it?

By default, we are using GPT 3.5 Turbo for evaluations. If you want to use a different model, check out this tutorial.
Sample Response:
A higher factual accuracy score reflects that the generated response is factually correct.
The response provided states the following symptoms of a heart attack: sharp, shooting pain in the arm, indigestion or heartburn, general fatigue and headache. Most of these claims can not be validated by the context document. Ultimately, resulting in a low factual accuracy score.

How it works?

We evaluate factual accuracy along the following steps:
1

Split Response to Individual Facts

Responses are generally not very straightforward and mostly they are a combination of different arguments.To say that a response is factually correct or not, we first divide the response into various arguments each claiming a fact.
2

Rate Individual Facts

We then evaluate whether these individual facts are correct (on basis of supporting context) and divide them in following categories:
  • Completely Right (Score 1)
  • Completely Wrong (Score 0)
  • Ambiguous (Score 0.5)
3

Generating Final Score

We consider a mean of the scores of these individual facts to rate whether the response is factually correct or not.

Tutorial

Open this tutorial in GitHub

Have Questions?

Join our community for any questions or requests