concept sparse vector representation in category AI

This is an excerpt from Manning's book AI-Powered Search.
The key to understanding the calculation in the last section is understanding that the only features that matter are the ones shared between both the query and a document. All other features (words appearing in documents that don’t match the query) have zero impact on whether one document is ranked higher than another. As a result, we can remove all of the other insignificant terms from our vector to simplify the example, converting from a dense vector representation to what is known as a sparse vector representation.
In the last section, we worked with dense vector representations, which are vector representations including a value for every possible dimension, even if many of those values are
0(see Figure 3.1). It is also possible to create a much smaller vector representation that only contains useful values, however. A vector representation only containing the non-zero values for a calculation is known as a sparse vector representation, as shown in Figure 3.2.Figure 3.2. Sparse vector representation, which only contains the "present" features, unlike dense vector representations which also contain the
0valued entries for every feature.![]()
In most search engine scoring operations, we tend to deal with sparse vector representations because they are more efficient to work with when we are only dealing with scoring based upon the small number of features.