故障排除

This page provides information about common issues that you may run into when working with Snowflake Intelligence, as well as solutions for those issues. It also provides information about best practices for optimizing the performance of your agents and how to get additional support.

常见问题和解决方案

Inconsistent responses

回答不一致最常见的原因是提示词缺乏针对性。要为回答指定特定样式或格式,请在提示词中明确指定。

虽然 LLMs 本质上存在一些差异,在更改代理配置后也可能会出现不一致的答案。要解决此问题,请检查代理配置、语义视图配置、聊天历史记录或模型选择的最新更改。

如果您使用的是语义模型,则应转换为语义视图。语义视图允许在创建过程中进行验证,以帮助避免使用语义模型时不太明显的不一致。

Streaming response issues

如果您在一台机器上看到流式传输响应,但在另一台机器上看不到,则可能是由于您的组织 IT 配置(例如网络 DPI、扫描工具、端点安全软件或浏览器扩展)导致的。请与您的内部 IT 人员合作解决这些问题。

Error 370001

This error indicates that Snowflake Intelligence generated an unsafe SQL command. Snowflake Intelligence does not execute these commands and instead returns this error.

Execution_environment not populated for analyst tool

This occurs when the tool is configured to run SQL queries against the user’s default warehouse and the user does not have a warehouse set. To resolve this, either set a default warehouse for the user or configure the tool to execute against a specific custom warehouse. For more information about default warehouses, see Warehouse usage in sessions.

“Table / search service / stage does not exist” errors

If you encounter table / search service / stage does not exist errors, there might be privilege issues. Verify that the following privileges are set correctly:

  • 对于每个语义模型:

    • 用户的默认角色会获授语义模型暂存区或视图以及表的数据库和架构的 USAGE。
    • 如果使用语义模型,用户的默认角色会获授存储语义模型文件的暂存区的 READ。
    • 如果使用语义视图,则用户的默认角色会获授语义视图的 REFERENCES。
    • 用户的默认角色会获授在语义模型或视图中定义的每个表的 SELECT。
  • 对于每项 Cortex Search Service:

    • 用户的默认角色会获授 Cortex Search Service 的数据库和架构的 USAGE。
    • 用户会获授 Cortex Search Service 的 USAGE。
Context and memory limits

Cortex Agent 使用有限的上下文窗口,因此很长的对话将丢失更早的上下文。对于持续的上下文,请使用代理配置中的自定义指令。

性能优化

Response time issues

Response latency can vary because Snowflake Intelligence performs a complicated series of reasoning, retrieval, and analysis tasks using LLMs and queries. Performance can be affected by the load on your Snowflake warehouse and by the LLM services themselves. Requests often take longer than a minute to complete. For better performance, ensure Cross-region inference is enabled, use the “auto” model in your Model selection, and consider adding additional Verified Queries. For more information about verified queries, see Cortex Analyst Verified Query Repository.

Timeout issues

First, check the Snowflake Status page (https://status.snowflake.com/) for any reported incidents. Your requests might also timeout if Snowflake Intelligence is running in a cloud region with limited GPU compute resources. We recommend enabling Cross-region inference to avoid limitations within a single region.

Parallel requests

You can request that the agent runs tool calls, such as Cortex Analyst and Cortex Search, in parallel. Add the following to the Agent orchestration instructions Configure and interact with Agents:

OVERALL: parallelize as many tool calls as possible for latency purposes.

For information about orchestration instructions, see Specify orchestration.

Model selection

When creating an agent, you can directly specify the model that the agent should use. You can’t directly specify the model for the Cortex Search or Cortex Analyst tools. Instead, you can use role-based access control (RBAC) to limit which models these tools can use. For more information, see Role-based access control (RBAC).

Multiple calls to the same tool

当生成的查询较大时,它们有时会触发大小限制,从而导致重试。Cortex Analyst 对查询的令牌生成数限制为 2048 个,这可能会触发大小限制。许多自定义代理响应指令也可能触发大小限制。

Warehouse size

Snowflake Intelligence 制定了一系列基于 LLM 的决策,根据需要创建最佳应答并调用工具。您不能通过更大的仓库分配来影响这些决策的性能。

但是,当将 Cortex Analyst 工具作为 Snowflake Intelligence 请求的一部分运行时,该请求将转换为使用仓库运行的 SQL 查询。如果您的仓库太小或过载,则会对性能产生负面影响。

Improve orchestration instructions and tool descriptions

要解决工具和编排方面的问题,请向 LLM 提供提示,其中包含对问题及期望结果的说明,以及现有的描述或说明。LLM 有助于自动创建新提示词。

Use verified queries

为确保常见或复杂查询的结果可预测,可以将经过验证的查询添加到语义视图中。这可确保代理为这些请求使用优化且可预测的查询路径。

Identify latency bottlenecks

To diagnose slow agent responses, you can use the agent monitoring tab in Snowsight to identify latency bottlenecks. These traces show the logical path the agent took and how long each step lasted. For more information about agent monitoring, see Monitor Cortex Agent requests.

获得支持

To get support for Snowflake Intelligence, you can use the Support page in Snowsight. You can also access the Snowflake Forums (https://snowflake.discourse.group/c/ai-agents-snowflake-intelligence/103) for more help.