Use case example – search enhanced by GenAI
To illustrate a real-time and a batch use case, we are going to work on an example of a company that uses GenAI to enhance its website search experience. In this case, the document ingestion will be a batch process, and the search itself will be real-time.
Imagine a company that aims to enhance its website’s search experience by leveraging GenAI technologies. In this scenario, the company’s objective is to provide more comprehensive and relevant search results to its users, going beyond simple keyword matching and delivering contextually appropriate and natural language responses.
The document ingestion process, which involves indexing and processing the company’s content corpus (for example, product descriptions, knowledgebase articles, product manuals), would be a batch operation. This step would involve techniques such as text extraction, entity recognition, topic modeling, and semantic embedding generation for the entire corpus of documents. The embeddings, which capture the semantic meaning and context of the documents, would then be stored in a vector database or other appropriate data store.
During the real-time search experience, when a user submits a query on the company’s website, the query will undergo prompt pre-processing, which could include query rewriting, intent detection, and embedding generation. The generated query embedding would then be used to retrieve the most relevant documents from the vector database, based on semantic similarity. These retrieved documents would serve as the knowledge source for the GenAI model.
The GenAI model would then generate a natural language response based on the retrieved documents and the user’s query. This response could take the form of a concise summary, a detailed answer, or even a conversational dialogue, depending on the requirements and the tone the company decides to set.
The real-time post-processing stage would then kick in, formatting the generated response for optimal presentation on the website. This could involve techniques such as response ranking, result structuring (for example, breaking down the response into sections or bullet points), and rendering with appropriate markup or visual elements.
By combining the batch processing of document ingestion with real-time query processing and generation, the company can deliver a seamless and enriched search experience to its users. The batch processing ensures that the company’s content corpus is thoroughly indexed and semantically understood, while the real-time components leverage this knowledge to provide relevant and natural language responses tailored to each user’s query.