This article details the system architecture of Uber's internal AI assistant, Genie, which leverages Retrieval-Augmented Generation (RAG) to answer engineering support questions. It focuses on how Genie integrates knowledge preparation, information retrieval using embeddings, and LLM-based answer generation to address the challenge of scattered documentation and reduce on-call burden in a large organization. The design highlights the ETL pipeline for knowledge ingestion, vector database for semantic search, and strategies to mitigate LLM hallucinations.
Read original on ByteByteGoLarge organizations like Uber face significant challenges in managing and disseminating internal engineering knowledge. With numerous platform teams supporting thousands of developers, questions about configuration, errors, and features are constant. This often leads to platform teams spending considerable time on repetitive support via channels like Slack, rather than focusing on development. Existing documentation is frequently scattered across wikis and internal forums, making it difficult to find, thus encouraging direct human queries.
Uber's Genie addresses this by combining information retrieval with large language models (LLMs) using a Retrieval-Augmented Generation (RAG) approach. Unlike fine-tuning an LLM, RAG allows Genie to query an external knowledge base for relevant information at query time and then feed that information to a general-purpose LLM to generate an answer. This avoids the significant compute and data labeling overhead of fine-tuning and allows for easier knowledge updates.
Why RAG over Fine-Tuning?
RAG enables systems to utilize current, domain-specific knowledge without retraining the entire language model. It's particularly effective for rapidly changing data or proprietary information, as updates to the external knowledge base immediately improve retrieval without costly model updates. This significantly reduces time-to-market and operational costs compared to frequent fine-tuning.
To combat LLM hallucination, Genie explicitly provides the LLM with retrieved results as separate sub-contexts, each linked to its source URL. This provides boundaries for the model and allows users to verify information. If Genie cannot answer, it provides an option to ask a human. Uber also collects feedback and continuously evaluates Genie's performance by checking both retrieval quality (suitable passages) and generation quality (adequate answers).