Episode 6 — Queries
Episode 6 — Queries
In the previous episode, we learned that every word examines the other words in a sentence before deciding what it means. But that raises an important question. What exactly is a word looking for? The answer is called a Query. A query represents the information that a word is searching for. Imagine you're reading the sentence: "The bank approved the loan. " When the transformer reaches the word bank, it needs additional information to determine its meaning. Is this a financial bank? Or the side of a river? To answer that question, the word bank sends out a query. You can think of this query as asking, "Which words in this sentence can help me understand my meaning? " Every word creates its own query. Each query is different because every word is trying to understand something different about itself. But asking a question is only half the process. The transformer still needs a way to determine which words actually have the information being requested. That's where Keys come in. In the next episode, we'll see how every word provides a key that helps other words decide whether it contains the information they're looking for.