Add API endpoint to export accuracy metrics from user feedback + created_at timestamp #803
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
User feedback collected at runtime can be utilized for two use case:
a) fine-tuning models on this custom training data (see https://haystack.deepset.ai/docs/latest/domain_adaptationmd)
b) evaluating models in production (i.e. creating accuracy metrics from the user feedback)
This PR implements basic functionality for b) by adding a new API endpoint
/eval-doc-qa-feedback
. When calling this endpoint we calculate simple accuracy metrics for answer and document results based on the given user feedback. Optionally, you can also supply filters to narrow down the labels that shall be used:Example Request:
Example Response:
Breaking change:
The labels have now a field called
created_at
that includes an automatic timestamp.Before:
SQLDocumentStore
andFAISSDocumentStore
all objects had a field / columncreated
ElasticsearchDocumentStore
labels did not have a fieldcreated
After:
SQLDocumentStore
,FAISSDocumentStore
andElasticsearchDocumentStore
all have a fieldcreated_at