AI-Powered Semantic Job Search at Scale

linkedin · Tech · 2025 · source Agentic: no · promotional bias: low · source-backed · extracted with prompt 0.5.4 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Large-scale job search and recommendations

LinkedIn needed to move job search beyond exact keyword matching so 1.2 billion members could express nuanced job intent in natural language while still receiving low-latency, relevant results across millions of live postings.

Constraints:

Architecture

LinkedIn built a semantic job search stack around an LLM teacher/student architecture. A powerful teacher model scores query-member-job relevance offline; retrieval and ranking models are fine-tuned and distilled to mimic it efficiently online. A query engine classifies user intent, calls tools to fetch profile/preferences/graph data, resolves strict taxonomy filters, retrieves dynamic suggestions through RAG, and generates query embeddings. GPU-based exhaustive nearest-neighbor retrieval scans flat vectors with optimized matrix operations, then a smaller cross-encoder ranking model distilled from the teacher refines candidates. Synthetic LLM-generated and human-policy-aligned grades train and safeguard the system at millions-to-tens-of-millions-per-day scale.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  natural-language-query-ui["natural-language-query-ui"] --> query-understanding-engine["query-understanding-engine"]
  query-understanding-engine --> profile-and-graph-tools["profile-and-graph-tools"]
  query-understanding-engine --> suggestion-rag-store["suggestion-rag-store"]
  query-understanding-engine --> gpu-embedding-retrieval["gpu-embedding-retrieval"]
  gpu-embedding-retrieval --> distilled-ranking-model["distilled-ranking-model"]
  teacher-model["teacher-model"] --> retrieval-model-training["retrieval-model-training"]
  teacher-model --> distilled-ranking-model
  synthetic-data-and-grading-pipeline["synthetic-data-and-grading-pipeline"] --> teacher-model
  synthetic-data-and-grading-pipeline --> retrieval-model-training
  retrieval-model-training --> gpu-embedding-retrieval
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
natural-language-query-ui Allows members to describe desired jobs in their own words. query-understanding-engine
query-understanding-engine Classifies intent, calls tools for profile/network/context data, resolves strict filters, and builds query embeddings. natural-language-query-ui, profile-and-graph-tools, suggestion-rag-store, gpu-embedding-retrieval
profile-and-graph-tools External services used to resolve member preferences, network/company connections, and taxonomy entities. query-understanding-engine
suggestion-rag-store Vector database of mined job attributes used to suggest facets before or after retrieval. query-understanding-engine
gpu-embedding-retrieval Exhaustive nearest-neighbor search over offline-generated job embeddings using GPU matrix operations. query-understanding-engine, distilled-ranking-model
teacher-model Powerful foundational model that provides ideal relevance judgments for distillation and rewards. synthetic-data-and-grading-pipeline, retrieval-model-training, distilled-ranking-model
synthetic-data-and-grading-pipeline Generates query-member-job records and policy grades at large scale from LLMs and human annotations. teacher-model, retrieval-model-training, distilled-ranking-model
retrieval-model-training Fine-tunes open-source embedding models with RL-style teacher scoring, FSDP, BF16, and composite losses. synthetic-data-and-grading-pipeline, gpu-embedding-retrieval
distilled-ranking-model Small cross-encoder ranking model distilled from teacher labels/logits and serving optimizations. gpu-embedding-retrieval

Data flow

A member submits a natural-language query. The query engine classifies intent, fetches external member/context data, resolves strict filters such as geography or connection company IDs, retrieves suggestion facets from a vector database, and produces query embeddings for non-strict semantic criteria. GPU retrieval scans job-posting embeddings to return top-K candidates in milliseconds. Ranking uses a smaller distilled cross-encoder trained from teacher-model labels/logits plus engagement and value signals. Offline, synthetic query-member-job records and human-aligned grading policies feed continuous model training and relevance safeguards.

4 supporting quotes
“The query engine constructs the appropriate retrieval strategy by classifying the user intent, fetching external data such as profile and preferences”article, stated
“These IDs are then passed along to the search index as strict filters, while non-strict criteria are captured and passed along in the form of a query embedding.”article, stated
“serve the K closest job postings for a given search query in just a few milliseconds per query.”article, stated
“we built out an LLM fine-tuned on human annotations to apply learned product policies and grade arbitrary query-member-job records.”article, stated

