Skip to main content

PromptSnowflakeCortex

Description

Sends a prompt to Snowflake Cortex, writing the response either as a FlowFile attribute or to the contents of the incoming FlowFile. The prompt may consist of pure text interaction only.

Tags

ai, chat, cortex, prompt, snowflake, text

Properties

In the list below required Properties are shown with an asterisk (*). Other properties are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
Snowflake Connection Service *Snowflake Connection ServiceController Service:
DBCPService

Implementations:
DBCPConnectionPoolLookup
DBCPConnectionPool
HikariCPConnectionPool
SnowflakeConnectionService
Database Connection Service for accessing Snowflake
Text Model Name *Text Model Namesnowflake-arcticThe name of the Snowflake Cortex model

Supports Expression Language, using FlowFile attributes and Environment variables.
System MessageSystem MessageThe system message to send to Snowflake Cortex. FlowFile attributes may be referenced via Expression Language, and the contents of the FlowFile may be referenced via the
flowfile_content variable. E.g., ${flowfile_content}

Supports Expression Language, using FlowFile attributes and Environment variables.
User Message *User MessageThe user message to send to Snowflake Cortex. FlowFile attributes may be referenced via Expression Language, and the contents of the FlowFile may be referenced via the
flowfile_content variable. E.g., ${flowfile_content}

Supports Expression Language, using FlowFile attributes and Environment variables.
Response Format *Response FormatPlain Text
  • JSON
  • Plain Text
The format of the response from Snowflake Cortex
Output Strategy *Output StrategyFlowFile
  • FlowFile
  • Attribute
Determines response output destination
Results AttributeResults AttributeThe name of the attribute to write the response to.

This property is only considered if:
  • the property Output Strategy has a value of Attribute
TemperatureTemperatureThe temperature to use for generating the response.

Supports Expression Language, using FlowFile attributes and Environment variables.
Top PTop PThe top P value to use for generating the response

Supports Expression Language, using FlowFile attributes and Environment variables.
Max TokensMax TokensThe maximum number of tokens to generate

Supports Expression Language, using FlowFile attributes and Environment variables.
Enable Cortex GuardrailsEnable Cortex Guardrailsfalse
  • false
  • true
Filters potentially unsafe and harmful responses from a language model. Either true or false.

Supports Expression Language, using FlowFile attributes and Environment variables.

Dynamic Properties

This component does not support dynamic properties.

Relationships

NameDescription
failureIf unable to obtain a valid response from Snowflake Cortex, the original FlowFile will be routed to this relationship
successThe response from Snowflake Cortex is routed to this relationship

Reads Attributes

This processor does not read attributes.

Writes Attributes

This processor does not write attributes.

State Management

This component does not store state.

Restricted

This component is not restricted.

Input Requirement

This component requires an incoming relationship.

System Resource Considerations

This component does not specify system resource considerations.

See Also