Skip to content

    AI Architect Case Files

    Public Case: LinkedIn Knowledge-Graph RAG for Support

    LinkedIn authors built a knowledge graph from past support tickets for retrieval. What the paper states: method, metrics, and a six-month deployment result.

    By Published 8 min read

    • ai-architect
    • case-file
    • industry-saas-b2b
    • pattern-knowledge-graph-rag
    • failure-retrieval-miss
    • kind-public
    Share

    Public case (sourced). Based on LinkedIn authors' published paper, "Retrieval-Augmented Generation with Knowledge Graphs for Customer Service Question Answering" (Xu et al., SIGIR '24, arXiv 2404.17723); every fact below is attributed to it.

    This case belongs to Data and Retrieval Architecture for AI Systems. Where the paper is silent, this page says so and does not fill the gap. Component names in the diagrams are this course's labels.

    Context

    • Seven LinkedIn authors address customer-service technical support, where, in their words, "swiftly and accurately retrieving relevant past issues is critical for efficiently resolving customer inquiries".
    • The knowledge source is a body of historical issue-tracking tickets. The authors name Jira as an example of such a system.

    Problem statement

    The authors state two limitations of conventional retrieval-augmented generation (RAG) over tickets:

    1. Compromised retrieval accuracy from ignoring structure. Issue tickets have inherent structure and links to each other ("issue A is related to/copied from/caused by issue B"). Compressing them into text chunks, the authors say, loses that information.
    2. Reduced answer quality from segmentation. Fixed-length segments can disconnect related content. Their example is a ticket that describes the issue at the start and the solution at the end, which may be split so that critical parts of the solution are missing.

    The goal is a retrieval method that keeps intra-issue structure and inter-issue relations. Success is measured with retrieval metrics (MRR, Recall@K, NDCG@K), text-generation metrics (BLEU, ROUGE, METEOR) and per-issue resolution time in production.

    Constraints

    The paper states these constraints:

    • Embedding models have context-length limits, which is why pipelines segment tickets.
    • The system must serve online: a fallback to text-based retrieval "for robust online serving" covers a query that fails to execute.

    The paper is silent on latency, cost, privacy, access control and ticket volume. Qdrant and Neo4j appear only as examples, not as LinkedIn's stack.

    Why the traditional approach fell short

    The baseline is conventional text-based embedding-based retrieval (EBR). Baseline and new method used the same LLM (GPT-4) and embedding model (E5).

    Baseline stage What happens
    Ingest Tickets are treated as plain text, split into chunks that fit the embedding model, and each chunk becomes an embedding vector
    Query The most relevant chunks are retrieved and fed to an LLM as context

    The authors attribute its weaknesses to the two limitations above.

    Options considered

    The paper has no formal options analysis. The alternatives it evaluates:

    Option What the paper says Verdict in the paper
    Manual methods, no tool (the non-AI option) One of two randomly split groups in the deployment The control group
    Text-based EBR over ticket chunks (the simpler AI option) The offline baseline Outperformed on every reported metric
    RAG over a knowledge graph built from tickets The authors' method Deployed

    Solution architecture

    The authors describe two phases: constructing the knowledge graph from historical tickets, and retrieval and answering at query time.

    Figure 1. Knowledge graph construction and the query path, as described in the paper

    Knowledge graph RAG as described in the paperDocument store to Worker; Worker to Vector index (embeddings); Worker to Graph database (trees, links); Orchestrator to Model gateway; Orchestrator to Vector index (find tickets); Orchestrator to Graph database (run graph query); Orchestrator to Baseline text retrieval (fallback on failure)CONSTRUCTION, AHEAD OF TIMEDocument store: historical ticketsDocument storehistoricalticketsWorker: parse, link, embedWorkerparse, link,embedVector index: node embeddingsVector indexnode embeddingsGraph database: ticket trees, linksGraph databaseticket trees,linksOrchestratorOrchestratorModel gateway: parse, query, answerModel gatewayparse, query,answerBaseline text retrievalBaseline textretrievalembeddingstrees, linksfind ticketsrun graph queryfallback on failure

    How to read this: the left side is built ahead of time from tickets, the right side runs per question, and the red dashed arrow is the fallback.

    Figure 2. The runtime path in the paper's own order

    sequenceDiagram accTitle: Query path of the knowledge graph RAG method accDescr: The orchestrator asks a model to turn the question into entities and intents. For each entity it computes cosine similarity against nodes of the matching section in the vector index and sums the scores per ticket. A model then rewrites the question with the ticket id and writes a Cypher query, which runs on the graph database. A model writes the answer from the result. If the query fails, text-based retrieval is used. autonumber participant C as Client app participant O as Orchestrator participant M as Model gateway participant V as Vector index participant G as Graph database C->>O: Customer-service question O->>M: Parse into entities and intents M-->>O: Entity map and intent set loop each entity O->>V: Cosine similarity to nodes of that section V-->>O: Node scores end Note over O: Sum scores per ticket, keep the top tickets O->>M: Rewrite with ticket id and translate to a graph query M-->>O: Cypher query O->>G: Run the query alt Query runs G-->>O: Values from the ticket tree O->>M: Write the answer from the values and the question M-->>O: Answer O-->>C: Answer else Query fails Note over O,V: Fall back to text-based retrieval O-->>C: Answer from the baseline path end

    How to read this: the loop is entity-by-entity matching, the note is the ticket ranking, and the alt block is the fallback.

    How AI solved it, step by step

    This follows the paper's Section 3 and Figure 1; the example is the paper's own. The first track is the query path of Figure 2; the second is the build done ahead of time.

    Knowledge-graph RAG, as the paper describes it (interactive when JavaScript is on)

    Answer a question

    1. Question arrives. A customer-service question reaches the Orchestrator.
    2. Parse the question. An LLM turns the query into entities (template sections mapped to values) and intents (the sections the answer should cover).
    3. Rank tickets. For each entity, cosine similarity is computed between its value and the nodes of the matching section. Node scores are summed per ticket; the top tickets are kept.
    4. Write the graph query. The LLM rewrites the question with the ticket id and translates it into a graph query language such as Cypher for Neo4j.
    5. Run the query. The graph database returns values from the ticket tree. If execution has problems, the system reverts to text-based retrieval.
    6. Answer. The LLM writes the answer from the retrieved values and the original question.

    Build the graph

    1. Build the tree. Each historical ticket becomes a tree of sections such as Summary, Description and Priority. Rules extract predefined fields such as code sections found by keywords; an LLM, guided by a YAML template of the sections support staff routinely use, handles the rest.
    2. Link tickets. Explicit links come from tracker fields. Implicit links connect tickets whose title embeddings pass a cosine-similarity threshold. In the paper's Figure 1, ticket ENT-22970 has a direct clone link to PORT-133061 and is implicitly connected with ENT-1744 and ENT-3547.
    3. Embed nodes. Text-rich nodes (summary, description, steps to reproduce) are embedded with models such as BERT and E5 and stored in a vector database (Qdrant is the paper's example).

    Under the hood

    The central step ranks tickets by section-specific embedding matches, not whole-chunk similarity. For each entity pair (a section key and a value), cosine similarity is computed between the value and all graph nodes of that section, and node scores are summed per ticket. The paper's stated premise is that "the occurrence of multiple query entities is indicative of pertinent links".

    The second step is retrieval by graph query. For the paper's example, "how to reproduce 'ENT-22970'", the generated Cypher is:

    MATCH (j:Ticket {ticket_ID: 'ENT-22970'})
    -[:HAS_DESCRIPTION]-> (description:Description)
    -[:HAS_STEPS_TO_REPRODUCE]-> (steps_to_reproduce: StepsToReproduce)
    RETURN steps_to_reproduce.value

    Because the answer is read from a named section of one ticket, a problem and its fix are not split by a chunk boundary; the authors say preserving the logical coherence of ticket sections is how their method overcomes the second limitation. Cosine similarity is explained in Under the hood: Embeddings and similarity metrics.

    What went wrong / failure modes

    Source What it says
    What the paper reports One failure path: if query execution encounters issues, a fallback reverts to baseline text-based retrieval. Future work: an automated mechanism for extracting graph templates, dynamic updates of the graph based on user queries, and applicability beyond customer service
    What the paper does not say How often the fallback fires, how often the generated graph query is wrong, how wrong answers were handled, the evaluation-set size, the number of tickets kept, the implicit-link threshold, how the graph is refreshed as tickets arrive, or how access is controlled
    This page's reading, not claims from the paper The design implies dependencies: an LLM-generated query that can fail or return the wrong section, a fixed section template that must match how tickets are written, and a graph only as current as its last build. Each deserves a test and a named fallback

    Results

    Only numbers published in the paper are given. The offline evaluation used a curated "golden" dataset of typical queries, tickets and authoritative solutions; its size is not given.

    Retrieval (the paper's Table 1)

    System MRR Recall@1 Recall@3 NDCG@1 NDCG@3
    Baseline 0.522 0.400 0.640 0.400 0.520
    Knowledge-graph method 0.927 0.860 1.000 0.860 0.946

    Answer quality (Table 2)

    System BLEU METEOR ROUGE
    Baseline 0.057 0.279 0.183
    Knowledge-graph method 0.377 0.613 0.546

    The authors report that the method surpasses the baseline by 77.6% in MRR and by 0.32 in BLEU; the table gives (0.927 - 0.522) / 0.522 = 0.776 and 0.377 - 0.057 = 0.32.

    Deployment (Table 3). The authors say the method was deployed in LinkedIn's customer service team for approximately six months across multiple product lines; the team was split randomly into a group using the system and a group using traditional manual methods.

    Group Mean P50 P90
    Tool not used 40 hours 7 hours 87 hours
    Tool used 15 hours 5 hours 47 hours

    The authors report a 28.6% reduction in median resolution time per issue; (7 - 5) / 7 = 0.286. The paper does not report group sizes, ticket counts or a significance test.

    Tradeoffs and when NOT to use this approach

    This page's reading (the paper has no limitations section):

    • The method assumes documents with stable, named sections and explicit links. For free-form prose a plain hybrid retrieval pipeline is simpler.
    • If tickets change constantly, plan graph rebuilds.
    • The paper gives no cost or latency figures; compare on your own data.

    Design rules extracted

    Drawn from the paper's design, not stated by the authors as rules.

    1. Parse documents along the structure they already have before chunking, so a problem and its solution stay together.
    2. Keep explicit links between documents as graph edges, and add similarity links only with a threshold you tune.
    3. Match each part of the question to the field it describes, not to whole-document text.
    4. Keep a fallback to simpler retrieval for when a generated graph query fails.
    5. Measure retrieval and generation with separate metrics offline, then confirm the effect with a randomised comparison in production.

    Sources

    Last verified: 2026-10-22

    Ask about this article

    Get answers grounded in this post. AI-generated — based on this article, and may be imperfect.

    Scaled AI Weekly

    Enjoyed this? Get more like it every Monday.

    Real architecture decisions, LLMOps patterns that survive production, and engineering leadership advice — from 12+ years of building at enterprise scale. Free. No spam. Unsubscribe anytime.

    Get new articles by email

    Free. We email a confirmation link first, and you can unsubscribe from any email.

    Join engineers building production AI systems

    Comments