NeuralDBVectorStore(
self,
db: ndb.NeuralDB,
)| Name | Type |
|---|---|
| db | ndb.NeuralDB |
Vectorstore that uses ThirdAI's NeuralDB.
To use, you should have the thirdai[neural_db] python package installed.
Example:
.. code-block:: python
from langchain_community.vectorstores import NeuralDBVectorStore from thirdai import neural_db as ndb
db = ndb.NeuralDB() vectorstore = NeuralDBVectorStore(db=db)
NeuralDB instance
Create a NeuralDBVectorStore from scratch.
To use, set the THIRDAI_KEY environment variable with your ThirdAI
API key, or pass thirdai_key as a named parameter.
Create a NeuralDBVectorStore with a base model from a saved checkpoint
To use, set the THIRDAI_KEY environment variable with your ThirdAI
API key, or pass thirdai_key as a named parameter.
Return VectorStore initialized from texts and embeddings.
Run more texts through the embeddings and add to the vectorstore.
Inserts files / document sources into the vectorstore.
The vectorstore upweights the score of a document for a specific query. This is useful for fine-tuning the vectorstore to user behavior.
Given a batch of (query, document id) pairs, the vectorstore upweights the scores of the document for the corresponding queries. This is useful for fine-tuning the vectorstore to user behavior.
The vectorstore associates a source phrase with a target phrase. When the vectorstore sees the source phrase, it will also consider results that are relevant to the target phrase.
Given a batch of (source, target) pairs, the vectorstore associates each source phrase with the corresponding target phrase.
Retrieve {k} contexts with for a given query
Saves a NeuralDB instance to disk. Can be loaded into memory by calling NeuralDB.from_checkpoint(path)