Astra DB in Langflow

The Astra DB component creates a vector store that uses Astra DB as the underlying database to store and retrieve documents.

The Vector Store RAG guide demonstrates how to use the Astra DB component in a template flow, but you can use the Astra components as the vector store in any Langflow application.

For information about non-Astra components, see the Langflow component documentation.

Add an Astra DB component in Langflow

The Astra DB component initializes an Astra DB vector store with vector indexes to efficiently store and retrieve documents.

To add the Astra DB component to your Langflow canvas:

  1. In Langflow’s Basic Components menu, select Vector Stores > Astra DB.

  2. Click and drag the component to the Canvas.

  3. In the Token field, enter your Astra DB authentication token, or select it from the dropdown list if you’ve created a global variable.

  4. In the Database field, select your existing database from the dropdown menu, or select Create new database. For more information, see Create a database.

    Astra organizations on the Free plan can create up to five databases. If you reach the limit, the Create new database option becomes inactive.

    To re-enable database creation, either terminate an existing database or upgrade your plan.

  5. In the Collection field, select your existing collection from the dropdown menu, or select Create new collection. For more information, see Manage collections and tables.

Your component is ready to use in a flow. See Astra component inputs and outputs for information on how to connect the Astra component to other components in a flow.

Astra DB component parameters

To open Advanced Settings for this component, from the Astra DB component’s top menu, select more_horiz > Advanced.

Advanced configuration
Field Description

Collection Name

The name of the collection within Astra DB where the vectors will be stored.

Astra DB Application Token

Authentication token for accessing Astra DB.

API Endpoint

API endpoint URL for the Astra DB service.

Search Input

Input for search queries.

Ingest Data

Data to be ingested into the vector store.

Namespace

Optional namespace within Astra DB to use for the collection.

Metric

Optional distance metric for vector comparisons in the vector store. Options include cosine, dot_product, and euclidean.

Batch Size

Optional number of data to process in a single batch.

Bulk Insert Batch Concurrency

Optional concurrency level for bulk insert operations.

Bulk Insert Overwrite Concurrency

Optional concurrency level for bulk insert operations that overwrite existing data.

Bulk Delete Concurrency

Optional concurrency level for bulk delete operations.

Setup Mode

Configuration mode for setting up the vector store, with options for "Sync", "Async", or "Off".

Pre Delete Collection

Boolean flag to determine whether to delete the collection before creating a new one.

Metadata Indexing Include

Optional list of metadata fields to include in the indexing.

Embedding or Astra Vectorize

Allows either an embedding model or an Astra Vectorize configuration.

Metadata Indexing Exclude

Optional list of metadata fields to exclude from the indexing.

Collection Indexing Policy

Optional dictionary defining the indexing policy for the collection.

Number of Results

Number of results to return.

Search Type

Search type to use. Options include "Similarity", "Similarity with score threshold", and "MMR (Max Marginal Relevance)".

Search Score Threshold

Minimum similarity score threshold for search results when using "Similarity with score threshold".

Search Metadata Filter

Optional dictionary of filters to apply to the search query.

Astra component inputs and outputs

Astra component inputs and outputs

To see a component’s acceptable inputs, hover over the blue circles on the left side of the component.

To see a component’s acceptable outputs, hover over the orange circles on the right side of the component.

To see a component’s embeddings model, hover over the green circle on the component.

To connect the Astra DB component to a flow, click and drag inside one of the circles to another component of an acceptable type. For example, drag a line from the Astra DB component’s Embeddings circle to the Embeddings circle of an OpenAI Embeddings component.

For an example of how to wire the Astra component in a RAG application flow, see the Vector Store RAG.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com