Case Study

Extracting a Context Window from a Token Matrix

An engineer is processing the sentence 'The quick brown fox jumps over the lazy dog'. Each word is converted into a row vector and stored in a matrix E\mathbf{E}, where the vectors are indexed from 1 to 9 corresponding to their position in the sentence. The engineer needs to extract a context window of size 3 for the target word 'jumps'. This window must include the target word and the two words that come just before it. What is the correct slice notation to select this specific sub-matrix from E\mathbf{E}? Explain your reasoning.

0

1

Updated 2025-10-08

Contributors are:

Who are from:

Tags

Ch.2 Generative Models - Foundations of Large Language Models

Foundations of Large Language Models

Foundations of Large Language Models Course

Computing Sciences

Application in Bloom's Taxonomy

Cognitive Psychology

Psychology

Social Science

Empirical Science

Science