ChatGPT has taken the world by storm in recent months, and it's not hard to see why. With its ability to generate poems and other written content, it's an impressive tool. However, as with any AI technology, its results are only as good as the data you provide. To get the best results, you need to give ChatGPT as much relevant context as possible.
If you want to skip the blog and try it, scroll down to see the video walkthrough and sign up link.
We have two options with GPT alone:
- Use ChatGPT out-of-the-box and rely on the data it’s been trained on, but know it cannot work with knowledge it doesn’t know
- Try to provide your data to ChatGPT but run out of token limit or hit major costs
To work around these limitations, we need to find a way to provide only the most relevant information to ChatGPT. That's where vector embeddings come in.
Vector embeddings allow us to represent data in multiple dimensions, so we can find similarities between different types of data beyond just keywords. This makes it possible to extract only the most relevant sections of our data to provide as context for ChatGPT.
The steps we need are as follows:
- Perform vector search query on docs to extract most relevant sections
- Use top N most relevant sections as context for GPT
- Get answer
However, before being able to do this we need to be able to store our data in place that can run a vector search, encode it into vectors and finally execute the search and GPT request to get the response. There are some great tutorials on how you can do this yourself with code and writing your own infrastrucure, here's one that just came out by OpenAI on the same day as this blog. If you'd instead prefer to this without writing code or managing infrastructure then read on - it can take less than 5 minutes.
At Relevance AI, we simplify this process by offering a no-code dashboard or API that ingests your data, vectorizes it on demand, and automatically extracts the most relevant sections to use as context for ChatGPT. We call these "Workflows" where each one can process and transform data at scale. We can upload data via a CSV file or use a workflow to ingest data from a source like a website. Once we've ingested the data, we can run "vectorise text" workflow to convert the data into vectors. Once that's done, we can go head to the Dashboard and on the Document View, use Ask Relevance. You can now also use the API request to implement it in your own site.
Check the video below for a brief walkthrough on how you can try it out. If you'd like to then try it for yourself, you can sign up here for free - make sure tolet us know what you create!
Relevance AI is a no-code platform for AI workflows that can run on a single sentence or millions of documents. We’ve built it with AI in-mind knowing that as the industry keeps advancing and more technologies are offered, more people and companies are going to need to be able to access to them.