This page describes how to find out whether various metrics for your media data meet their requirement thresholds.
About checking media data quality
Because recent user events are so important for media recommendations, you must regularly check the quality of your ingested data and user events. You can do this by reviewing the Optimization tab for your media recommendations app to determine what improvements you can make to your data in order to optimize for better quality recommendations.
If a metric's threshold isn't met, then the metric has a warning status. Then, you need to review the metric and its description to determine what action you should take to improve your media quality.
All models and objectives need to pass the General quality metric thresholds. Some model and objectives have additional App-specific quality metrics and thresholds. The general quality metrics are the same for all apps using the same data store, but app-specific quality metrics vary according to the app's model and objectives.
For information about the recommendation models and objectives, see About media app recommendations types.
Check data quality
Console
To check the quality of your media recommendations data, follow these steps:
In the Google Cloud console, go to the Agent Builder page.
Click the name of the media recommendations app that you want check data quality for.
In the navigation menu, click Data quality and click the Optimization tab. This page shows the status of various metrics for the data associated with your app.
Review the General quality and the App-specific quality statuses at the top of the page. The summary status at the top of the page shows as a warning if one or more metrics has exceeded its threshold.
The two metrics tables (General quality and the App-specific quality) list the individual metrics.
In the metrics tables, click View details for more information about any metrics in the warning state.
Optional: If you want to see the threshold for a compliant metric, click View Details. Thresholds for compliant metrics are not shown in the metrics table.
REST
Use the requirements:checkRequirement
method to check the
quality of your media recommendations data, as shown.
To check the quality from the command line, follow these steps:
Find your data store ID. If you already have your data store ID, skip to the next step.
In the Google Cloud console, go to the Agent Builder page and in the navigation menu, click Data Stores.
Click the name of your data store.
On the Data page for your data store, get the data store ID.
Run the following curl command to learn if your media recommendations meets the thresholds for the general metrics:
curl -X POST \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ -H "X-GFE-SSL: yes" \ -H "X-Goog-User-Project: PROJECT_ID" \ "https://discoveryengine.googleapis.com/v1alpha/projects/PROJECT_ID/locations/global/requirements:checkRequirement" \ -d '{ "location": "projects/PROJECT_ID/locations/global", "requirementType": "discoveryengine.googleapis.com/media_recs/general/all/warning", "resources": [ { "labels": { "branch_id": "0", "collection_id": "default_collection", "datastore_id": "DATA_STORE_ID", "location_id": "global", "project_number": "PROJECT_ID" }, "type": "discoveryengine.googleapis.com/Branch" }, { "labels": { "collection_id": "default_collection", "datastore_id": "DATA_STORE_ID", "location_id": "global", "project_number": "PROJECT_ID" }, "type": "discoveryengine.googleapis.com/DataStore" } ] }'
- PROJECT_ID: the ID of your Google Cloud project.
- DATA_STORE_ID: the ID of the Vertex AI Search data store.
Review the output:
Look for the value of
result
:If the value is
SUCCESS
, then your data passes the general requirements; continue to step 4.If the value is
WARNING
, continue to step b.If you don't see
result
in the output, there are a couple possible reasons:The
PROJECT_ID
orDATA_STORE_ID
in the request is incorrect.Some metric values are unavailable. Try again in 6 hours or reach out to a customer engineer for help.
Look for the expression (
requirement.Condition.Expression
): If this expression evaluates to false, then there is a problem with your data.The value of the metrics are in the
requirementCondition.metricResults.value
field. The warning threshold values are in thethresholdBindings.thresholdValues
fields. Thedescription
fields can help you understand the purpose of the metric.For example, the value of
doc_with_same_title_percentage
is30.47
and the warning threshold fordoc_with_same_title_percentage_threshold
is1
. There is a data problem that so many of the titles in the data store are the same, and this needs to be investigated.
If the model and objective combination used for your recommendations app appears in this table, then you also need to call the check requirement method, updated with the values for your model and objective:
Model Objective MODEL_OBJ
Others You May Like Conversion rate oyml/cvr
Recommended for You Conversion rate rfy/cvr
More Like This Conversion rate mlt/cvr
Most Popular Conversion rate mp/cvr
Others You May Like Watch duration per session oyml/wdps
Recommended for You Watch duration per session rfy/wdps
More Like This Watch duration per session mlt/wdps
curl -X POST \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ -H "X-GFE-SSL: yes" \ -H "X-Goog-User-Project: PROJECT_ID" \ "https://discoveryengine.googleapis.com/v1alpha/projects/PROJECT_ID/locations/global/requirements:checkRequirement" \ -d '{ "location": "projects/PROJECT_ID/locations/global", "requirementType": "discoveryengine.googleapis.com/media_recs/MODEL_OBJ/warning", "resources": [ { "labels": { "branch_id": "0", "collection_id": "default_collection", "datastore_id": "DATA_STORE_ID", "location_id": "global", "project_number": "PROJECT_ID" }, "type": "discoveryengine.googleapis.com/Branch" }, { "labels": { "collection_id": "default_collection", "datastore_id": "DATA_STORE_ID", "location_id": "global", "project_number": "PROJECT_ID" }, "type": "discoveryengine.googleapis.com/DataStore" } ] }'
- PROJECT_ID: the ID of your Google Cloud project.
- DATA_STORE_ID: the ID of the Vertex AI Search data store.
- MODEL_OBJ: See the preceding table to choose the correct value for your recommendations app.
Review the output:
Look for the value of
result
:If the value is
SUCCESS
, then your data is good enough.If the value is
WARNING
, continue to step b.If you don't see
result
in the output, there are a couple possible reasons:The
PROJECT_ID
orDATA_STORE_ID
in the request is incorrect.Some metric values are unavailable. Try again in 6 hours or reach out to a customer engineer for help.
Look the expression (
requirement.Condition.Expression
). If this expression evaluates to false, then there is a problem with your data.The value of the metrics can be found in the
requirementCondition.metricResults.value
field, and the warning threshold values, in thethresholdBindings.thresholdValues
fields. Thedescription
fields can help you understand the purpose of the metric.