How could autocomplete be implemented in Vespa search?

135 views Asked by At

I am looking into ways to implement autocomplete in Vespa.

Requirements:

  • Needs to handle large scale (~2000RPS)
  • Personalized ranking
  • Latency under 100ms
  • Able to handle mistypes
  • Able to match suggestions from the middle. (e.g. typing "Jon" would match "Jack & Jones)

Has anyone done it? Any articles or guides how to do it?

Thanks so much! <3

1

There are 1 answers

0
Jo Kristian Bergum On

Yes, we have a lot of resources on implementing autocomplete in Vespa.

Scale is not a problem. Here is a talk from Otto.de (One of the largest e-commerce sites in Germany) on using Vespa for search suggestions (including ML/personalization) talk. Later talks have also described how they use semantic vector search in this mix.

To have fine control over how you match user queries, it's best done with a custom searcher implementation searcher inspiration, with this you can easily control things like semantic (vector matching) for longer queries, the typo tolerance (edit distance), how you match short input versus long input. Once you have that, you can experiment with the full flexibility of the Vespa ranking framework for personalization.