GLOSSARY

Neural IR

Neural IR uses neural networks to match queries and documents by meaning, not just words. Shops use it to understand vague or long queries and recover results when keywords don’t match.

What is Neural IR?

Neural Information Retrieval applies neural models to search, producing vector representations (embeddings) for queries and documents and/or neural re-rankers that score top candidates with deep context.

How It Works (quick)

  • Dense retrieval: Dual-encoder encodes documents and queries into vectors; find nearest neighbors with an ANN index.
  • Re-ranking: Cross-encoders (or late interaction models) rescore the top N from lexical/dense recall using full token interactions.
  • Hybrid pipeline: Lexical recall (BM25) + dense recall (vectors) → neural re-rank → business-aware ranking.
  • Training: Contrastive learning on click/purchase pairs; hard negative mining; domain adaptation.
  • Serving: Batch/stream embeddings, cache hot queries, quantize/distill for latency.

Why It Matters in E-commerce

  • Semantic match: Captures meaning beyond exact wording (“rainproof trail runners” ↔ waterproof trail shoes).
  • Recall rescue: Finds items when brand/model terms don’t align with catalog text.
  • Long queries: Handles descriptive, multi-constraint queries better than pure lexical.

Best Practices

  • Start hybrid: Keep BM25 candidates; add dense recall where coverage is weak.
  • Domain tuning: Train/fine-tune on your catalog and queries; guard brand/SKU exactness with keyword fields.
  • Latency budgets: Use ANN with product-level caching; distill/quantize models; cap re-rank set size.
  • Freshness: Schedule embedding refreshes; compute on publish/update events.
  • Safety & bias: Enforce hard filters (stock/ACL), brand caps, and diversity before final rank.
  • Measurement: NDCG@k, CTR, conversion, zero-results recovery, and tail latency.

Challenges

  • Compute cost, embedding staleness, multilingual tuning, explainability, and cold-start items.

Examples

  • Query “eco-friendly running jacket that packs small” retrieves packable recycled-fabric shells even without the exact words.
  • Dense recall lifts relevant compatible accessories despite sparse titles.

Summary

Neural IR adds meaning to retrieval. Run it in a hybrid stack with strict guardrails, tuned embeddings, and fast ANN to lift recall and relevance without sacrificing speed or control.

FAQ

Neural IR vs semantic search?

Often used interchangeably; Neural IR is the model-based implementation of semantic search.

Do vectors replace keywords?

No—keep lexical for precision, filters, and brand/SKU handling; use vectors to expand recall and meaning.

Re-ranker or dual-encoder first?

Begin with dual-encoder + BM25; add a lightweight re-ranker where gains justify latency.