Skip to main content

https://onsdigital.blog.gov.uk/2024/07/05/improving-our-website-search/

Improving our website search

Posted by: and , Posted on: - Categories: Technology, Website

Website search screen shot

ONS.GOV.UK has a vast website estate. There are nearly 4 million pages and downloadable files covering an enormous range of information and statistics related to the economy, population, and society at national, regional and local levels – all published to deliver our mission: statistics for the public good. With around 2 million page views a month, our website is the primary platform for us to deliver high quality data to inform the UK, improve lives and build for the future.

Most other government departments must use GOV.UK for their news, announcements, services, and general information, but the quantity and variety of our content is best suited to a dedicated website communicating our unique statistical content to users.

Therefore, it’s essential that our website gives our users the information they need and when they need it.

A more natural way to search

A very important part in doing this is through the website search and we’ve introduced a more natural way to search using Natural Language Processing (NLP) to better give users the information they need.

We’ve been A/B testing the new search on our website where some users would get the new NLP search and others would get the previous search.  We've now switched to full NLP search where all users will have their results generated using the new search.

Previously, the website search took the words entered in the search bar and matched them directly to the index, providing the links to the pages in the search results.  The new search introduces a further step – to understand better what the user is searching for.

This means a user can use natural language in the search bar, for example, asking questions such as “what is the inflation rate”.  Previously, the search engine would have looked for matches of all words in the index, giving each one an equal weighting when the important part of the search is really “inflation”.

The new search breaks the question down, ignoring “what”, “is” and “the” and weighting “inflation” higher than “rate” because “rate” is more present in our content than “inflation”.

Once the search words have been weighted, the search then looks for what those words mean in the context of our outputs – identifying close neighbours of the words, words which regularly appear alongside them and the topics they appear in.

Richer search results

The search results can be more relevant to what the user is searching for with the results also presented in order of weighting. Our aim is to provide the user with richer search results to increase the probability of them finding what they were looking for. We’ve released these changes as a Public Beta, we’ll monitor and analyse search performance through July to see how much difference they’ve made and to prioritise further development work.

As we do this, your feedback will be incredibly valuable. We’d love to hear from you to help us in our mission to give our users the information they need and when they need it.

Sharing and comments

Share this page

Leave a comment

We only ask for your email address so we know you're a real person

By submitting a comment you understand it may be published on this public website. Please read our privacy notice to see how the GOV.UK blogging platform handles your information.