舉例來說,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-07-24 (世界標準時間)。"],[[["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."]]],[]]