diff --git a/docs/docs/Components/bundles-datastax.mdx b/docs/docs/Components/bundles-datastax.mdx index be210f80cf..59635a1033 100644 --- a/docs/docs/Components/bundles-datastax.mdx +++ b/docs/docs/Components/bundles-datastax.mdx @@ -194,126 +194,6 @@ The output is a list of [`Data`](/data-types#data) objects containing the query | Static Filters | Dict | Input parameter. Attribute-value pairs used to filter query results. | | Limit | String | Input parameter. The number of records to return. | -## Astra DB Tool - -The **Astra DB Tool** component enables searching data in Astra DB collections, including hybrid search, vector search, and regular filter-based search. -Specialized searches require that the collection is pre-configured with the required parameters. - -Outputs a list of [`Data`](/data-types#data) objects containing the query results from Astra DB. Each `Data` object contains the document fields specified by the projection attributes. Limited by the `number_of_results` parameter and the upper limit of the Astra DB Data API, depending on the type of search. - -You can use the component to execute queries directly as isolated steps in a flow, or you can connect it as a [tool for an agent](/agents-tools) to allow the agent to query data from Astra DB collections as needed to respond to user queries. -For more information, see [Use Langflow agents](/agents). - -![Astra DB Tool component connected as a tool to an Agent component](/img/component-astra-db-json-tool.png) - -### Astra DB Tool parameters - -The following parameters are for the **Astra DB Tool** component overall. - -The values for **Collection Name**, **Astra DB Application Token**, and **Astra DB API Endpoint** are found in your Astra DB deployment. For more information, see the [Astra DB Serverless documentation](https://docs.datastax.com/en/astra-db-serverless/databases/create-database.html). - -| Name | Type | Description | -|-------------------|--------|--------| -| Tool Name | String | Input parameter. The name used to reference the tool in the agent's prompt. | -| Tool Description | String | Input parameter. A brief description of the tool. This helps the model decide when to use it. | -| Keyspace Name | String | Input parameter. The name of the keyspace in Astra DB. Default: `default_keyspace` | -| Collection Name | String | Input parameter. The name of the Astra DB collection to query. | -| Token | SecretString | Input parameter. The authentication token for accessing Astra DB. | -| API Endpoint | String | Input parameter. The Astra DB API endpoint. | -| Projection Fields | String | Input parameter. Comma-separated list of attributes to return from matching documents. The default is the default projection, `*`, which returns all attributes except reserved fields like `$vector`. | -| Tool Parameters | Dict | Input parameter. [Astra DB Data API `find` filters](https://docs.datastax.com/en/astra-db-serverless/api-reference/document-methods/find-many.html#parameters) that become tools for an agent. These Filters _may_ be used in a search, if the agent selects them. See [Define tool-specific parameters](#define-tool-specific-parameters). | -| Static Filters | Dict | Input parameter. Attribute-value pairs used to filter query results. Equivalent to [Astra DB Data API `find` filters](https://docs.datastax.com/en/astra-db-serverless/api-reference/document-methods/find-many.html#parameters). **Static Filters** are included with _every_ query. Use **Static Filters** without semantic search to perform a regular filter search. | -| Number of Results | Int | Input parameter. The maximum number of documents to return. | -| Semantic Search | Boolean | Input parameter. Whether to run a similarity search by generating a vector embedding from the chat input and following the **Semantic Search Instruction**. Default: `false`. If `true`, you must attach an [embedding model component](/components-embedding-models) or have vectorize pre-enabled on your collection. | -| Use Astra DB Vectorize | Boolean | Input parameter. Whether to use the Astra DB vectorize feature for embedding generation when running a semantic search. Default: `false`. If `true`, you must have vectorize pre-enabled on your collection. | -| Embedding Model | Embedding | Input parameter. A port to attach an embedding model component to generate a vector from input text for semantic search. This can be used when **Semantic Search** is `true`, with or without vectorize. Be sure to use a model that aligns with the dimensions of the embeddings already present in the collection. | -| Semantic Search Instruction | String | Input parameter. The query to use for similarity search. Default: `"Find documents similar to the query."`. This instruction is used to guide the model in performing semantic search. | - -### Define tool-specific parameters - -:::tip -**Tool Parameters** are small functions that you create within the **Astra DB Tool** component. -They give the LLM pre-defined ways to interact with the data in your collection. - -Without these filters, the LLM has no concept of the data in your collection or which attributes are important. - -At runtime, the LLM can decide which filters are relevant to the current query. - -Filters in **Tool Parameters** aren't always applied. -If you want to enforce filters for _every_ query, use the **Static Filters** parameter. -You can use both **Tool Parameters** and **Static Filters** to set some required filters and some optional filters. -::: - -In the **Astra DB Tool** component's **Tool Parameters** field, you can create filters to query documents in your collection. - -When used in **Tool Mode** with an agent, these filters tell the agent which document attributes are most important, which are required in searches, and which operators to use on certain attributes. -The filters become available as parameters that the LLM can use when calling the tool, with a better understanding of each parameter provided by the **Description** field. - -In the **Tool Parameters** pane, click