Рет қаралды 307
Large Language Models in Snowflake Cortex are hosted and fully managed by Snowflake and you don’t have to do any prior setup. Now you have model hosted nearer to where your data resides, it gives you the performance, scalability, and governance you look for your Enterprise.
In this video we are going to explore, how to use Cortex LLM for Text Classification usecases.
Prerequisite:
===========
Image Classification with Vector Semantic Search using Pinecone metadata filters
• Image Classification w...
Documentation Link:
=================
docs.snowflake...
Code:
=====
CREATE or replace Database snowflake_llm_poc;
use snowflake_llm_poc;
CREATE TABLE question_data (
text STRING,
category STRING
);
--training data
INSERT INTO question_data (text, category) VALUES
('What is the capital of France?', 'geography'),
('Name the tallest mountain in the world', 'geography'),
('How does quantum computing work?', 'technology'),
('Best practices for cybersecurity', 'technology'),
('Explain the theory of relativity', 'science'),
('What are the planets in our solar system?', 'science'),
('Who discovered electricity?', 'science'),
('What is the largest desert in the world?', 'geography'),
('Difference between classical and quantum computing?', 'technology'),
('What is the circumference of the Earth?', 'geography');
select * from question_data;
--Test Data: What is the largest ocean in the Planet Earth?
--vector embedding
create or replace table question_data_vector_store as
select TEXT,CATEGORY,SNOWFLAKE.CORTEX.EMBED_TEXT_768( 'e5-base-v2', Text) as embedding_vector from question_data;
select * from question_data_vector_store;
select text,category,VECTOR_L2_DISTANCE(SNOWFLAKE.CORTEX.EMBED_TEXT_768( 'e5-base-v2', 'What is the python programming language?'),embedding_vector) as distance from question_data_vector_store
order by
VECTOR_L2_DISTANCE(SNOWFLAKE.CORTEX.EMBED_TEXT_768( 'e5-base-v2', 'What is AI,ML & Deep Learning difference?'),embedding_vector)
limit 3;
Check this playlist for more Data Engineering related videos:
• Demystifying Data Engi...
Generative AI on AWS & Snowflake:
• Generative AI on Cloud
Apache Kafka form scratch
• Apache Kafka for Pytho...
Messaging Made Easy: AWS SQS Playlist
• Messaging Made Easy: A...
Snowflake Complete Course from scratch with End-to-End Project with in-depth explanation--
doc.clickup.co...
Explore our vlog channel:
/ @funwithourfam
🙏🙏🙏🙏🙏🙏🙏🙏
YOU JUST NEED TO DO
3 THINGS to support my channel
LIKE
SHARE
&
SUBSCRIBE
TO MY KZbin CHANNEL📺🔥💖