So I'm working on a project which allows a user to type in a query using natural language as follows:

enter image description here

Some of the keywords turn into tags that can be clicked/interacted with to access an advanced search screen. enter image description here

I have a few questions about this.

  1. Is it obvious to the user that the keyword can be clicked to access the advanced search screen? If not, would putting a tooltip on one of the keywords help solve the problem or is there another way around this?

  2. Should the user be made aware that "and", "not" and "or" act as boolean keywords and should they be separately highlighted? esp for cases with "NOT"?

enter image description here

Finally, is there an example of a natural language search bar that behaves similarly?

1 Answer 1


It's not obvious that the words are interactive - only that they can be deleted - which presumably means deleted from being an active part of the search rather than removed from the phrase. You could try using blue link-style text to the clickable words.

All the words are highlighted similarly which doesn't help indicate that the boolean logic has been detected. You could try highlighting terms in different colours and using colour to connect them to the boolean operator with the associated terms.

enter image description here

However, your example is very neatly worded. I think you are very quickly going to struggle to parse natural language input in an unambiguous way. Imagine the user types in something like:

Anyone with a car,van or truck and canoe or a yacht but not a motorcycle

[Yay for the oxford comma!]

In all but the simplest cases, you run the risk of the user frequently having to inspect a structured form of the search in order to verify that their intent has been interpreted correctly. That might mean a lot of cognitive work somewhere on the spectrum between understanding your interpretation and rephrasing what they said originally, before then comparing the two. That might be too much work for the user to do often.

It's usually best to aim for clarity rather than require or attempt disambiguation - i.e. It's less confusing to get the user to enter their intent as a structured input in the first place - similar to Google Advanced search:

enter image description here

Having said all that, then depending on your scenario, perhaps there is a large amount of input that is not directly from the user, but coming in from a third party - in which case such an automated approach may well be useful with the option of a manual check. [An ambiguity score might be useful there.]

Note: We don't know much about the scenario in which this search is occurring so it's hard to be specific here.

See also: related question Natural language and autocompletion

  • Thnx this was very helpful! Prior to this users were required to fill a form (much like the google advanced search) but it had too many fields and checkboxes. Which meant for a user to select say, Yacht and Car, the user had to go to the automobiles section and then select type of automobile and then select whatever needed from the drop down. This search aims to solve that by returning the same list/dropdown preselected with the help of the query entered. I can imagine how this could get complicated for a complex query and am also unsure how to handle nested boolean queries as in your example. Commented Sep 6, 2018 at 8:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.