たとえば、SELECT * FROM item WHERE complaints LIKE
"%wrong color%" などの基本的な SQL クエリでは、complaints フィールドに The picture shows a blue one, but the one I received was red のみが含まれる行は返されません。
LLM ベースのエンベディングを使用する SQL クエリは、このようなクエリに対して意味的に類似したレスポンスを返すのに役立ちます。エンベディングを適用すると、この例のテーブルで、苦情が特定のテキスト プロンプト(It was the
wrong color など)と意味的に類似している項目をクエリできます。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-08-13 UTC。"],[[["AlloyDB can be used as a large language model (LLM) tool to generate vector embeddings of text using a Vertex AI-hosted LLM."],["To use this functionality, the `google_ml_integration` extension (version 1.2 or later) must be installed on the AlloyDB database, and you need to integrate with Vertex AI to access the `text-embedding-005` model."],["Database users need specific permissions granted to execute the `embedding` function, which is used to translate text into a vector embedding."],["The generated embeddings, which are arrays of `real` values, can be stored in a database table column of type `real[]` and can be used with `pgvector` functions for similarity searches."],["Always specify a stable embeddings model, including a version tag, when using the `embedding()` function to avoid inconsistent results due to potential model version updates."]]],[]]