system_prompt

system_prompt(
    data_source,
    *,
    data_description=None,
    extra_instructions=None,
    categorical_threshold=10,
    prompt_template=None,
)

Create a system prompt for the chat model based on a data source’s schema and optional additional context and instructions.

Parameters

Name Type Description Default
data_source DataSource A data source to generate schema information from required
data_description str Optional description of the data, in plain text or Markdown format None
extra_instructions str Optional additional instructions for the chat model, in plain text or Markdown format None
categorical_threshold int Threshold for determining if a column is categorical based on number of unique values 10
prompt_template Optional[str | Path] Optional Path to or string of a custom prompt template. If not provided, the default querychat template will be used. None

Returns

Name Type Description
str The system prompt for the chat model.