liveBook · Manning

Query signal

As explained in AI-Powered Search

A query signal is a recorded search event representing a user's submitted query at a particular time.

A query signal records a user’s submitted search query at a particular time. It anchors the subsequent interaction sequence, including returned results, clicks, cart additions, and purchases. section 4.1.3

A generic signal record uses query_id, user, type, target, and signal_time. The query event stores the submitted keywords; separate result and interaction events retain a consistent, extensible structure while linking back to the originating query_id. section 4.1.3

Query signals support several search-quality workflows:

  • Normalize and deduplicate queries before analyzing user language. section 6.5.2
  • Tokenize queries, remove stop words and numbers, and count recurring terms. section 6.5.2
  • Extract domain-specific phrases and alternative labels for query interpretation. section 6.4.2
  • Learn spelling corrections by comparing infrequent variants with frequent, similarly spelled terms. section 6.5.2

A linked search journey

A user searches for “ipad,” receives doc1, doc2, and doc3, clicks doc1 and doc3, and adds doc3 to a cart. A later “ipad cover” query produces another linked sequence. Query signals identify both submitted queries, while query_id connects each result and interaction to its originating search. section 4.1.3

Table 4.1 Example signals format
query_id
user
type
target
signal_time
1
u123
query
ipad
2024-05-01-09:00:00
1
u123
results
doc1,doc2,doc3
2024-05-01-09:00:00
1
u123
click
doc1
2024-05-01-09:00:10
1
u123
click
doc3
2024-05-01-09:00:29
1
u123
add-to-cart
doc3
2024-05-01-09:03:40
2
u123
query
ipad cover
2024-05-01-09:04:00
2
u123
results
doc4,doc5
2024-05-01-09:04:00
2
u123
click
doc4
2024-05-01-09:04:40
2
u123
add-to-cart
doc4
2024-05-01-09:05:50
1
u123
purchase
doc3
2024-05-01-09:07:15
2
u123
purchase
doc4
2024-05-01-09:07:15

Use the signal table to inspect how query, results, click, cart, and purchase events are represented and timestamped. section 4.1.3

How AI-Powered Search covers it

How deep it goes
Defines a generic event schema and demonstrates transformations for normalization, tokenization, frequency analysis, and edit-distance correction.
Examples
Uses an iPad search journey, a signals table, SQL query retrieval, token counts, quantiles, and edit-distance spelling matches.
What it assumes
Assumes searchable signal records and basic query analysis, while teaching the event schema and normalization process explicitly.
What you can do after
Apply it via SQL and Python to normalize searches, extract terminology, and generate candidate spelling corrections.
How it connects
Connects query parsing, click signals, entity extraction, spelling correction, knowledge graphs, query intent, and semantic search.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI-Powered Search. The section links point to the parts of the book it draws on.