跳转至

Text to embeddings(文本转嵌入向量(Text to embeddings))

Supported in: Batch

Converts text into embeddings.

Expression categories: String

Declared arguments

  • Model: The embedding model to use for the conversion.
    Model
  • Text column: Column containing text to convert to embeddings using the given model.
    Expression\
  • optional Output mode: Choose to output as a simple output or output with errors.
    Enum\

Output type: Embedded vector

Examples

Example 1: Base case

Description: Example embeddings for the word 'palantir'.

Argument values:

  • Model:
    ada002Embedding(

    )
  • Text column: text
  • Output mode: null
text Output
palantir [ -0.019182289, -0.02127992, 0.009529043, -0.008066221, -0.0014429842, 0.019154688, -0.023556953, -0...

Example 2: Base case

Description: Example embeddings for the word 'palantir' with a non ADA model.

Argument values:

  • Model:
    instructorLargeEmbedding(

    )
  • Text column: text
  • Output mode: null
text Output
palantir [ -0.019182289, -0.02127992, 0.009529043, -0.008066221, -0.0014429842, 0.019154688, -0.023556953, -0...

Example 3: Null case

Description: Null input should have a null output.

Argument values:

  • Model:
    ada002Embedding(

    )
  • Text column: text
  • Output mode: null
text Output
null null

Example 4: Edge case

Description: Empty input string should have a null output.

Argument values:

  • Model:
    ada002Embedding(

    )
  • Text column: text
  • Output mode: null
text Output
empty string null

Example 5: Edge case

Description: Input string surpassing OpenAI Ada's token limit should have a null output.

Argument values:

  • Model:
    ada002Embedding(

    )
  • Text column: text
  • Output mode: null
text Output
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a ... null

Example 6: Edge case

Description: Input string surpassing OpenAI Ada's token limit should have a null output.

Argument values:

  • Model:
    instructorLargeEmbedding(

    )
  • Text column: text
  • Output mode: SIMPLE
text Output
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a ... {
error: Context limit exceeded.,
ok: null,
}


中文翻译


文本转嵌入向量(Text to embeddings)

支持模式:批处理(Batch)

将文本转换为嵌入向量(embeddings)。

表达式类别: 字符串(String)

声明的参数

  • 模型(Model): 用于转换的嵌入模型。
    Model
  • 文本列(Text column): 包含待转换文本的列,将使用指定模型转换为嵌入向量。
    Expression\
  • 可选 输出模式(Output mode): 选择输出为简单输出或带错误信息的输出。
    Enum\

输出类型: Embedded vector

示例

示例1:基础情况

描述: 单词"palantir"的嵌入向量示例。

参数值:

  • 模型:
    ada002Embedding(

    )
  • 文本列: text
  • 输出模式: null
text 输出
palantir [ -0.019182289, -0.02127992, 0.009529043, -0.008066221, -0.0014429842, 0.019154688, -0.023556953, -0...

示例2:基础情况

描述: 使用非ADA模型时单词"palantir"的嵌入向量示例。

参数值:

  • 模型:
    instructorLargeEmbedding(

    )
  • 文本列: text
  • 输出模式: null
text 输出
palantir [ -0.019182289, -0.02127992, 0.009529043, -0.008066221, -0.0014429842, 0.019154688, -0.023556953, -0...

示例3:空值情况

描述: 空输入应返回空输出。

参数值:

  • 模型:
    ada002Embedding(

    )
  • 文本列: text
  • 输出模式: null
text 输出
null null

示例4:边界情况

描述: 空字符串输入应返回空输出。

参数值:

  • 模型:
    ada002Embedding(

    )
  • 文本列: text
  • 输出模式: null
text 输出
空字符串 null

示例5:边界情况

描述: 超过OpenAI Ada令牌限制的输入字符串应返回空输出。

参数值:

  • 模型:
    ada002Embedding(

    )
  • 文本列: text
  • 输出模式: null
text 输出
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a ... null

示例6:边界情况

描述: 超过OpenAI Ada令牌限制的输入字符串应返回空输出。

参数值:

  • 模型:
    instructorLargeEmbedding(

    )
  • 文本列: text
  • 输出模式: SIMPLE
text 输出
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a ... {
error: 上下文长度超出限制。,
ok: null,
}