vectara / create-ui

Generate a working React codebase for a range of generative and semantic search UIs
https://vectara.github.io/create-ui
Apache License 2.0
69 stars 12 forks source link

Welcome to Create UI

Create-UI

Create-UI is the fastest way to generate a Vectara-powered sample codebase for a range of user interfaces:

Use this tool to:

[!TIP]

Looking for something else? Try another open-source project:

  • React-Chatbot: Add a compact Vectara-powered chatbot widget chat to your React apps.
  • React-Search: Add Vectara semantic search to your React apps with a few lines of code.
  • Vectara Answer: Demo app for Summarized Semantic Search with advanced configuration options.
  • Vectara Ingest: Sample templates and crawlers for pulling data from many popular data sources.

How to use

1. Install Node and NPM

Create-UI expects you to have Node v18 or higher and NPM installed on your system.

2. Generate a codebase

npx @vectara/create-ui

Follow the prompts in the command line to generate a React codebase. You can choose to use our sample data, which is ideal for folks who don't have a Vectara account yet. If you already have data in Vectara you can configure the UI to connect to it.

When the prompts are complete, run the build command provided to you. You'll see the UI running in your browser.

Types of UIs

Chat UI

Chat UI screenshot

The Chat UI is characterized by:

Semantic Search UI

Semantic Search UI screenshot

The Semantic Search UI is characterized by:

A user will typically scan the list for relevant results and dig deeper into any results that look interesting. They'll try variations on the same basic query to make sure they find as many potentially useful results as possible.

Summarized Semantic Search UI

Summarized Semantic Search UI screenshot

The Summarized Semantic Search UI is characterized by:

A user will typically scan the summary for points of interest, which is faster than reviewing the list of search results. If an aspect of the summary catches their eye, they'll dig deeper into the cited search result. They'll repeat this pattern until they've reviewed all of the interesting information that was relevant to their query.

Question and Answer UI

Question and Answer UI screenshot

The Question and Answer UI is characterized by:

A user will typically scan the answer to see if it truly answers their question. They'll use the citations to verify that the answer is grounded in facts. If the answer doesn't fully answer their question they'll try again with a differently-worded question.

Set up your data in Vectara

You can configure a Create-UI app to use our sample data or to pull data from your Vectara corpus. To set this up:

  1. Create a free Vectara account.
  2. Create a corpus and add data to it.
  3. Create a QueryService API key.

Pro-tip: After you create an API key, navigate to your corpus and click on the "Access control" tab. Find your API key on the bottom and select the "Copy all" option to copy your customer ID, corpus ID, and API key. This gives you all the data you need to configure a Create-UI app.

Copy all option

How to use metadata

Vectara enables you to define metadata on your documents. Create-UI apps behave differently based on the presence of specific metadata fields:

License

Create-UI is an open-sourced software licensed under the Apache 2.0 license.

This repository contains sample code that can help you build UIs powered by Vectara, and is licensed under the Apache 2.0 License. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.