Google Embedding 2 - Complete Guide
Published on
A huge piece of news hit the AI world a few weeks ago and, this time, my dear friend Pedro Gengo and I got our hands dirty to bring it all broken down for you!
Google DeepMind launched “Gemini Embedding 2”, their first embedding model that is natively multimodal. In practice, that means it can map text, images, audio, video and even PDF files INTO THE SAME VECTOR SPACE!

In other words, you can now do cross-modal searches in a ridiculously simple way using cosine similarity. Imagine using an image to find a sound, or a voice clip to search for a PDF (without having to extract its text first!). I found it SO cool.
And then, to show off all this potential, Pedro and I created a super complete, hands-on guide in a Google Colab notebook for you to run and test everything.
What you’ll find in there:
- The classic vector math with texts (“king - man + woman = queen”), but also applied to images (“king - crown = man”).
- Native image-to-image, audio-to-audio, video-to-video and PDF-to-PDF searches.
- Crazy multimodal searches crossing audio with PDF, or grouping social media posts that mix text and image in a single embedding. And a lot more stuff.
Everything runs in a single Colab, for free. You just need to grab your API key from Google AI Studio and start playing around.
Take a look and tell me what you think!