Learn How Keyword Search Works and How Language Models can Improve it!
![Learn how keyword search works and how language models can improve it!](https://assets-proxy.steadyhq.com/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1600%2F1%2AGYLAs0oH-5GYiaaU4mzz1w.png?auto=compress&w=800&fit=max&dpr=2&fm=webp&s=66777f195a71170fe3d994149fbc1456)
Search is everywhere! We all use search engines like Google, Bing, or You.com (Si apre in una nuova finestra) every day. Moreover, we search for information in apps like YouTube or X. It’s hard to imagine our everyday lives without searching. Companies also use search systems to search their internal documents. Keyword Search is the most commonly used technique to build search systems.
We’ll discuss the following points:
How does the keyword search work?
How do you use a keyword search system in Python?
How can language models improve Search Systems?
We have no time to waste. Let’s get started.
How does the keyword search work?
First, we want to introduce the high-level concept behind keyword search. The following figure shows a simple example.
![Example: Keyword Search (Inspired by [1])](https://assets-proxy.steadyhq.com/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1600%2F1%2AvXt6gNLkAGagvsU18oYDTQ.png?auto=compress&w=800&fit=max&dpr=2&fm=webp&s=fc717eabfaca118115e0e25e818b1db9)
Example: Keyword Search (Inspired by [1])
Let’s say we have the query “What does the abbreviation EPS stand for in the financial industry?”. We are searching a very small archive that contains four sentences. We can compare how many words match between the query and the archive. The first sentence contains two words that are common to the query. The second sentence has the word “The”, which also contains the query. In the third sentence, no word is equal. The last sentence contains four words from the query. In the figure, you can see the number of words for each sentence on the right side. In addition, you can see that the fourth sentence has the most words in common with the query. A keyword search might retrieve that as the answer.
To read this post you'll need to become a member. Members help us fund our work to ensure we can stick around long-term.
See our plans (Si apre in una nuova finestra)
Sei già un affiliato? Accedi (Si apre in una nuova finestra)