Why this architecture

LinkedIn split ideal ranking into retrieval and ranking because a single powerful model comparing every query to every job was not cost-effective at scale. Distillation keeps fast retrieval/ranking aligned with a stronger teacher model. The query engine combines embeddings with strict filters because natural-language queries often include both semantic intent and hard constraints such as geography or existing connections. GPU exhaustive search was chosen after LinkedIn found flat-vector scanning could beat more complex indexes on latency while preserving filtering and index-turnover simplicity.

4 supporting quotes
“we would have a single, very powerful, model comparing every search query to every job and ranking them in the ideal order.”article, stated
“Obviously, generating such an “ideal ranking” is not cost effective at scale”article, stated
“Retrieval of jobs that match the user’s query requires more than generating an embedding based on a raw user query”article, stated
“we were able to actually beat more complex index structures on latency while still retaining the benefits of the simplicity of managing a flat list of vectors.”article, stated

Models used: LLMs · embedding-based retrieval · teacher model · small language model · cross-encoder · FSDP · BF16 · GPU exhaustive nearest-neighbor search

Scale

Alternatives considered (roads not taken)

traditional keyword-based search

Rejected because: It could not capture nuanced intent and required job seekers to know exact keywords.

“It’s unable to understand the nuances of a search and it relies on the job seeker to include the exact keywords”article, stated

one powerful model ranking every query-job pair online

Rejected because: The ideal model was not cost-effective at LinkedIn's scale.

“Obviously, generating such an “ideal ranking” is not cost effective at scale”article, stated

approximate nearest-neighbor indexes

Rejected because: LinkedIn struggled with low latency, high index turnover, liquidity, and hard filters, so it explored GPU exhaustive search.

“we still struggled to meet our needs for low latency, high index turn over”article, stated

