Ways to find data in Astra DB Serverless
Finding data is one of the most common and important interactions between applications and databases.
In addition to reading data, you also find data in order to modify it, delete it, or otherwise use in subsequent operations. For example, dynamic few-shot prompting amends user-submitted questions with predefined question-response pairs to improve the LLM’s response. Vector search is used to find the most relevant predefined pairs before generating a response for the user.
There are several ways to find data in Astra DB Serverless databases:
-
Filters: Find data matching a specific value or a range of values, with or without ascending/descending sorting.
-
Vector search: Compare vector embeddings in your database against a query vector, and then rank the results by similarity. This is the quintessential use case for vector databases in machine learning.
-
CQL analyzers: Leverage Apache Solr™ and Apache Lucene™ for full-text search with the Cassandra Query Language (CQL).
-
Hybrid search: Use a single command to combine vector search, lexical search, and filters, and then contextually rerank the results to return the most relevant data.
-
Lexical search: Use lexicographical matching to find data.
Permissions required to find data
The following permissions are required to use the Astra Portal or Data API to find data in an Astra DB Serverless database:
The Database Administrator role includes all of these permissions and more. For other roles, see Manage roles and permissions.
To access databases in the Astra Portal, a valid role must be assigned to you.
To access databases with the Data API, you need an application token with a valid role.
To access databases with the CQL shell (cqlsh) or a Cassandra driver, you use your database’s Secure Connect Bundle (SCB) and an application token for authentication and authorization.