This stateless API provides automatic suggestions for natural
language queries for the data sources in the provided project and
location.
The service provides a resourceless operation suggestQueries
that can be called to get a list of suggestions for a given
incomplete query and scope (or list of scopes) under which the query
is to be interpreted.
There are two types of suggestions, ENTITY for single entity
suggestions and TEMPLATE for full sentences. By default, both types
are returned.
The service will retrieve information based on the given scope(s)
and give suggestions based on that (e.g. "top item" for "top it" if
"item" is a known dimension for the provided scope).
This stateless API provides automatic suggestions for natural
language queries for the data sources in the provided project and
location.
The service provides a resourceless operation suggestQueries
that can be called to get a list of suggestions for a given
incomplete query and scope (or list of scopes) under which the query
is to be interpreted.
There are two types of suggestions, ENTITY for single entity
suggestions and TEMPLATE for full sentences. By default, both types
are returned.
The service will retrieve information based on the given scope(s)
and give suggestions based on that (e.g. "top item" for "top it" if
"item" is a known dimension for the provided scope).
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[],null,["# Package auto_suggestion_service (0.10.17)\n\nVersion latestkeyboard_arrow_down\n\n- [0.10.17 (latest)](/python/docs/reference/dataqna/latest/google.cloud.dataqna_v1alpha.services.auto_suggestion_service)\n- [0.10.16](/python/docs/reference/dataqna/0.10.16/google.cloud.dataqna_v1alpha.services.auto_suggestion_service)\n- [0.9.0](/python/docs/reference/dataqna/0.9.0/google.cloud.dataqna_v1alpha.services.auto_suggestion_service)\n- [0.8.2](/python/docs/reference/dataqna/0.8.2/google.cloud.dataqna_v1alpha.services.auto_suggestion_service)\n- [0.7.1](/python/docs/reference/dataqna/0.7.1/google.cloud.dataqna_v1alpha.services.auto_suggestion_service)\n- [0.6.3](/python/docs/reference/dataqna/0.6.3/google.cloud.dataqna_v1alpha.services.auto_suggestion_service)\n- [0.5.1](/python/docs/reference/dataqna/0.5.1/google.cloud.dataqna_v1alpha.services.auto_suggestion_service)\n- [0.4.0](/python/docs/reference/dataqna/0.4.0/google.cloud.dataqna_v1alpha.services.auto_suggestion_service)\n- [0.3.3](/python/docs/reference/dataqna/0.3.3/google.cloud.dataqna_v1alpha.services.auto_suggestion_service)\n- [0.2.1](/python/docs/reference/dataqna/0.2.1/google.cloud.dataqna_v1alpha.services.auto_suggestion_service)\n- [0.1.1](/python/docs/reference/dataqna/0.1.1/google.cloud.dataqna_v1alpha.services.auto_suggestion_service) \nAPI documentation for `dataqna_v1alpha.services.auto_suggestion_service` package. \n\nClasses\n-------\n\n### [AutoSuggestionServiceAsyncClient](/python/docs/reference/dataqna/latest/google.cloud.dataqna_v1alpha.services.auto_suggestion_service.AutoSuggestionServiceAsyncClient)\n\nThis stateless API provides automatic suggestions for natural\nlanguage queries for the data sources in the provided project and\nlocation.\n\nThe service provides a resourceless operation `suggestQueries`\nthat can be called to get a list of suggestions for a given\nincomplete query and scope (or list of scopes) under which the query\nis to be interpreted.\n\nThere are two types of suggestions, ENTITY for single entity\nsuggestions and TEMPLATE for full sentences. By default, both types\nare returned.\n\nExample Request:\n\n::\n\nGetSuggestions({\nparent: \"locations/us/projects/my-project\"\nscopes:\n\"//bigquery.googleapis.com/projects/my-project/datasets/my-dataset/tables/my-table\"\nquery: \"top it\"\n})\n\nThe service will retrieve information based on the given scope(s)\nand give suggestions based on that (e.g. \"top item\" for \"top it\" if\n\"item\" is a known dimension for the provided scope).\n\n::\n\nsuggestions {\nsuggestion_info {\nannotated_suggestion {\ntext_formatted: \"top item by sum of usd_revenue_net\"\nmarkups {\ntype: DIMENSION\nstart_char_index: 4\nlength: 4\n}\nmarkups {\ntype: METRIC\nstart_char_index: 19\nlength: 15\n}\n}\nquery_matches {\nstart_char_index: 0\nlength: 6\n}\n}\nsuggestion_type: TEMPLATE\nranking_score: 0.9\n}\nsuggestions {\nsuggestion_info {\nannotated_suggestion {\ntext_formatted: \"item\"\nmarkups {\ntype: DIMENSION\nstart_char_index: 4\nlength: 2\n}\n}\nquery_matches {\nstart_char_index: 0\nlength: 6\n}\n}\nsuggestion_type: ENTITY\nranking_score: 0.8\n}\n\n### [AutoSuggestionServiceClient](/python/docs/reference/dataqna/latest/google.cloud.dataqna_v1alpha.services.auto_suggestion_service.AutoSuggestionServiceClient)\n\nThis stateless API provides automatic suggestions for natural\nlanguage queries for the data sources in the provided project and\nlocation.\n\nThe service provides a resourceless operation `suggestQueries`\nthat can be called to get a list of suggestions for a given\nincomplete query and scope (or list of scopes) under which the query\nis to be interpreted.\n\nThere are two types of suggestions, ENTITY for single entity\nsuggestions and TEMPLATE for full sentences. By default, both types\nare returned.\n\nExample Request:\n\n::\n\nGetSuggestions({\nparent: \"locations/us/projects/my-project\"\nscopes:\n\"//bigquery.googleapis.com/projects/my-project/datasets/my-dataset/tables/my-table\"\nquery: \"top it\"\n})\n\nThe service will retrieve information based on the given scope(s)\nand give suggestions based on that (e.g. \"top item\" for \"top it\" if\n\"item\" is a known dimension for the provided scope).\n\n::\n\nsuggestions {\nsuggestion_info {\nannotated_suggestion {\ntext_formatted: \"top item by sum of usd_revenue_net\"\nmarkups {\ntype: DIMENSION\nstart_char_index: 4\nlength: 4\n}\nmarkups {\ntype: METRIC\nstart_char_index: 19\nlength: 15\n}\n}\nquery_matches {\nstart_char_index: 0\nlength: 6\n}\n}\nsuggestion_type: TEMPLATE\nranking_score: 0.9\n}\nsuggestions {\nsuggestion_info {\nannotated_suggestion {\ntext_formatted: \"item\"\nmarkups {\ntype: DIMENSION\nstart_char_index: 4\nlength: 2\n}\n}\nquery_matches {\nstart_char_index: 0\nlength: 6\n}\n}\nsuggestion_type: ENTITY\nranking_score: 0.8\n}"]]