Search code examples
nearest-neighborword-embeddingvespavector-databasesemantic-search

How to view Vespa Embedding?


I tried the following block of code to implement nearest neighbor search algorithm in Vespa. https://docs.vespa.ai/en/nearest-neighbor-search-guide.html I was able to run it successfully but was unable to identify where this Vector DB/Embedding is getting saved.

I want to query the embedding column, which I was unable to see, however I am able to see the Title, track and other columns.

![Here I was able to view title and artist (https://i.sstatic.net/pCBOx.png)

Here I was unable to see the Embedding


Solution

  • Just add "summary" to the indexing statement in your schema:

    field embedding type tensor<float>(x[384]) {
            indexing: input title | embed e5 | attribute | index | summary
    

    You can configure different sets of fields to be returned for different queries by configuring multiple document summaries.