What are text embeddings?
Key Takeaways
This video explores the concept of embeddings in machine learning, specifically text embeddings, and how they can be used to represent complex data as numerical representations. The video covers the basics of embeddings, including how they are generated, their properties, and their applications, including searching and retrieving relevant information from unstructured data.
Full Transcript
so Jason what are we going to break down in this video well AA let's go for embeddings great because sometimes I get asked what the heck is an embedding and the really simple answer is that it's a way to represent something interesting like text or an image or video as a big AR R of numbers and we call those raised vectors because math but why use those numbers what do they actually represent well let's say you're making a vector for a cat and a vector for a dog the vector encodes attributes of things like does it have legs and does it have fur but if you added another Vector for a house it would not have fur or legs but it would have a roof each Vector has Dimensions which are essentially the number of numeric components in the vector representing those attributes if we imagine our vectors is only two numbers we can also plot them on a graph and you could see that similar things like dog and cat are closer together and house is far away from both of them in reality embedding vectors can have thousands of numbers and embeddings are generated using a model usually by calling an API and different models return different embeddings and work on different kinds of data which one you should use depends on your data oh and one important note embeddings are deterministic for a given input embedding model will always return the same output it sometimes helps to think of them as hashes this is different from the inference models you may be more familiar with like Gemini that are non-deterministic if you supply the same prompt to an inference model you aren't guaranteed to get the same response back every time it gets even cooler when you think about multimodal embeddings so we talked about data science for a while but how do I convert images and pixels into vectors and capture their meaning based on content and not just the pixels in it this is the power of embedding algorithms they can organize unstructured data into what we call a semantic space so great we've established that embedding are simple arrays of numbers that represent something they're often very very large arrays but at their core they're just arrays of numbers but what are they actually good for well think about searching through unstructured data if you've encoded the meaning of a thing into the embedding you can find all of the pictures of dogs or even the pictures of a specific breed of dog this process allows you to view unstructured elements in a structured way enabling you to search within what we call that semantic space and it works because all of them use the same model for embedding I didn't fully Gra this concept until I built out a rag system for the first time and I started retrieving relevant information from a vector database to help the llm generate more relevant responses you can use your embedding code to generate an embedding of the user's input and then use that embedding to find similar items in your database and the similarity is not just based on pixels or words but can also be based on meeting depending on your embedding model all own up to the fact that when I did my first app that needed embeddings I went and found the first tutorial that looked like it would work and followed the instructions uh I think it used gecko however there are many embedding models and choosing the right one involves several factors such as how you will break up or chunk your input these decisions are crucial it's funny because a lot of the questions would boil down to what are you actually trying to achieve and come back to the use case if you're using something like llama index it offers a number of chunking strategies that you can choose from and I like to think of embeddings here as layers of information so imagine you're going to break down a book you might have embeddings at the sentence level at the paragraph level and even the chapter level analyzing the chapter might yield very different insights compared to analyzing individual sentences and this is where the manage search is valuable however you still really have to understand your data and what it impacts your data and also your goals your data chunks need to be useful for the specific application let's look at some code to demonstrate how you can create embeddings there are many ways to create embeddings and one of the cool ones is to use PG vector and alloy DB to create embeddings directly from the database here's a simple SQL oneliner to do just that you can also create embeddings in a language like python here's an example of creating a multimodal embedding with python and then showing the vector that it returns if you want to learn more about embeddings you can check out a great blog post on the Google Cloud blog that breaks down the concepts even more than we did here there's also a code lab on creating embeddings with gecko that you can check out to get a walkthr of creating your first embeddings for text Data check out the links below with that signing off this is AA and Jason in real terms for AI thanks for joining
Original Description
Code lab → https://goo.gle/48fmoxj
Vector embeddings → https://goo.gle/3Y0XNY6
This video explores the world of embeddings in machine learning, explaining how they transform complex data like text and images into numerical representations. Watch along as Aja and Jason from Google delve into real-world use cases and demonstrate the power of embeddings.
Chapters:
0:00 - Intro
0:31 - What are vectors?
1:57 - Practical applications of embeddings
2:52 - Creating embeddings
3:47 - Demo
4:12 - Learn more
Watch more Real Terms for AI → https://goo.gle/AIwordsExplained
Subscribe to Google Cloud Tech → https://goo.gle/GoogleCloudTech
#GenerativeAI #GoogleCloud
Speakers: Aja Hammerly, Jason Davenport
Products Mentioned: Cloud - AI and Machine Learning - Vertex AI
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Google Cloud Tech · Google Cloud Tech · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
I’m going for it #GoogleCloudCertified
Google Cloud Tech
I had to get #GoogleCloudCertified
Google Cloud Tech
Be better overall at what you do #GoogleCloudCertified
Google Cloud Tech
Cloud Monitoring on our radar #Analysis #Uptime
Google Cloud Tech
Introduction to Generative AI Studio
Google Cloud Tech
How to use Github Actions with Google's Workload Identity Federation
Google Cloud Tech
Introduction to Responsible AI
Google Cloud Tech
Networking updates and CDMC-certified architecture
Google Cloud Tech
Create and use a Cloud Storage bucket
Google Cloud Tech
How to digitize text from documents
Google Cloud Tech
Faster analytical queries with AlloyDB
Google Cloud Tech
Next ‘23 sessions and FaaS Wave
Google Cloud Tech
Introduction to Assured Open Source Software
Google Cloud Tech
BigQuery Cost Optimization: Storage
Google Cloud Tech
BigQuery Cost Optimization: Compute
Google Cloud Tech
BigQuery Cost Optimization: Select Queries
Google Cloud Tech
Remote Field Equipment Management with Manufacturing Data Engine
Google Cloud Tech
Supercharging your applications with Cloud SQL Enterprise Plus
Google Cloud Tech
Vector Support on our radar #GenAI
Google Cloud Tech
Architecting a blockchain startup with Google Cloud
Google Cloud Tech
Kubernetes and multitasking updates!
Google Cloud Tech
GKE: Using Kubernetes Events
Google Cloud Tech
How to configure firewall rules for Cloud Composer
Google Cloud Tech
Vertex AI Embeddings API + Matching Engine: Grounding LLMs made easy
Google Cloud Tech
Geospatial analytics on our radar #EarthEngine #BigQuery
Google Cloud Tech
Ensuring requests are set in Kubernetes
Google Cloud Tech
Cloud Next 2023, Google research program, and more!
Google Cloud Tech
How to migrate projects between organizations with Resource Manager
Google Cloud Tech
How to run #MySQL in Google Cloud
Google Cloud Tech
#GenerativeAI for enterprises and #Next2023
Google Cloud Tech
How Google Photos scales to store 4 trillion photos and videos
Google Cloud Tech
Google Cross-Cloud Interconnect (Demo 2)
Google Cloud Tech
GKE Cost Optimization Golden Signals: Introduction
Google Cloud Tech
GKE Cost Optimization Golden Signals: Workload Rightsizing
Google Cloud Tech
GKE Load Balancing: Overview
Google Cloud Tech
GKE Load Balancing: Best Practices
Google Cloud Tech
Disaster Recovery in GKE
Google Cloud Tech
How to configure IP masquerade agent in GKE Standard clusters
Google Cloud Tech
Enable and use GKE Control plane logs
Google Cloud Tech
Compliance in Australia with Assured Workloads
Google Cloud Tech
Creating budgets and budget alerts in Google Cloud #FinOps
Google Cloud Tech
Cloud SQL Enterprise Plus on our radar #mySQL
Google Cloud Tech
What's Next for Google Cloud?
Google Cloud Tech
How Loveholidays scaled with Contact Center AI
Google Cloud Tech
What is fleet team management in GKE?
Google Cloud Tech
Troubleshoot VPC Network Peering
Google Cloud Tech
Introduction to DocAI and Contact Center AI
Google Cloud Tech
Cloud Run Direct VPC egress explained
Google Cloud Tech
Database deployment options in GKE
Google Cloud Tech
Analyze cloud billing data with #BigQuery
Google Cloud Tech
Tips to becoming a world-class Prompt Engineer
Google Cloud Tech
Serverless is simple. Do I need CI/CD?
Google Cloud Tech
Accelerating model deployment with MLOps
Google Cloud Tech
How Hawaii's Department of Human Services scaled with CCAI
Google Cloud Tech
Pricing API on our #Radar
Google Cloud Tech
How Recommendations AI for Media can boost customer retention
Google Cloud Tech
Troubleshooting: Node Not Ready Status
Google Cloud Tech
One weekend until Cloud Next 2023!
Google Cloud Tech
#GoogleCloudNext starts tomorrow!
Google Cloud Tech
#GoogleCloudNext will be demand!
Google Cloud Tech
More on: ML Maths Basics
View skill →Related Reads
📰
📰
📰
📰
If You Learn Slowly Enough, You Won’t Need to Learn Anything—Applying the TabFM Prediction Framework to Quantitative Trading
Dev.to AI
Python Functions : A Beginner-Friendly Guide
Medium · Python
"Hallucination" Is Three Different Bugs. We Keep Filing Them as One.
Dev.to · Whetlan
Your Computer Doesn’t Understand Python. Here’s What Actually Happens When You Hit “Run”
Medium · Machine Learning
Chapters (6)
Intro
0:31
What are vectors?
1:57
Practical applications of embeddings
2:52
Creating embeddings
3:47
Demo
4:12
Learn more
🎓
Tutor Explanation
DeepCamp AI