{"id":7590,"date":"2024-02-06T09:51:42","date_gmt":"2024-02-06T08:51:42","guid":{"rendered":"https:\/\/kabisa.nl\/?p=7590"},"modified":"2025-04-16T12:17:14","modified_gmt":"2025-04-16T10:17:14","slug":"using-semantic-search-to-improve-search-accuracy","status":"publish","type":"post","link":"https:\/\/kabisa.nl\/en\/insights\/using-semantic-search-to-improve-search-accuracy\/","title":{"rendered":"Using Semantic Search To Improve Search Accuracy"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"7590\" class=\"elementor elementor-7590\" data-elementor-post-type=\"post\">\n\t\t\t\t<div class=\"elementor-element elementor-element-4f86ccd e-flex e-con-boxed e-con e-parent\" data-id=\"4f86ccd\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[]}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-8f14411 elementor-widget elementor-widget-text-editor\" data-id=\"8f14411\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><strong>The following situation often occurs when I finally find the time to relax and play couch potato: I\u2019m in the mood to watch a movie but I don\u2019t quite know what to watch. I open my favourite streaming app and instantly I\u2019m overwhelmed by all the content I don\u2019t want to watch. The browsing begins. In most streaming apps I either need to know exactly what I\u2019m looking for or I need to browse through a wide range of predefined categories that are by no means helpful. Most of the time I browse for a while and simply give up. How could this experience be improved? <em>Semantic search to the rescue!<\/em><\/strong><\/p><h2>Semantic Search vs <br \/>Keyword Based Search<\/h2><p>Semantic search leverages the power of a language model to interpret the semantics of words and phrases. Whereas traditional keyword based search methods rely on the fact that at least part of the query is located in the data verbatim; semantic search aims to include contextual meaning and intent into the equation. Meaning: it can even find relevant results if the search query does not contain any keywords that match the data. How does this work?<\/p><h2>Vector Embeddings<\/h2><p>The data to be searched is transformed into so-called vector embeddings. In simple terms, these are numerical representations of data points that capture their inherent characteristics and relationships with other data points, allowing for operations such as similarity comparisons and classification. Within the context of semantic search the underlying data is by definition textual, but images, audio or video can be vectorized as well.<\/p><h2>Example<\/h2><p>To demonstrate the power of semantic search I created an example that does a side by side comparison of, admittedly, very basic implementations of keyword and semantic search to find results in the same dataset. The dataset in question contains metadata for the IMDb top 1000 including a short description of the storyline. This piece of information will be the basis for my search implementation.<\/p><p>To set up semantic search functionality, I use the <a href=\"https:\/\/www.trychroma.com\/\" target=\"_blank\" rel=\"noopener\">ChromaDB<\/a> Python library in order to:<\/p><ul><li>Transform each description into vector embeddings (using the all-MiniLM-L6-v2 model)<\/li><li>Create a persistent collection to store those embeddings<\/li><li>Query the collection with a word or phrase for results<\/li><\/ul><p>I limited both search methods to a maximum of ten results per query. When I use the phrase <em>\u2018world war 2\u2019<\/em> the following results pop up:<\/p><p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-7592\" src=\"http:\/\/kabisa.nl\/wp-content\/uploads\/2024\/02\/image3.png\" alt=\"\" width=\"549\" height=\"466\" srcset=\"https:\/\/kabisa.nl\/wp-content\/uploads\/2024\/02\/image3.png 549w, https:\/\/kabisa.nl\/wp-content\/uploads\/2024\/02\/image3-300x255.png 300w\" sizes=\"(max-width: 549px) 100vw, 549px\" \/><\/p><p>The keyword search does not find any results, even though I know there are movies in the top 1000 that are set in the Second World War. This simply means that the combination of words is not in any of the descriptions. To be fair, the keyword search implementation is rather basic; it only looks for matches that exactly correspond with the query. In a real world application, this could be improved by introducing other capabilities like matching individual words in a query or compensate for typos.<\/p><p>The semantic search on the other hand, nicely handed me a list of ten movies. In this case, all the results are relevant. But, much like ChatGPT will always give you an answer, semantic search will always return the specified amount of results if no other boundaries are set. This can include false positives that are nonetheless included because no other data was deemed more relevant. Although ChromaDB doesn\u2019t support this out-of-the-box, you could limit false positives by configuring a distance threshold.<\/p><h2>Use cases<\/h2><h3>Content recommendations<\/h3><p>As the example above shows, semantic search can be very useful to generate recommendations for articles, images and videos that are similar.<\/p><h3>E-commerce<\/h3><p>Likewise, online stores could benefit from semantic search by way of easier navigation and better suggestions for potential buyers; especially if the product catalogue contains products from multiple sources where data is potentially unstructured instead of neatly normalised and categorised.<\/p><h3>Document retrieval<\/h3><p>Another area that could benefit from semantic search is document retrieval within organisations. Often, documents are scattered across various systems, making traditional searches challenging. Semantic search offers a more efficient and intuitive solution, significantly enhancing the accessibility of relevant information. <br \/>This could even serve as a stepping stone towards training an AI model using an organisation\u2019s knowledge base as training data.<\/p><h2>Conclusion<\/h2><p>Semantic search offers substantial advantages by taking into account context and intent of user queries, delivering more accurate and relevant results. This approach can potentially improve information retrieval across various domains. However, its complexity and computational demands, relying on advanced language understanding through language models, pose challenges. On the flip side, keyword based searches are simple to implement and may suffice in many situations. Both methods have merits, and leveraging their strengths can optimise the user experience without unnecessary complexity.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>The following situation often occurs when I finally find the time to relax and play couch potato: I\u2019m in the mood to watch a movie but I don\u2019t quite know what to watch. I open my favourite streaming app and instantly I\u2019m overwhelmed by all the content I don\u2019t want to watch. The browsing begins. [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":7597,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-7590","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.4 (Yoast SEO v28.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Using Semantic Search To Improve Search Accuracy | Kabisa Software Artisans<\/title>\n<meta name=\"description\" content=\"The following situation often occurs when I finally find the time to relax and play couch potato: I\u2019m in the mood to watch a movie but I don\u2019t quite know\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kabisa.nl\/en\/insights\/using-semantic-search-to-improve-search-accuracy\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using Semantic Search To Improve Search Accuracy | Kabisa Software Artisans\" \/>\n<meta property=\"og:description\" content=\"The following situation often occurs when I finally find the time to relax and play couch potato: I\u2019m in the mood to watch a movie but I don\u2019t quite know\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kabisa.nl\/en\/insights\/using-semantic-search-to-improve-search-accuracy\/\" \/>\n<meta property=\"og:site_name\" content=\"Kabisa Software Artisans\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/kabisaict\" \/>\n<meta property=\"article:published_time\" content=\"2024-02-06T08:51:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-16T10:17:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/kabisa.nl\/wp-content\/uploads\/2024\/02\/Ontwerp-zonder-titel.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Pascal Widdershoven\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pascal Widdershoven\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Using Semantic Search To Improve Search Accuracy | Kabisa Software Artisans","description":"The following situation often occurs when I finally find the time to relax and play couch potato: I\u2019m in the mood to watch a movie but I don\u2019t quite know","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kabisa.nl\/en\/insights\/using-semantic-search-to-improve-search-accuracy\/","og_locale":"en_US","og_type":"article","og_title":"Using Semantic Search To Improve Search Accuracy | Kabisa Software Artisans","og_description":"The following situation often occurs when I finally find the time to relax and play couch potato: I\u2019m in the mood to watch a movie but I don\u2019t quite know","og_url":"https:\/\/kabisa.nl\/en\/insights\/using-semantic-search-to-improve-search-accuracy\/","og_site_name":"Kabisa Software Artisans","article_publisher":"https:\/\/www.facebook.com\/kabisaict","article_published_time":"2024-02-06T08:51:42+00:00","article_modified_time":"2025-04-16T10:17:14+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/kabisa.nl\/wp-content\/uploads\/2024\/02\/Ontwerp-zonder-titel.png","type":"image\/png"}],"author":"Pascal Widdershoven","twitter_misc":{"Written by":"Pascal Widdershoven","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kabisa.nl\/en\/insights\/using-semantic-search-to-improve-search-accuracy\/#article","isPartOf":{"@id":"https:\/\/kabisa.nl\/en\/insights\/using-semantic-search-to-improve-search-accuracy\/"},"author":{"name":"Pascal Widdershoven","@id":"https:\/\/kabisa.nl\/en\/#\/schema\/person\/bb106dc0f60084151340ddcc512f840a"},"headline":"Using Semantic Search To Improve Search Accuracy","datePublished":"2024-02-06T08:51:42+00:00","dateModified":"2025-04-16T10:17:14+00:00","mainEntityOfPage":{"@id":"https:\/\/kabisa.nl\/en\/insights\/using-semantic-search-to-improve-search-accuracy\/"},"wordCount":786,"commentCount":0,"publisher":{"@id":"https:\/\/kabisa.nl\/en\/#organization"},"image":{"@id":"https:\/\/kabisa.nl\/en\/insights\/using-semantic-search-to-improve-search-accuracy\/#primaryimage"},"thumbnailUrl":"https:\/\/kabisa.nl\/wp-content\/uploads\/2024\/02\/Ontwerp-zonder-titel.png","articleSection":["News"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kabisa.nl\/en\/insights\/using-semantic-search-to-improve-search-accuracy\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kabisa.nl\/en\/insights\/using-semantic-search-to-improve-search-accuracy\/","url":"https:\/\/kabisa.nl\/en\/insights\/using-semantic-search-to-improve-search-accuracy\/","name":"Using Semantic Search To Improve Search Accuracy | Kabisa Software Artisans","isPartOf":{"@id":"https:\/\/kabisa.nl\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/kabisa.nl\/en\/insights\/using-semantic-search-to-improve-search-accuracy\/#primaryimage"},"image":{"@id":"https:\/\/kabisa.nl\/en\/insights\/using-semantic-search-to-improve-search-accuracy\/#primaryimage"},"thumbnailUrl":"https:\/\/kabisa.nl\/wp-content\/uploads\/2024\/02\/Ontwerp-zonder-titel.png","datePublished":"2024-02-06T08:51:42+00:00","dateModified":"2025-04-16T10:17:14+00:00","description":"The following situation often occurs when I finally find the time to relax and play couch potato: I\u2019m in the mood to watch a movie but I don\u2019t quite know","breadcrumb":{"@id":"https:\/\/kabisa.nl\/en\/insights\/using-semantic-search-to-improve-search-accuracy\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kabisa.nl\/en\/insights\/using-semantic-search-to-improve-search-accuracy\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kabisa.nl\/en\/insights\/using-semantic-search-to-improve-search-accuracy\/#primaryimage","url":"https:\/\/kabisa.nl\/wp-content\/uploads\/2024\/02\/Ontwerp-zonder-titel.png","contentUrl":"https:\/\/kabisa.nl\/wp-content\/uploads\/2024\/02\/Ontwerp-zonder-titel.png","width":1920,"height":1080},{"@type":"BreadcrumbList","@id":"https:\/\/kabisa.nl\/en\/insights\/using-semantic-search-to-improve-search-accuracy\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/kabisa.nl\/en\/"},{"@type":"ListItem","position":2,"name":"Insights","item":"https:\/\/kabisa.nl\/en\/insights\/"},{"@type":"ListItem","position":3,"name":"Using Semantic Search To Improve Search Accuracy"}]},{"@type":"WebSite","@id":"https:\/\/kabisa.nl\/en\/#website","url":"https:\/\/kabisa.nl\/en\/","name":"Kabisa Software Artisans","description":"Mission-critical Software for Hightech, Fintech &amp; E-commerce","publisher":{"@id":"https:\/\/kabisa.nl\/en\/#organization"},"alternateName":"Kabisa","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kabisa.nl\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/kabisa.nl\/en\/#organization","name":"Cloud Legends","alternateName":"Kabisa","url":"https:\/\/kabisa.nl\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kabisa.nl\/en\/#\/schema\/logo\/image\/","url":"https:\/\/kabisa.nl\/wp-content\/uploads\/2022\/12\/kabisa-favicon.png","contentUrl":"https:\/\/kabisa.nl\/wp-content\/uploads\/2022\/12\/kabisa-favicon.png","width":512,"height":512,"caption":"Cloud Legends"},"image":{"@id":"https:\/\/kabisa.nl\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/kabisaict","https:\/\/x.com\/kabisasoftware"],"description":"Software Development is onze core-business. Kabisa ontwikkelt innovatieve maatwerk software die naadloos aansluit bij de behoeftes van klanten en eindgebruikers. Dat doen we in nauwe samenwerking in elke fase van het proces: co-creatie noemen we dat.","email":"info@kabisa.nl","telephone":"0495 430 798","legalName":"Kabisa B.V.","foundingDate":"2006-01-01","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"51","maxValue":"200"}},{"@type":"Person","@id":"https:\/\/kabisa.nl\/en\/#\/schema\/person\/bb106dc0f60084151340ddcc512f840a","name":"Pascal Widdershoven","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/adb064831907bf166f6188ef633ea3d429e6f032610afcc1ef1ad3f20601d443?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/adb064831907bf166f6188ef633ea3d429e6f032610afcc1ef1ad3f20601d443?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/adb064831907bf166f6188ef633ea3d429e6f032610afcc1ef1ad3f20601d443?s=96&d=mm&r=g","caption":"Pascal Widdershoven"}}]}},"_links":{"self":[{"href":"https:\/\/kabisa.nl\/en\/wp-json\/wp\/v2\/posts\/7590","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kabisa.nl\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kabisa.nl\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kabisa.nl\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/kabisa.nl\/en\/wp-json\/wp\/v2\/comments?post=7590"}],"version-history":[{"count":10,"href":"https:\/\/kabisa.nl\/en\/wp-json\/wp\/v2\/posts\/7590\/revisions"}],"predecessor-version":[{"id":7663,"href":"https:\/\/kabisa.nl\/en\/wp-json\/wp\/v2\/posts\/7590\/revisions\/7663"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kabisa.nl\/en\/wp-json\/wp\/v2\/media\/7597"}],"wp:attachment":[{"href":"https:\/\/kabisa.nl\/en\/wp-json\/wp\/v2\/media?parent=7590"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kabisa.nl\/en\/wp-json\/wp\/v2\/categories?post=7590"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kabisa.nl\/en\/wp-json\/wp\/v2\/tags?post=7590"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}