Uncategorized
The Great Search Disruption
June 8, 2023 by Ofer Mendelevitch CJ Cenizal | 5 min read
Read NowBlog Post
Sample App
A sample app demonstrating how to build a search experience powered by Vectara
April 4, 2023 by Ofer Mendelevitch CJ Cenizal
Vectara is an API-based managed platform for building LLM-powered search applications. It’s easy to use and provides state-of-the-art relevance for search results.
When thinking about search, most developers think of the more traditional “Keyword-based search” but LLM-powered search is much more than that – it’s a substantial (not incremental) improvement in search relevance, since results are based on the “meaning” of your search query, and not hurdled by polysemous or homograph keywords or typos.
Applications of LLM-powered search include semantic search, question answering, conversational AI chatbots, product reviews, eCommerce, and many others.
Part of the strength of Vectara’s “search pipeline” platform is that we manage all the complexity for you, the developer, and you don’t have to stitch together various pieces of the search application like vector databases and embedding providers. The Search UI is one piece we don’t directly manage for you, since in most cases it needs to be connected to your internal application.
Today, we’re excited to launch our Search UI sample application. This application demonstrates how to build a modern search user interface that utilizes Vectara’s Search API while delivering super-fast results and displaying them for the user.
We built the Search UI application using NodeJS and React. We use Docker to package all the necessary code and components. You can run this Docker container locally, or on any cloud platform.
To get started, clone the Search-UI Github repository
git clone https://github.com/vectara/Search-UI
And then go to the folder just created:
cd Search-UI
The repo is organized as follows:
Now let’s try to run the Search UI for searching the content of Vectara’s website. For this purpose, we’ve indexed all of the documents on www.vectara.com into a corpus with corpus_id=1. Now all we have to do is build the Docker container:
sh docker/build.sh
And then run it using the desired configuration file:
sh docker/run.sh config/vectara-website-search.yaml
The script opens up a web browser pointing to localhost:80. After a few seconds the Search UI app will load automatically:
As you can see there’s a search box, where you can type in any query, as well as four suggested queries underneath the search box like “What is Neural Search” or “how do I index a document?”. Note that Vectara’s engine is multi-lingual so search queries can also be for example in French as shown here.
Now if you click on “what is neural search?” (or type it in) -you’ll see the search results from Vectara:
Let’s look more closely at the example YAML configuration file:
config/vectara-website-search.yaml
corpus_id: 1
customer_id: 1169579801
auth_api_key: "<A-VECTARA-SEARCH-API-KEY>"
search_title_pre: "Conversational search demo across"
search_title_inner: "Vectara website"
search_title_post: "content"
search_title_url: "https://www.vectara.com"
Q1: "what is neural search?"
Q2: "how do I index a document?"
Q3: "¿Quién es Amr?"
Q4: "who is Amr?"
We see that the configuration file controls various aspects of the Search UI:
Once you index your own documents with Vectara’s Indexing API you can create another configuration file similar to the one above, and change the parameters to fit the new corpus.
How is this configuration file used in Docker? The prepare_config.py python script is used to transform all the configuration parameters into environment variables, and also add the REACT_APP prefix. These environment variables are then fed into the Docker container upon execution, so that the React app can read them in real time and display the appropriate text in the user interface.
Vectara’s search UI has an Apache 2.0 license and is meant to provide an example of a modern search UI using Vectara to power the search. If you’re a JavaScript / front-end developer, you might benefit from using this repository as a starting point, and making changes to develop your own application. Others may just want to use this out-of-the-box and control the behavior using the configuration file.
We wanted to highlight a few areas specific to Vectara in the codebase:
Want to see additional features, or make some changes to the source code? We’d love to hear from you! Just hop on over to the Search-UI Github repository and submit a PR or create an issue.
Uncategorized
June 8, 2023 by Ofer Mendelevitch CJ Cenizal | 5 min read
Read Nowgrounded generation
by Ofer Mendelevitch | 2 min read
Read Nowgrounded generation
May 31, 2023 by Justin Hayes | 13 min read
Read Nowgrounded generation
May 30, 2023 by Shane Connelly CJ Cenizal | 3 min read
Read NowLarge Language Models
May 18, 2023 by Ofer Mendelevitch | 6 min read
Read NowLarge Language Models
May 17, 2023 by Ofer Mendelevitch | 7 min read
Read NowLarge Language Models
May 16, 2023 by Ofer Mendelevitch | 8 min read
Read Nowgrounded generation
May 2, 2023 by Ofer Mendelevitch | 10 min read
Read NowLarge Language Models
March 28, 2023 by Suleman Kazi Adel Elmahdy | 9 min read
Read Now