Incredibly Simple Semantic Search Using Langchain, Elasticsearch & OpenAI

<p>Setting up a semantic search functionality is easy using&nbsp;<a href="https://www.langchain.com/" rel="noopener ugc nofollow" target="_blank">Langchain</a>, a relatively new framework for building applications powered by Large Language Models.</p> <p>Semantic search means performing a search where the results are found based on the meaning of the search query. This is in contrast to a simple keyword search, which will only find results that match exactly to the search term entered. A good example of what semantic search enables is that if we search for &ldquo;car&rdquo;, we can not only retrieve results for &ldquo;car&rdquo; but also &ldquo;vehicle&rdquo; and &ldquo;automobile&rdquo;.</p> <p>The underlying process to achieve this is the encoding of the pieces of text to&nbsp;<em>embeddings</em>, a vector representation of the text, which can then be stored in a vector database. When a search is performed, the search term is also encoded into it&rsquo;s embeddings and the closest vector representations is searched for in our database.</p> <p><a href="https://medium.com/@michael.leigh.stewart/incredibly-simple-semantic-search-using-langchain-elasticsearch-openai-f55528efdc94"><strong>Website</strong></a></p>