One of the simplest approaches is doing exhaustive search by scanning over a flat list of documents laid out in contiguous memory and computing the distance between the query embedding and each document embedding (i.e."

— article, stated

historical click logs as the main training source

Rejected because: Existing clicks would not capture future natural-language query patterns.

“relying solely on existing click log data would not be sufficient to capture the nuances of future natural language query patterns.”article, stated

Patterns

model-distillation (model-operations)

A powerful teacher model trains aligned retrieval and ranking models, including a small cross-encoder that learns from teacher labels/logits.

“use a variety of fine tuning and distillation techniques so that the retrieval and ranking models are both aligned”article, stated
“provide all logits of the teacher model to the student model (SLM) during training.”article, stated

synthetic-data-generation (data)

Advanced LLMs and a fine-tuned grading model generate/query-member-job policy grades beyond human annotation scale.

“This synthetic data was initially generated using advanced LLMs with prompt templates designed for semantic textual similarity tasks”article, stated
“automated and scalable data annotation (to the tune of millions or tens of millions of grades per day”article, stated

tool-use-orchestration (agent-architecture)

The query engine uses tool calling to fetch profile, preference, graph, and taxonomy context before retrieval.

“To accomplish these goals, we leverage the Tool Calling pattern when querying our fine-tuned LLM.”article, stated
“invokes our graph service to look up the company IDs where they have connections.”article, stated

rag-retrieval (knowledge-grounding)

Suggestion facets are mined from millions of job postings offline, stored in a vector database, and passed to the query engine LLM via RAG.

“These types of attributes are data mined and extracted from millions of job postings offline, stored in a vector database and passed to the query engine LLM via the RAG pattern.”article, stated

semantic-caching (performance)

LinkedIn caches non-personalized queries separately and uses KV caching to reduce duplicate LLM serving work.

“Non-personalized queries, being broadly applicable, are cached separately from personalized queries”article, stated
“KV caching in the LLM serving engine significantly reduces computation overhead”article, stated

Tradeoffs

Split semantic job search into retrieval and ranking.

Chose teacher-aligned retrieval plus ranking models over one large ideal model scoring every query-job pair online.

Rationale: The split moves compute offline and balances accuracy with cost/latency at LinkedIn scale.

“efficiency is achieved by moving as much compute (both training and inference) as possible offline.”article, stated
“This means splitting up that single powerful model into two steps, first retrieval and then ranking.”article, stated

Use exhaustive GPU nearest-neighbor search.

Chose flat-vector exhaustive scan with GPU dense matrix operations over more complex approximate nearest-neighbor index structures.

Rationale: For LinkedIn's constraints, optimized O(n) GPU scanning beat complex indexes on latency while keeping flat-vector management simple.

“In the real world, sometimes O(n) approaches can beat out O(log(n)) when the constant factors are sufficiently different.”article, stated
“retaining the benefits of the simplicity of managing a flat list of vectors.”article, stated

Use supervised distillation and serving optimizations for ranking.

Chose SLM trained from teacher labels/logits with pruning, KV caching, and sparse attention over serving the teacher model for every request.

Rationale: The teacher is too large, slow, and expensive for online ranking, but distillation preserves much of its relevance signal.

“the Teacher model is too large, slow, and expensive to run for every single request”article, stated
“generated a “small” language model (or SLM) that learns from the Teacher while still having close performance.”article, stated

Gotchas (what bit them)

Retrieval and ranking can drift if optimized independently.

Root cause: Different stages historically optimized for different goals across a complex pipeline.

Resolution: Use the same multi-objective optimization framework and align stages through teacher-model distillation.

“each component of the system acting independently from each other as they were optimized for different goals.”article, stated
“To ensure retrieval and ranking are aligned, it is important that retrieval ranks documents using the same MOO that the ranking stage uses.”article, stated

Synthetic grading required explicit product policy before scaling.

Root cause: If humans cannot explain why a match is good versus excellent, an LLM cannot reliably learn the distinction.

Resolution: Codify dozens of grading cases, collect human annotations, then fine-tune an LLM grader on that policy.

“we needed to be explicit about dozens of different cases and how to properly grade them.”article, stated
“If a human can not explain why something is rated “good” vs “excellent,” how could an LLM?”article, stated

Raw embeddings alone cannot satisfy natural-language job criteria.

Root cause: Queries contain strict filters, profile/network context, and semantic preferences in the same sentence.

Resolution: Use a query engine to classify intent, resolve entities, call graph/profile services, and split strict filters from embedding criteria.

“Semantic understanding of the user query is needed to augment the input into query embedding generation and create additional strict filtering queries”article, stated

Approximate vector indexes did not meet all production search constraints.

Root cause: LinkedIn needed low latency, high index turnover, liquidity, and complex hard filters.

Resolution: Use GPU-accelerated exhaustive search over flat vectors with fused kernels and optimized memory layout.

“low latency, high index turn over (jobs are often only live for a few weeks), maximizing liquidity, and ability to do complex hard filters.”article, stated
“by only doing dense matrix multiply operations, investing in fused kernels, and minor sub-partitioning of the data layout”article, stated

Evaluation

LinkedIn evaluates the system through product-policy grades, automated LLM annotation, aggregate and query-type relevance metrics, teacher/student alignment, score calibration, and safeguards for experiments with new features.

Metrics: 5-point grading policy · millions or tens of millions of grades per day · aggregate relevance metric changes · query-type relevance changes · score calibration separating Good, Fair, and Poor matches

3 supporting quotes
“aligned with our new 5-point grading policy.”article, stated
“As we iterate on models, we run automated evaluations to measure aggregate and query-type changes in relevance metrics between models.”article, stated
“score regularization to maintain a well-calibrated output distribution that cleanly separates Good, Fair, and Poor matches”article, stated

Outcomes

The article reports 1.2 billion members, millions of postings, tens of thousands of searches per second, millions/tens of millions of grades per day, and few-millisecond retrieval.

3 supporting quotes
“By reducing the model pipeline complexity by an order of magnitude”article, stated
“This RL-based fine-tuning approach leads to significantly better retrieval performance, more interpretable match scores, and a faster iteration loop”article, stated
“making the job discovery process more intuitive, inclusive, and effective”article, stated