I Built a Snowflake RAG Assistant That Actually Works in Production A developer built a production RAG help assistant on Snowflake infrastructure to reduce user support tickets for a complex B2B SaaS product. The system combines a Snowflake Agent as controller, Cortex Search for embeddings retrieval, agent tools, Snowflake tables for normalized product knowledge, stages for raw documents, and Snowflake Openflow to sync documents from Microsoft SharePoint. The developer emphasized clear instructions, budget limits, fallback behavior, and minimizing non-deterministic failure points to move from PoC to production in weeks. I was given a task to build a help assistant that could reduce the number of support tickets raised by our users. We have a complex B2B SaaS product with many features, company specific rules and business processes. It should understand the user question and find the most relevant information from our internal docs. Sounds like a trivial RAG, right? So I decided to use an existing Snowflake infrastructure to bring this into the life. Today, it is common to hear that agents should be replaced with deterministic workflows, pipelines, or APIs because agents are non-deterministic and can waste tokens or make the wrong decision. I think the more practical view is that the result depends heavily on how you use the technology and what practicies are you applying. In my case, I needed to move from PoC to production fast weeks, not months , so using a Snowflake Agent was a pragmatic choice. I focused on keeping the instructions clear, limiting the budget, defining fallback behavior, and reducing the places where non-deterministic behavior could become a real problem. Another benefit was staying inside Snowflake’s existing agentic ecosystem. It makes it easier to integrate with other Snowflake-based products and services later, reuse the same security and data environment, and avoid building separate infrastructure for the new AI capability. Let's start from the most important and exciting part - architecting. The main building blocks for our agent are: Snowflake Agent - the controller that decides how to answer and what tool to use, with the instructions, format rules and auto orchestration, Cortex Search — to store and retrieve embeddings of our product knowledge, Agent tools - so agent can access and use Cortex Search to retrieve required context, Snowflake tables — to store product knowledge in a normalized, structured form. Selected columns, such as content, are then used as the SEARCH TEXT source for Cortex Search, Stages - to store raw documents, Snowflake Openflow - to sync documents from Microsoft SharePoint into Snowflake Stages. Let’s visualize the overall flow first, and then I’ll go through each part in more detail. Question/Answer flow Injection of Product knowledge flow Now that the architecture is clear, let’s move to the implementation. I’ll start with the Snowflake side, beginning with access control, because the agent, Cortex Search, and API integration all depend on the right permissions being in place. First, make sure your current role has permissions to create new objects like DATABASES, SCHEMAS and Cortex Search Service ask someone with ACCOUNTADMIN access to grant you required roles. Also, it would be much cleaner to create a new set of roles for managing our objects. Snowflake has an article about about access control https://docs.snowflake.com/en/user-guide/security-access-control-overview Let's create a table to store our product knowledge: CREATE TABLE IF NOT EXISTS