Netflix builds natural language Graph Search using LLMs and RAG to replace structured DSL query builders
Netflix's internal Graph Search platform required users to interact via a structured DSL, forcing them to learn bespoke UI components across many applications and creating bottlenecks for subject matter experts who needed to translate their intent into complex queries.
How it works
Common implementation structure
How this type of workflow is generally built, generalized across documented cases — not tied to any one vendor's stack. Click any stage to read what happens there. Specific products that implement these stages appear in “Tools commonly seen” below.
Stage 1 · Natural language query input
A user's natural language question with optional @mentions is provided as input along with the Graph Search index context.
Tools used
LLMRAGvector storeAbstract Syntax Tree (AST) parserGraphQL
Outcome
Netflix built a text-to-query system that converts natural language into Graph Search Filter DSL using RAG for field and controlled vocabulary context, with deterministic validation and transparent UI Chips and Facets so users can verify and trust generated queries.
What failed first
The naive approach of providing all index metadata and controlled vocabulary values as full context to the LLM worked for simple cases but did not scale, increasing latency, decreasing filter correctness, and causing the LLM to frequently hallucinate values that did not exist.