View source on Github
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
| Parameters | Data Type | Expected Type in Column | Description |
|---|---|---|---|
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
)