For Storing Documents DB
In Nestbox AI, document storage and retrieval are handled by deploying dedicated vector database instances, such as ChromaDB. These databases allow you to store documents as vector embeddings and perform efficient similarity searches across your content.
This guide walks you through the general process of:
- Creating a runtime instance for document storage
- Setting up a collection
- Adding documents
- Performing a basic search
1. Create a Runtime Instance
- Navigate to Compute > Machine Images in the dashboard.
- Select an appropriate machine image for document storage — for example, ChromaDB.
- Click Create Instance.
- Configure your machine instance:
- Set a Name for your instance.
- Specify any required resources (e.g., number and type of GPUs, CPU type, disk size).
- Confirm and launch the instance.
Once the instance is running, it will be listed under Compute > Runtime Instances. You can also find it under the Document section, where document operations are managed.
2. Create a Collection
After your runtime instance is active:
- Go to Document in the sidebar and click on your running document instance.
- Click New Collection.
- Enter the Collection Name.
- (Optional) Add any metadata (key-value pairs) to describe the collection.
- Click Add to create the collection.
Collections group related documents together and serve as logical indexes for retrieval operations.
3. Add Documents
Once your collection is created:
- Locate the collection in the list.
- Open the options menu (three dots) next to the collection name.
- Select Add Document.
- Fill in the document fields:
- ID (a unique identifier for the document)
- Document (the text content you want to store)
- (Optional) Metadata fields such as tags, categories, or any custom information.
- Click Add to save the document.
The document will be embedded automatically into a vector and stored inside the vector database.
4. Perform a Search
To test retrieval:
- Open the options menu next to your collection.
- Select Search.
- Enter a query — a text phrase that you want to match against your stored documents.
- (Optional) Add search parameters, filters, or inclusions based on your setup.
- Click Search.
The system will return documents most similar to the query, based on vector similarity search.