Qdrant
Summary
This document covers the information to gather from Qdrant in order to configure a Qarbine data service. The data service will use the Qarbine Qdrant driver. You can define multiple data services that access the same Qdrant endpoint though with varying credentials. Once a data service is defined, you can manage which Qarbine principals have access to it and its associated DatabQdrant ricks data. A Qarbine administrator has visibility to all data services.
Overview
Qdrant is a cloud native vector database for building generative AI applications. It includes the ability to store arbitrary payloads along with the vector embeddings to create innovative AIi driven applications. See https://qdrant.com for more information.
Qdrant Configuration
You will need the cluster URL and an API token to configure Qarbine access. Sign on to your Qdrant console at https://cloud.qdrant.io.
Click on the Clusters link.
Click the ‘>’ to the left of the cluster name.
Copy the cluster URL.
Paste it into a scratchpad of some sort.
Click on the Data Access Control link.
If you have no keys or want to create a new one then click
Next, select the desired cluster using the drop down arrow.
To complete the key creation click
A dialog will be presented
Click the copy button to the right.
The API key will soon be used when configuring a Qarbine Data Service.
Close the dialog.
Paste the API key into the scratchpad which has your cluster URL from above.
Qarbine Configuration
Compute Node Preparation
Determine which compute node service endpoint you want to run this data access from. That URL will go into the Data Service’s Compute URL field. Its form is “https://domain:port/dispatch”. A sample is shown below.
The port number corresponds to a named service endpoint configured on the given target host. For example, the primary compute node usually is set to have a ‘main’ service. That service’s configuration is defined in the ˜./qarbine.service/config/service.main.json file. Inside that file the following driver entry is required
"drivers" :[
. . .
"./driver/qdrantDriver.js"
]
The relevant configuration file name for non primary (main) Qarbine compute nodes is service.NAME.json. Remember to have well formed JSON syntax or a startup error is likely to occur. If you end up adding that entry then restart the service via the general command line syntax
pm2 restart <service>
For example,
pm2 restart main
or simply
pm2 restart all
Data Service Definition
Once the aiAssistant.js plugin and the pinecondeDriver.js entries have been set in the service.*.json file you can open the Administration Tool.
Navigate to the Data Services tab.
A data service defines on what compute node a query will run by default along with the means to reach to target data. The latter includes which native driver to use along with settings corresponding to that driver. Multiple Data Sources can reference a single Data Service. The details of any one Data Service are thus maintained in one spot and not spread out all over the place in each Data Source. The latter is a maintenance and support nightmare.
To begin adding a data service click
On the right hand side enter a name and optionally a description.
Set the Compute URL field based on the identified compute node above. Its form is “https://domain:port/dispatch”. A sample is shown below.
Choose the “Qdrant” driver.
For the server template use your copied cluster URL.
For the server options use the copied API Key as shown below
.
You can reference environment variables using the syntax %NAME%. Any strings should be quoted and the key\value pairs separated by commas.
Test your settings by clicking on the toolbar image highlighted below.
The result should be similar to the following
Save the Data Service by clicking on the image highlighted below.
The data service will be known at the next log on time.
To begin test interactions log out and log back in. Next, see the Qdrant query interaction and any tutorial for information on interacting with Qdrant from Qarbine.
Dynamic Vector Determination
Qarbine’s embeddings() macro and”nearText(...)” functions provide for dynamic embedding vector determination using the Qarbine AI Assistant service. There can be multiple AI assistants configured ranging from AWS Bedrock, Anthropic, Google Gemini, Open AI and others. A particular one is referenced using an alias set by the Qarbine Administrator. There may also be multiple one for a particular type (i.e. Anthropic) based on a different model or other parameter.
Qarbine components and tools interacting with vector databases likely benefit from having AI Assistants. For details on configuring them see
http://doc.qarbine.com/docs/Tools/System%20Administrator/ai_Assistant
References
For reference information see https://qdrant.tech/.