Kristian Aune
Kristian Aune
Head of Customer Success, Vespa.ai

Vespa Newsletter, February 2024

In the previous update, we mentioned rank score normalization in the global ranking phase, improved feeding using PyVespa, token authentication, and query match debugging. Today, we’re excited to share the following updates:

Vespa Recognized as a Leader and Forward Mover in GigaOm Sonar for Vector Databases

We were pleased to be recognized as a leader and forward mover in GigaOm’s latest research report. This study offers a clear, analytical overview of the vector database landscape, making sense of the many products available. “Interest in the vector database market is surging as industries seek advanced AI to manage vast unstructured data. Vespa is well placed in this market with strengths that include model versatility, search flexibility and real-time capabilities”, says the report author, Andrew Burst.

Vespa Recognized as a Leader and Forward Mover in GigaOm Sonar for Vector Databases

We are equally excited by the positive response from our customers to this news. “As a reliable and scalable solution, Vespa has been instrumental in enabling Search at Spotify. We look forward to continuing our work with the Vespa team and enabling innovation that will enhance the experience for Spotify listeners”, says Daniel Doro, Director of Engineering, Search, Spotify.

Find more comments from Vespa customers and users in the businesswire press release. Download the full report courtesy of Vespa, and read the Vespa.ai CEO Jon Bratseth’s blog post to learn more.

A native ColBERT embedder in Vespa

ColBERT embeddings allows you to achieve state-or-the-art ranking, while also providing explainability through syntax highlighting like with lexical search. With the new ColBERT embedder in Vespa you can use ColBERT out of the box. Read more.

YQL IN operator

Using sets in queries is useful to express “find any of” without a massive “a OR b OR c OR …”. The negation is also useful, e.g to exclude documents in the result set, e.g. do not show users results that are previously returned, using the NOT operator.

In Vespa you can use the weightedSet query item to express this. Many Vespa users have requested an IN operator in YQL instead, and this was released in 8.293. Now you can write queries like:

select id, name from product where id in (10, 20, 30)

Or the inverse, to exclude items from the result:

select id, name from product where !(id in (10, 20, 30))

A pro-tip is using parameter substitution to also speed up YQL-parsing:

select id, name from product where id in (@my_set)&my_set=10,20,30

This also simplifies integration with the query interface. Read more in multi-lookup-set-filtering. As an added bonus, performance for such queries is improved, too! See the blog post to learn more.

Streaming search: fuzzy and regexp matching

Vespa in indexed mode supports both regexp and fuzzy matching. Since 8.290, regexp and fuzzy searches are also supported in streaming mode - examples:

select * from music where ArtistAttribute matches "the week[e]*nd"

select * from music where ArtistAttribute contains
    ({maxEditDistance: 1}fuzzy("the weekend"))

Performance generally differs between the indexing modes, and both regex and fuzzy matches are slower than exact matching using indexes. Streaming mode is optimized for writes and low resource usage, it does not use index structures. Regexp and fuzzy matching are implemented without index structures, so a good fit for streaming search - performance degradation is relatively smaller!

As a side note, fuzzy matching performance for indexed search was also greatly improved last October, see the announcement.

Embed with @Parameter substitution

Vespa makes it easy to create embeddings on the fly, both at write and query time, using the embed function. With hybrid queries, the text to be searched must be input to both lexical search and vector embedding, leading to duplication in the query.

Since Vespa 8.287, one can use parameter substitution to simplify. Add the user input once in a request parameter, and refer to this elsewhere in the expression - for example, using @query:

$ vespa query 'yql=select id, from product where
    {targetHits:10}nearestNeighbor(embedding, query_embedding) or userInput(@query)' \
    'input.query(query_embedding)=embed(transformer, @query)' \
    'query=running shoes for kids, white'

Read more.

Embedding an array of strings into multiple tokens

If you want to embed multiple chunks of data into a vector-per-token representation, as in ColBERT, you can now do this using the built-in embed functionality in Vespa. Just declare the receiving tensor field as a rank-3 tensor, such as tensor(chunks{}, tokens{}, x[32]) and embed with embed colbert chunks, see this example. Available since 8.303.

Vespa does hackathons

We are proud to sponsor hackathons at Stanford and Berkeley later this month! Meet the Vespa Team at the sites on the following dates:

New posts from our blog

You may have missed some of these new posts since the last newsletter:


Thanks for reading! Try out Vespa by deploying an application for free to Vespa Cloud .