Mastering Text Embeddings in BigQuery: Your Essential Guide to Advanced Semantic Analysis

Mastering Text Embeddings in BigQuery: Your Essential Guide to Advanced Semantic Analysis

Mastering Text Embeddings in BigQuery: Your Essential Guide to Advanced Semantic Analysis

As Seen On


In the echoing halls of data-driven decision making, text embeddings have established themselves as a crucial cornerstone. They play a vital role in semantic search, recommendations, text clustering, sentiment analysis, and named entity extraction scenarios. In a bold stride forward, BigQuery now allows users to generate four different types of text embeddings directly from BigQuery SQL.

Let’s delve into this ground-breaking capability and explore each type of text embedding.

Textembedding-Gecko for Generative AI Embedding

This is ideal for generating embeddings backed by cutting-edge AI, pulling the semantic essence from the minutia of data.


It brings something to the table for tasks requiring context or multi-language support, offering a deeper understanding of natural language intricacies.


This is your go-to for straightforward NLP tasks such as text classification and sentiment analysis, count on NNLM to get the job done.


When grappling with a large corpus of data and complex relationships between words, SWIVEL provides optimal embedding generation.

The new BigQuery feature, array<numeric>, now allows the embeddings generated by these methods to be used by any ML model. This game-changing addition offers a significant advantage for analysis, which depends on proximity and distance within the vector space.

Generating your first embedding is a breeze with the textembedding-gecko PaLM API and the newly added function, ML.GENERATETEXTEMBEDDING. Start by registering the textembedding-gecko model as a remote model. Then, use the ML.GENERATETEXTEMBEDDING function to generate embeddings. It’s that simple!

Of course, alternatives for generating text embeddings exist with scaled-down models like BERT, NNLM, and SWIVEL. These models offer reduced encoding capacity, but their scalability to handle larger data corpora shines through.

Translating these capabilities into applications in BigQuery ML provides numerous opportunities. Take sentiment analysis as an example. You could predict the sentiment of an IMDB review using embeddings generated from the NNLM model along with the original data. The possibilities are truly endless.

We hope this exploration of text embeddings in BigQuery has sparked your curiosity. Dive in, experiment, and tap into more advanced use cases that this technology offers. Further reading and resources will deepen your understanding and mastering of BigQuery.

As you venture into your experiments with text embeddings in BigQuery, remember these buzzwords: BERT, NNLM, SWIVEL, ML model, generative AI embedding, sentiment analysis, text embeddings. By incorporating these into your work, you’re setting your journey up for success.

Whether you’re a developer, an ML enthusiast, a veteran data scientist, or someone with previous experience in BigQuery and machine learning, you clearly understand the power of big data and the insights it can provide. Now, go ahead and capitalize on the latest advancements, and unlock a realm of potential with text embeddings in BigQuery. Let the exploration begin!

Casey Jones Avatar
Casey Jones
8 months ago

Why Us?

  • Award-Winning Results

  • Team of 11+ Experts

  • 10,000+ Page #1 Rankings on Google

  • Dedicated to SMBs

  • $175,000,000 in Reported Client

Contact Us

Up until working with Casey, we had only had poor to mediocre experiences outsourcing work to agencies. Casey & the team at CJ&CO are the exception to the rule.

Communication was beyond great, his understanding of our vision was phenomenal, and instead of needing babysitting like the other agencies we worked with, he was not only completely dependable but also gave us sound suggestions on how to get better results, at the risk of us not needing him for the initial job we requested (absolute gem).

This has truly been the first time we worked with someone outside of our business that quickly grasped our vision, and that I could completely forget about and would still deliver above expectations.

I honestly can't wait to work in many more projects together!

Contact Us


*The information this blog provides is for general informational purposes only and is not intended as financial or professional advice. The information may not reflect current developments and may be changed or updated without notice. Any opinions expressed on this blog are the author’s own and do not necessarily reflect the views of the author’s employer or any other organization. You should not act or rely on any information contained in this blog without first seeking the advice of a professional. No representation or warranty, express or implied, is made as to the accuracy or completeness of the information contained in this blog. The author and affiliated parties assume no liability for any errors or omissions.