Unlocking the Power of Smart Search: Transforming User Experience with Large Language Models

Harold Selman
Sopra Steria NL Data & AI
7 min readMar 5, 2024

Introduction

In the fast-changing landscape of digital interactions, the search function has long been a cornerstone of efficient information retrieval. Traditional search options, however, have often left users disappointed because of the need for precision of search keywords and the tricks of constructing great search queries. Enter the era of Smart Search!

Smart Search is a paradigm shift powered by the transformative capabilities of Large Language Models. Hopefully, you’ll feel like technology finally understands your query and really helps you answer your actual questions quickly.

This blog is part of a series on Smart Search technology. This is the introduction of the series. Enjoy!

The Evolution of Search

Large Language Models (LLMs) have started a new era where search engines understand our queries, moving beyond the limitations of rigid keyword-based interactions or index search. The evolution of search technologies has transitioned from basic keyword searches and search indices, which rely on matching specific words or phrases, to the more advanced semantic searches, which comprehend the intent and context behind user queries. Below, the differences between these three types of search are explained.

  • Keyword search: enter one or more (key)words, search for documents containing the word(s) and return results.
  • Index search: here, the documents are already indexed per word like in a dictionary. Upon searching for keywords, the search for documents containing the keyword is much faster because of indexing.
  • Semantic search: here, the documents are embedded, like a vector per document/chapter/paragraph/sentence. Upon searching for a keyword/sentence, the keyword/sentence is embedded, like a vector. The system searches for similar vectors, meaning it found documents/chapters/paragraphs/sentences similar to the user input. The system returns these results to the user.

Example search query: What are the best French restaurants nearby?

Keyword search: These entries contain exact matches

  • There has been a big fire in 50% of all restaurants in 2023 …
  • The health department has closed 3 restaurants in a big investigation …
  • The French government is …

Index search: Same results as above, but much faster

Semantic search:

  • Bistro Escargo just opened this week in …
  • … this area contains many nice European cafes …

Comparing search methods

When searching for keywords that are present in the documents, these documents will occur in the results of all three search methods. If your keyword is not present in the documents, but documents contain similar words or context, then semantic search will return these results also. With fuzzy search options of index search some variations of the keyword can be found (like stemming or removing special characters), but not synonyms. Comparing these search methods:

  • Ranking these search methods from slow to fast: keyword search, index search, semantic search.
  • When looking for exact occurrences of keywords, keyword search and index search are sufficient. Index search is faster, so recommended in this case.
  • Semantic search will return more relevant results, because it also uses the context.
  • Semantic search will return less non-relevant results, because the context shows that the exact occurence of a keyword is not relevant.

In summary, semantic search leads to more dynamic and contextually relevant results in a faster way. When we talk about Smart Search we refer to semantic search incorporated in your search experience. That’s why you should discover how Smart Search can elevate user experience of all your applications and apps.

The Promise of Conversational Interactions

As we enter the realm of Smart Search, we also can consider conversational interaction between the user and the content to find answers on complex questions. Let’s call this Smart Search Assistance.

Smart Search Assistance

Picture a scenario where your search query feels more like a dialogue, and the search engine comprehends not just the words you use but also their meaning and context. And when the results are insufficient or unexpected, then the user can ask for another search iteration. Or the user can ask for explanation about search results. Or to summarize search results. Or formulate answers to the question of the user instead of simply returning the results.

Probably, you’ve heard and used either ChatGPT or Bard. At first, those were just LLMs that generated plausible answers based on its trainings data. That led to problems with misinformation. For instance, this lawyer used ChatGPT to make his case in court but cited fake cases. Mayor players, for example ChatGPT Premium, Bing Chat and Google Gemini, are trying to ground their LLMs with search. More on this, when we introduce RAG later on.

This shift is predicted to be revolutionary, promising a more intuitive and seamless digital experience. Smart Search Assistance depends on LLMs to understand language and conversation. Using only a LLM to answer a question has drawbacks, we will discuss this below.

Challenges and Considerations

Yet, this progression towards conversational interactions is not without its challenges. Large Language Models, while powerful, can sometimes exhibit downsides such as returning responses that may be unintentionally harmful, hallucination or data leakage. As we unlock the potential of Smart Search Assistance, it’s crucial to be mindful of these challenges and work towards a safer and more reliable digital experience when using these large language models.

Responsible application of AI is important, and regulations like EU AI ACT will later demand such responsibility. Transparency, explainability, accountability, governance, impact on human rights, impact on environment, preventing bias and harmful output, detecting and preventing misuse and cybersecurity of AI systems are examples of topics that definitely should be considered when building an AI system that uses LLMs. There are a lot of examples that show that these topics are still not resolved or taken care of out-of-the-box.

Retrieval-Augmented Generation (RAG)

In order to keep LLMs in check, people are looking for methods to ground LLMs. Popular is to use some form of Retrieval-Augmented Generation (RAG). This helps with problems of LLMs, like hallucination, where LLMs create wrong answers that seem correct.

What is RAG? The R stands for Retrieval, which is done using a search method, like index search or semantic search. Augmented means that Retrieval helps ground Generation.

LLMs provide the possibility to summarise or explain the results of Retrieval. This Generation part of RAG changes the search experience completely. Without LLMs, the user has to read multiple search results to find its answer. With LLMs, the user gets an answer to the question with the relevant documents cited, explained why this is the answer and how this answer was constructed. And users can answer questions that are only answered by combining multiple documents.

I found this architecture of LLM-powered applications quite helpful. It combines Retrieval and Generation, and so is a form of RAG. Thanks Github employees for writing this blog and sharing this architecture!

Source: https://github.blog/2023-10-30-the-architecture-of-todays-llm-applications/

Let me highlight a few elements of this picture. Using RAG is combining the conversational powers of LLM’s with your own data and knowledge. This approach is less prone to hallucinate than using a LLM only to generate answers. Also, there are other safeguards you can implement to make the use of LLM’s safer. With data filters, you double check whether your LLM has extracted unauthorized data. Prompt optimization tools helps to get the most out of LLM’s. The output of the LLM can be funnelled through content classifiers to detect harmful or offensive output. When you have high-quality data, you can even finetune LLM’s to your domain-specific use case to improve performance.

Conclusion

Smart Search will change the way users interact with a search engine. We had accepted that every user has to learn the quirks of every search engine. Users often needed training in using search in every application and only succeeded when learning best practices from other users. Smart Search will now help new and first time users to find the answer they where looking for without the need for extensive training.

In this introduction we’ve explored Smart Search and the transformative power of Large Language Models. We have looked at three forms of search: keyword, index and semantic. From the precision of keyword-based queries to the dynamic realm of semantic search and Retrieval-Augmented Generation to have conversational interactions with content, the journey has just begun. Because, there are a lot of challenges to have responsible AI systems.

Semantic search gives new, better and faster ways to search. Want to know more about semantic search? Join us in the article as we delve into the workings of semantic search, navigating the complexities beyond keywords and indices to further enhance our digital interactions.

Join us on this journey, and let’s unlock the true potential of smart search together. Let’s talk. Stay tuned for the second blog in this series: “Semantic Search: Stop Looking for Words, Search for Meaning”.

--

--

Harold Selman
Sopra Steria NL Data & AI

Unlocking Value from Data with People, Processes & Technology like GenAI, LLMs, RAG, Smart Search, and NLP as Solution Lead Data Science & AI at Sopra Steria