VOOZH about

URL: https://thenewstack.io/the-secret-sauce-for-vector-search-training-embedding-models/

⇱ The Secret Sauce for Vector Search: Training Embedding Models - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2024-10-16 08:00:58
The Secret Sauce for Vector Search: Training Embedding Models
AI / AI Engineering / AI Operations

The Secret Sauce for Vector Search: Training Embedding Models

Fine-tuning embedding models clarifies enterprise semantics, business metrics, and ranking relevance prior to users issuing prompts.
Oct 16th, 2024 8:00am by Jelani Harper
👁 Featued image for: The Secret Sauce for Vector Search: Training Embedding Models
Image via Unsplash.

In their zeal to reap the countless benefits of generative machine learning models, organizations are rushing to embed their data for various forms of vector similarity search. Many are focused on prompt engineering and getting the best results for ad-hoc question answering, natural language search and summarizations of their data.

Some are concerned with prompt augmentation techniques like Retrieval-Augmented Generation (RAG) and multi-agent architecture approaches. Most concentrate on a chunking strategy to ensure their embeddings are comprehensive enough.

Very few organizations, however, give due credence to what may well be the most influential factor for actually succeeding with these generative AI endeavors — which could explain why, despite significant tinkering with this technology, there’s still few mission-critical use cases actually in deployment.

According to Marqo CEO Tom Hamer, “Vector similarity search is only as good as the vector embedding are.” The need to fine-tune or train the models that create the embeddings and (usually) perform the embedding-based search is imperative to optimize results. However, most organizations treat the embedding process as a foregone conclusion before attending to more oft-discussed concerns regarding prompting, architecture and security.

According to Marqo CTO Jesse Clark, organizations using general embedding models–such as those available from OpenAI or Google — might actually get worse search results than they do using a keyword search algorithm, BM25, which doesn’t support summarization or semantic search.

However, by availing themselves of solutions designed to fine-tune embedding models (which can be trained in a matter of hours or minutes, depending on the size of the training dataset), organizations can redouble the efficacy of embedding-based search. Fine-tuning familiarizes the model with the context of the business domain and the specific task, teaches it business metrics, introduces notions of rank for search relevance and defines nomenclature encountered for the first time.

General Embedding Model Problems

General embedding models are typically trained on general datasets that may not pertain to an organization’s use case. When embedding content like product names or internal enterprise jargon, they lack the semantic clarification to comprehend what that data means in an organization’s particular context.

Thus, when organizations embed their data with these models, issues arise because “for many search applications, it’s not just general, free text which is related to the documents organizations have or the queries they’re supplying,” Clark said. “The model hasn’t seen this type of query pattern; it hasn’t seen this type of language for a document. So, it performs much worse than what might’ve been reported on a benchmark.”

Benchmarks for generic embedding models can be deceptive because the data used for them could be unrelated to an organization’s specific needs. Clark recounted working with a customer using such a model for product search. In production, “it was something like 50% worse than using the keyword system they were using before, which is catastrophic from a business perspective,” Clark said.

Fine-Tuning Embedding Models

Organizations fine-tune embedding models by retraining certain parameters with their own data that are most relevant to their deployments. For semantic search or product recommendations, “the best kind of data is what users have searched for previously and engaged with,” Clark commented. “We use those relationships to provide good data for these embedding models, so they’re working back from known positive examples for that business.”

Marqo Cloud is an API-based platform for accessing language models, fine-tuning embedding models, and implementing AI retrieval with its vector search engine. It provides best practices for fine-tuning models based on the amount of training data available, which is critical for introducing the concept of ranking for enhanced search result relevance. For example, when building an e-commerce search system for an item like jeans, if there’s one pair that’s been purchased several times and another that’s been purchased much less, this metric of item popularity can be input into the model’s parameters.

“So, using this historic data for businesses based on queries or purchases, and even the quantity that that’s happening in, means the embedding model is learning how to map the queries to the product and know which ones are more popular,” Clark mentioned. Organizations can do the same thing with any other business metric reflected in their data.

Data Validation, Model Evaluation

Prior to fine-tuning embedding models, organizations must validate their training data to ensure it’s reliable. Marqo’s data validation features assess factors like completeness because, otherwise, “Often these things can be silent values,” Clark explained. “Someone might not know that the value is, in fact, missing and the model can be trained on blank spaces, for example, instead of it being a word.” Other validation capabilities involve formatting. In addition to scrutinizing text for consistency so it’s properly decoded, Marqo applies formatting techniques to image data, which is crucial for multimodality use cases.

Image processing capabilities like resizing and uniformly formatting data are required to optimize the model’s ingestion of this training data. In addition to facilitating these advantages, Marqo Cloud allows organizations to “use that model in Marqo and the exact same processing happens to those inputs, so the model sees the same kind of data in Marqo when you’re using it for search as when it was trained,” Clark said. The platform also has an evaluation phase in which, once models have been fine-tuned, organizations can upload evaluation data to assess the trained model’s performance versus that of the untrained model.

Continuous Learning Systems

The need to train the models vectorizing enterprise data for generative AI use cases is far from fleeting. It’s a reality of employing almost any form of statistical AI. “Vector search is still a machine learning system with machine learning models, and what we know about machine learning systems is they do require retraining,” Clark said. “The cadence will differ, but it’s an inevitability if you want to maintain performance.”

To that end, the API-based approach of Marqo and its capabilities for automating the core facets of training data validation, fine-tuning embedding models, and assessing them prior to deployment provides a virtuous cycle for operationalizing these models in what Clark termed “a continuous learning system.”

TRENDING STORIES
Jelani Harper has worked as a research analyst, research lead, information technology editorial consultant, and journalist for over 10 years. During that time he has helped myriad vendors and publications in the data management space strategize, develop, compose, and place...
Read more from Jelani Harper
SHARE THIS STORY
TRENDING STORIES
TNS owner Insight Partners is an investor in: OpenAI.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.