Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

RE: Enabling NLP Understanding Config on Data Store

Hi Community,

Currently, I have created a datastore which is synced with logs stored in bigquery. I am trying to enable naturalLanguageQueryUnderstandingConfig on it and getting below error

 curl -X PATCH -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json" -H "X-Goog-User-Project: $PROJECT_ID" "https://us-discoveryengine.googleapis.com/v1/projects/$PROJECT_ID/locations/us/collections/default_c..." -d '{"naturalLanguageQueryUnderstandingConfig": {"mode": "ENABLED"}}'
{
"error": {
"code": 400,
"message": "Invalid JSON payload received. Unknown name \"naturalLanguageQueryUnderstandingConfig\" at 'data_store': Cannot find field.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"field": "data_store",
"description": "Invalid JSON payload received. Unknown name \"naturalLanguageQueryUnderstandingConfig\" at 'data_store': Cannot find field."
}
]
}
]
}
}

Here is the datastore config

curl -X GET -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json" -H "X-Goog-User-Project: $PROJECT_ID" "https://us-discoveryengine.googleapis.com/v1/projects/$PROJECT_ID/locations/us/collections/default_c..."
{
"name": "projects/$PROJECT_ID/locations/us/collections/default_collection/dataStores/$DATA_STORE_ID",
"displayName": "$DISPLAY_NAME",
"industryVertical": "GENERIC",
"createTime": "2025-04-25T01:50:19.254667Z",
"solutionTypes": [
"SOLUTION_TYPE_SEARCH"
],
"defaultSchemaId": "default_schema",
"billingEstimation": {
"structuredDataSize": "12226443350",
"structuredDataUpdateTime": "2025-04-30T15:01:01.367793765Z"
},
"servingConfigDataStore": {}
}

Am i missing anything? Any help will be appreciated!!

0 2 199
2 REPLIES 2

Hi @priyance ,
The error happens because naturalLanguageQueryUnderstandingConfig isn’t a valid field in the dataStore PATCH API — that’s why it says “Unknown name”.

To enable NLP features, you usually need to set them in the serving config, not directly on the datastore.
Check the ServingConfig resource and apply the update there.

Hi @priyance,

Welcome to Google Cloud Community!

In addition to @a_aleinikov's insight, you can also refer to this documentation to enable natural-language query understanding, which includes sample commands and responses. When you run the curl command, instead of using https://discoveryengine.googleapis.com/v1, try using https://discoveryengine.googleapis.com/v1beta, as documented. Also, please note the limitations that apply to natural-language query understanding, which you can find in this documentation.

Just to add, filtering with natural-language understanding is currently in Preview, which means it is still under development, and may not yet offer the expected quality, and might have limited support. Preview features often come with certain limitations and might not provide the full range of quality or functionality available in the final product. It may have bugs or unexpected behaviors. However, you can expect the quality to improve as the feature matures.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.