- Categories:
Table functions (Cortex Agents)
GET_AI_OBSERVABILITY_LOGS (SNOWFLAKE.LOCAL)¶
Retrieve log data for a Cortex Agent observability event, such as a warning or failure.
Call this function to retrieve information about what events occurred during a Cortex Agent evaluation run. For more information, see Cortex Agent evaluations.
- See also:
GET_AI_RECORD_TRACE (SNOWFLAKE.LOCAL) , GET_AI_EVALUATION_DATA (SNOWFLAKE.LOCAL) , EXECUTE_AI_EVALUATION
Syntax¶
Arguments¶
databaseName of the database containing the agent.
schemaName of the schema containing the agent.
agent_nameName of the agent to retrieve a record for.
agent_typeThe type of agent to retrieve evaluation data for. Use the string constant
CORTEX AGENT. This value is case-insensitive.
Returns¶
For details on the information contained in AI Observability events, see Observability data.
Access control requirements¶
A role used to execute this operation must have the following privileges at a minimum:
Privilege |
Object |
Notes |
|---|---|---|
CORTEX_USER |
Database role |
|
USAGE |
Cortex Agent |
|
MONITOR |
Cortex Agent |
Operating on an object in a schema requires at least one privilege on the parent database and at least one privilege on the parent schema.
For instructions on creating a custom role with a specified set of privileges, see Creating custom roles.
For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.
For the full access control permissions required by Cortex Agent evaluations, see Cortex Agent evaluations – Access control requirements.
Examples¶
The following example checks for errors and warnings for a run called run-1, where the agent is named evaluated_agent stored on the schema eval_db.eval_schema: