liveBook · Manning

Dual-encoder architecture

As explained in Building Reliable AI Systems

A retrieval architecture with separate encoders that independently represent queries and candidate items in a comparable embedding space.

A dual-encoder, or two-tower, architecture uses separate encoders for search queries and candidate listings. It helps bridge the gap between a guest’s wording and a host’s description when exact-term matching misses relevant properties. section 4.2.6

The separation supports search at scale:

  • Precompute embeddings for millions of listings; generate only the query embedding when a search arrives. section 4.2.6
  • Optimize the query encoder for short, ambiguous phrases and the listing encoder for longer descriptions, amenities, and location details. section 4.2.6

Clicks after a search provide query–listing pairs that suggest relevance for training. A click is a behavioral signal, not an explicit relevance label. section 4.2.6

How Building Reliable AI Systems covers it

How deep it goes
Explains encoder separation, precomputation, input specialization, and click-derived training pairs without detailing model internals.
Examples
Uses a property described as a “tranquil hideaway overlooking the Alps” to illustrate a match exact terms can miss.
What you can do after
Evaluate/understand why separate query and listing encoders make large-scale semantic search more efficient.
How it connects
Connects embeddings, vector search, BERT, and implicit user-feedback signals.

Related concepts

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