Vectra is a vector database, similar to pinecone, that uses local files to store the index and items. Supports most of the features of pinecone, including metadata filtering.
The repo is here:
Cool, working on something similar as we speak. How are you creating your vectors? I’m trying to use USE-lite, thought with only 8000 tokens I’m very curious how well it will work.
In my sample I’m using OpenAI’s embeddings API:
async function getVector(text: string) {
const response = await api.createEmbedding({
'model': 'text-embedding-ada-002',
'input': text,
});
return response.data.data[0].embedding;
}
Hmm, that’s a cool idea. ada is fairly cheap. For some reason, getting use-lite to work inside a chrome extension is near impossible.
You could probably easily create a version of Vectra that runs in a browser and uses Browser Local Storage. I didn’t have a need for that and didn’t want to have to polyfill fs
when running locally. You’ll need to call a service for your embeddings but otherwise you could do everything else browser side.
Is this meant to work with Dissecting Auto-GPT's prompt?
Yeah I built it so I could add support for infinite commands… I’m not 100% how well its going to work though to be honest. There’s a bit of a chick-and-the-egg problem. You ideally want to search for commands based off the AutoGPT’s current thought but you need to feed it the right commands before it thinks. I’m going to start with selecting commands based off the initial goal and see how it goes from there.
My general suggestion to folks going down this path is to take a very narrow but compelling problem you’re interested in and solve that first, and the slowly broaden out / generalize to other problems, learning as you go.
I think the approach of trying to do too much first is causing some misadventures.
There’s now a python port of Vectra more language bindings welcome
Cool, I’ll check this out soon. I’m creating a native app that will manage a local semantic network and been looking for a vector database that can be embedded :). ChatGPT bing search brought me here btw.
I’ve done a ton of work on Vectra over the past month or so and owe a round of document updates to highlight all the new features. Vectra now sports a new CLI for managing a LocalDocumentIndex. You just need to give it an OpenAI key and a list of web pages or local file folders and it will crawl everything into the index. In my testing it’s good with projects containing up to around 2000 files. Beyond that you should look at other options.
Brian, the developer doing the python version, has been doing a ton of work as well and I believe the python version is at full parity with the JS version minus the CLI support. That’s ok though because you can use the node based Vectra CLI to build a document index that you can then read using the python version of Vectra. The Python version also supports OSS based embeddings so you have a much broader selection of embeddings you can use with Python.
The JS version of Vectra is up to around 8000 weekly downloads and you can install the CLI using “npm install -g Vectra” then run “Vectra —help” for instructions. The python version is now on PyPy under Vectra-py
Oh yeah… Microsoft is working to port Vectra to .NET as well so look for that to drop soon.
Hey
I found your module Vectra while searching for a vector database which works on native filesystems. The fact it was typescript is a plus!
I’m trying to use it build a CRUD API layer around it to the effect of “vectors as a service” along with transformers.js, however I’m facing an issue in the POST request to simply add items to the index. My functions to add items and upsert items work when called from my core module but for some reason (probably due to the async nature and me being new to javascript and typescript), the POST request doesn’t work (just inserts a single element instead of the array).
In the code I confirm through console.log statements that it iterates over all the strings passed in the POST request but the issue is still there which is baffling to me.
Could I share this with you and get some help/feedback please?
Of course. It should be working for you so please sync with me to get it working