Astra components in Langflow

There are two Astra components available in Langflow: Astra DB and Astra DB Search.

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

The Astra DB search component searches an Astra DB vector store for documents similar to the component’s input.

The Quickstart for DataStax Langflow guide demonstrates how to use the Astra components 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.

  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

API Endpoint

API endpoint for Astra DB.

Namespace

Optional namespace within Astra DB to use for the collection.

Metric

Optional distance metric for vector comparisons in the vector store.

Batch Size

Optional number of records 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 records.

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.

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.

Add an Astra DB search component in Langflow

The Astra DB Search component searches an existing Astra DB vector store for documents similar to the input, using the Astra DB component’s functionality for efficient retrieval.

To add the Astra DB Search component to your Langflow canvas:

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

  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.

  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.

  6. Select the Search Type for your search.

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 Search component parameters

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

Advanced configuration
Field Description

Namespace

Optional namespace within Astra DB to use for the collection.

Metric

Optional distance metric for vector comparisons in the vector store.

Batch Size

Optional number of records 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 records.

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.

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.

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 Quickstart for DataStax Langflow.

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