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_collection/dataStores/$DATA_STOREID?update_mask=natural_language_query_understanding_config.mode” -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_collection/dataStores/$DATA_STORE_ID
{
“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!!

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.

1 Like

@marckevin @a_aleinikov are you still able to execute this command ? I am experiencing this issue. When I read REST Resource: projects.locations.collections.dataStores.servingConfigs I do not see anything about naturalLanguageQueryUnderstandingConfig and it does not appear in any of the fields shown in that documentation.

I can’t execute the PATCH command successfully either and receive an invalid JSON payload.

I know this worked previously, because when the understanding config was in preview I was able to enable it at the datastore level using the documentation. But now it feels like the API is broken for some reason.

It’s not possible to update it, I can see it listed as a field when I do a GET request on my datastore, but I can’t disable it or enable it on a new datastore.