Artificial Intelligence
Agentic AI
Document Intelligence
Snowflake

Building the Future of Document Intelligence on Snowflake Cortex Code

Written by :  
Andy Ehrlich, Sr. Engineer
March 12, 2026

Every organization is sitting on a goldmine of contracts (NDAs, service agreements, vendor contracts, employment letters) and most of them are locked inside PDFs, inaccessible to search, analysis, or automation. Legal and operations teams spend hours manually hunting for expiration dates, renewal terms, and notice periods. The process is slow, error-prone, and doesn't scale.

At OneSix, we saw Snowflake's newly released Cortex Code (aka CoCo) as an opportunity to solve this problem, fast. What followed was a proof of what's now possible when a next-generation AI coding agent meets a high-value enterprise use case.

Why This Problem Matters

The business cost of poor contract visibility is real: missed renewal windows, overlooked obligations, compliance gaps, and strained vendor relationships. For most organizations, the bottleneck isn't a lack of data; it's that the data is trapped in an unstructured format that traditional systems can't act on. This is precisely the kind of problem that Cortex Code was built to accelerate.

Why This Problem Matters

What We Built

OneSix developed a fully automated Contract Intelligence solution entirely within Snowflake's ecosystem — from PDF ingestion through AI-powered extraction, data transformation, and a polished interactive interface. The result: a system that turns a static PDF into structured, searchable, and shareable intelligence in minutes. Key capabilities include:

  • Automated contract intake: New PDFs are detected and processed automatically, no manual uploads or triggers required
  • AI-powered clause extraction: Critical terms like parties involved, effective and expiration dates, governing law, and renewal conditions are identified and structured
  • Interactive contract review: A Streamlit application lets users visually highlight extracted terms directly within the contract text, making AI outputs verifiable and transparent
  • Exportable reports: Teams can share highlighted contracts as PDFs for review, collaboration, and audit

All of this runs entirely within Snowflake's governed infrastructure, meaning sensitive legal data never leaves your controlled environment.

Cortex Code: A Force Multiplier for Development

What made this build remarkable wasn't just what we built — it was how fast we built it. Cortex Code acted as an intelligent development partner that understood our Snowflake environment, not just generic code patterns.

Context-aware from the start

Unlike a general-purpose AI, Cortex Code has native knowledge of your Snowflake environment — your schemas, roles, and data. When we kicked off the intake build, it proactively recommended a Role-Based Access Control framework, ensuring governance was baked in from day one rather than bolted on later.

Human-in-the-loop by design

Cortex Code doesn't act autonomously — it collaborates. Before executing any action, whether creating a table, changing a role, or running a query, it presents its plan for review and approval. This four-step loop of prompt, clarify, approve, and validate kept our team in full control while dramatically reducing the back-and-forth typically required during complex builds.

Snowflake sql execute

A problem-solver, not just a code generator

Throughout the build, Cortex Code diagnosed and resolved issues that would have cost a developer hours of debugging — from handling special characters breaking file ingestion, to refreshing stage metadata, to optimizing stored procedure logic. Each blocker became a brief conversation rather than a context switch into documentation.

The Architecture at a Glance

The solution is a multi-layered data pipeline, all orchestrated within Snowflake:

Automated Detection & Ingestion

Snowflake Stages serve as the PDF landing zone. Snowflake Streams monitor for new files and automatically trigger a Task to begin processing.

Automated Detection & Ingestion data flow

AI-Powered Extraction

Snowflake Cortex AI services handle OCR, layout detection, and legal clause identification, converting unstructured PDFs into machine-readable, structured data.

Transformation Layer

A dbt pipeline (authored by Cortex Code) stages, cleans, and transforms raw extraction output into analytics-ready data marts.

Transformation Layer

Interactive Visualization

A native Streamlit application provides contract browsing, clause highlighting, natural language queries, and PDF export, all within Snowflake.

Interactive Visualization
Interactive Visualization highlight

Documentation & Auditability

Cortex Code generated technical documentation throughout the build, exportable to Excel and Lucidchart-compatible formats for lineage tracking, compliance, and future maintenance.

Documentation & Auditability

What This Means for Your Business

The Contract Intelligence solution is one example of a broader shift in what's possible. Cortex Code lowers the barrier between a business problem and a production-ready data solution dramatically. Teams no longer need to choose between speed and quality, or between innovation and governance.

For organizations looking to unlock value from unstructured data, reduce manual legal review, or simply move faster on data initiatives, this is a signal worth paying attention to.