Query Well-formedness
The property of a search query being grammatically natural and unambiguous — a signal used to distinguish full-sentence questions from fragmentary keyword strings, with implications for query expansion and intent classification.
When you search for something online, how you phrase your question changes how a search engine behaves. A well-formed query reads like a natural sentence, such as, "What are the best noise-cancelling headphones for travel?" A poorly-formed query is just a fragment of keywords, like "best headphones travel."
This distinction is crucial for search engines, especially in the age of AI. Well-formed queries have clear grammatical structure, making their intent much easier to understand. They tell the system exactly what is needed, which leads to better-targeted sub-queries and more relevant search results. On the other hand, keyword fragments are ambiguous. They force the search engine to guess whether you want to buy something, find a specific website, or just learn more.
To tackle this, researchers at DEJAN built a new machine learning classifier to identify well-formed queries. Built on the ALBERT architecture and trained on Google data alongside real-world client searches, this model achieves eighty percent accuracy. That is a ten percent improvement over older models.
By identifying whether a query is well-formed right at the start, search pipelines can immediately route it to the best retrieval strategy, or flag ambiguous keywords for expansion before trying to guess the user's intent.
What query well-formedness is
A well-formed query reads like a natural sentence or question — it has clear grammatical structure, states its information need explicitly, and would make sense spoken aloud. A poorly-formed query is a keyword fragment: short, telegraphic, and relying on the search engine to infer intent from context. "What are the best noise-cancelling headphones for travel?" is well-formed. "best headphones travel" is not.
Why the distinction matters
Well-formedness is a meaningful signal for query classification. Well-formed queries tend to have clearer intent, narrower scope, and stronger signals for informational or conversational content. Poorly-formed queries are more ambiguous and often transactional or navigational. Knowing which type a query belongs to lets a system route it to the right retrieval strategy, expansion logic, or answer format.
In AI search, the distinction is amplified: query fan-out systems and grounding pipelines behave differently depending on query structure. A well-formed question generates more targeted sub-queries and retrieves more relevant grounding passages than an equivalent keyword fragment.
DEJAN's classifier
At DEJAN we built a well-formedness classifier on top of the ALBERT architecture, trained on Google's publicly released query well-formedness dataset supplemented with client data from a cycling apparel manufacturer. The model achieves 80% accuracy — a 10% improvement over Google's original LSTM-based classifier — and has been deployed in our query processing pipeline to flag ambiguous queries as candidates for expansion before they are classified for intent. The model and its weights are available for download from the DEJAN research pages.
