embedding
Adding Data

Embedding Data in ReLLM

In order for ReLLM to provide data to the Large Language Model, you first need to embed that data within ReLLM. This allows us to process the information and store it in such a way that we can identify valid context and help the LLM answer your users questions.

Date embedded within ReLLM is encrypted at the row level within the database. Keys are not stored within the database, and are protected with best practices. The data you store within the text field is encrypted. While the metadata field is not as it needs to be used for searching.

Permissions

The permissions array is a list of strings that you provide that we use to protect your data. Users within your application will only be provided the context that they have the permissions to see.

In order to view the data, the user must have all of the permission bits provided.

Metadata

The metadata object is used in order to delete embedded data, as well as limit the chat context beyond that of the users permissions.

JS Package

import ReLLM from "rellm";
 
const rellm = new ReLLM(process.env.RELLM_API_KEY)
 
rellm.embed('<text to embed>', ["permission 1", "permission 2"], {metadata_key: 'metadata_value'})

REST Request

curl -X POST -H 'Content-Type: application/json' -d '{"text": "<text to embed>","permissions":"["permission 1", permission 2"]", "metadata": {"key": "value"}}' https://rellm.ai/api/embed