Brute-force search compares candidates directly, usually checking every available possibility until it finds the best match. It favors exactness and simplicity over speed at scale. section 4.8.1
Applied systems use the technique in two especially clear ways:
- A chatbot can compare an input with stored statements using Levenshtein distance, then reuse the response attached to the closest match. section 1.9
- Semantic search can compare a query vector with every document vector using cosine similarity, producing precise matches without an index. section 4.8.1
- The trade-off is structural: processing every candidate requires O(N) work per query, so performance grows only linearly with the corpus. section 4.8.1
From chatbot replies to semantic retrieval
ChatterBot can support a convincing conversation by searching its statement–response database for the closest input, without tokenization or feature generation. The same direct-search idea becomes costly when matching a query against many high-dimensional document vectors, motivating locality-sensitive hashing and approximate nearest-neighbor methods. section 1.9 section 4.8.1
Figure 4.5 Semantic search accuracy deteriorates at around 12 dimensions
Use the accuracy figure to relate exhaustive exact matching to the practical need for approximate search in higher-dimensional vector spaces. section 4.8.1






