Martin Keen, a Master Inventor at IBM, breaks down the fundamental challenges and solutions surrounding the integration of external data into Large Language Models (LLMs). Keen highlights the inherent limitation of LLMs: their knowledge is frozen at the time of their last training data cutoff. This means they cannot access or process information that has emerged since then, creating a significant hurdle for applications requiring up-to-date or specific context.
Understanding LLM Limitations
Keen explains that LLMs, by their nature, are static models. They possess all the knowledge they were trained on, but they have no awareness of anything that has happened since their training data was collected. This static nature presents a problem when users need LLMs to interact with current events, proprietary company data, or any information not included in the original training corpus. To address this, two primary approaches have emerged: Retrieval Augmented Generation (RAG) and simply increasing the context window size.
Retrieval Augmented Generation (RAG) Explained
Keen illustrates the RAG process, which he describes as a foundational truth about how we get the right data into an LLM at the right time. The RAG approach involves several key steps:
The full discussion can be found on IBM's YouTube channel.
- Chunking: Large documents are broken down into smaller, manageable pieces or 'chunks'.
- Embedding: These chunks are then processed by an embedding model, which converts them into numerical vectors.
- Vector Database Storage: These vectors are stored in a specialized vector database.
- Semantic Search: When a user asks a question, their query is also converted into a vector. A semantic search is performed in the vector database to find the chunks whose vectors are most similar to the query vector.
- Context Injection: The most relevant chunks are then injected into the LLM's prompt alongside the user's original query.
Keen notes that while this method works, it relies heavily on the effectiveness of the retrieval logic. He points out the risk of the 'retrieval lottery,' where the semantic search might fail to identify the most relevant information, leading to a 'silent failure' where the LLM provides an answer based on incomplete or incorrect context.
