PromptTemplateColumnNames

Gain access to the Prompt Playground

Arize class to map up to 2 columns: prompt_template and prompt_template_version

class PromptTemplateColumnNames:
    template_column_name: Optional[str] = None
    template_version_column_name: Optional[str] = None
ParametersData TypeExpected Type in ColumnDescription

template_column_name

str

The contents of this column must be strings

Column name for the prompt template. The variables in the prompt template must be defined between double keys. Example:

My name is {{name}}.

template_version_column_name

str

The contents of this column must be convertible to string

Column name for the prompt template version

Code Example

from arize.utils.types import PromptTemplateColumnNames

# Declare prompt template columns
prompt_template = PromptTemplateColumnNames(
    template_column_name = "template", # column containing the prompt template
    template_version_column_name = "template_version", # column containing the version of the prompt template
)

Last updated

Copyright © 2023 Arize AI, Inc