Quantum-inspired algorithms represent an important direction in modern software information technologies that use heuristic methods and approaches of quantum science. This work presents a quantum approach for document search, retrieval, and ranking based on the Bell-like test, which is well-known in quantum physics. We propose quantum probability theory in the hyperspace analog to language (HAL) framework exploiting a Hilbert space for word and document vector specification. The quantum approach allows for accounting for specific user preferences in different contexts. To verify the algorithm proposed, we use a dataset of synthetic advertising text documents from travel agencies generated by the OpenAI GPT-4 model. We show that the "entanglement" in two-word document search and retrieval can be recognized as the frequent occurrence of two words in incompatible query contexts. We have found that the user preferences and word ordering in the query play a significant role in relatively small sizes of the HAL window. The comparison with the cosine similarity metrics demonstrates the key advantages of our approach based on the user-enforced contextual and semantic relationships between words and not just their superficial occurrence in texts. Our approach to retrieving and ranking documents allows for the creation of new information search engines that require no resource-intensive deep machine learning algorithms.
Read full abstract