Snowflake Cortex Is Cool. I Built My Own in an Afternoon.

· Source: LLM on Medium · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Software Development & Engineering · Depth: Intermediate, short

Summary

An editorial analyst successfully replicated Snowflake Cortex's AI completion functionality using open-source tools and a local large language model, achieving a zero-cost alternative for personal projects. The author details setting up a PostgreSQL database on a mini PC and running Ollama on a separate tower, then creating a `plpython3u` function to call the local Ollama instance. This setup allowed for tasks like classifying financial Altman Z-Scores, mirroring the "farm out judgment calls" workflow used professionally for vendor data cleanup. The original Snowflake Cortex feature proved effective for processing 90,000 records of Concur transactions in 90 minutes, a task that would have taken an intern days.

Key takeaway

For AI Engineers or data professionals seeking to replicate cloud-based AI features like Snowflake Cortex for personal projects or cost-sensitive environments, consider building a local solution. You can achieve similar functionality by integrating Ollama with PostgreSQL via `plpython3u`, enabling custom AI inference without incurring cloud costs. This approach is particularly useful for tasks involving data classification or judgment calls where data privacy or budget constraints are critical.

Key insights

Replicate cloud AI functions locally using open-source tools for cost-effective, private data processing.

Principles

Method

Install Ollama, configure it to listen on a network port, then create a PostgreSQL `plpython3u` function to send prompts to the Ollama API and return responses.

In practice

Topics

Best for: AI Engineer, Machine Learning Engineer, Software Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by LLM on Medium.