-
Notifications
You must be signed in to change notification settings - Fork 28
feat: search Astra DB with LangFlow #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Hi @kndeepa-ibm -- would you please review this doc when you get a chance? Thanks. |
| @@ -0,0 +1,65 @@ | |||
| # How to use LangFlow to ingest data into Astra DB to be used as the knowledge source of Agent Knowledge | |||
| This document explains how to use LangFlow to ingest data into Astra DB, to be used as the knowledge source of Agent Knowledge. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| This document explains how to use LangFlow to ingest data into Astra DB, to be used as the knowledge source of Agent Knowledge. | |
| This document explains how to use LangFlow to ingest data into Astra DB, which can then be used as a knowledge source in Agent Knowledge. |
| 1. Sign up for Astra DB | ||
| * To sign up for Astra DB, see [Sign up for Astra DB](https://astra.datastax.com/) | ||
| 2. Get access to LangFlow | ||
| * To install LangFlow Desktop, see [Install LangFlow Desktop](https://www.langflow.org/desktop) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * To install LangFlow Desktop, see [Install LangFlow Desktop](https://www.langflow.org/desktop) | |
| * To install the desktop version: [Install LangFlow Desktop](https://www.langflow.org/desktop) |
| * To sign up for Astra DB, see [Sign up for Astra DB](https://astra.datastax.com/) | ||
| 2. Get access to LangFlow | ||
| * To install LangFlow Desktop, see [Install LangFlow Desktop](https://www.langflow.org/desktop) | ||
| * To sign up for managed LangFlow, see [Sign up for managed LangFlow](https://astra.datastax.com/langflow) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * To sign up for managed LangFlow, see [Sign up for managed LangFlow](https://astra.datastax.com/langflow) | |
| * To use the managed version: [Sign up for managed LangFlow](https://astra.datastax.com/langflow) |
| * [Add other components](#add-other-components) | ||
| * [Connect the components and run the ingestion](#connect-the-components-and-run-the-ingestion) | ||
| * [Step 3: Connect to Agent Knowledge in watsonx Orchestrate](#step-3-connect-to-agent-knowledge-in-watsonx-orchestrate) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Step 1: Prepare Astra DB and collect connection information
Prepare Astra DB
Collect connection information
Step 2: Ingest Data into Astra DB using LangFlow
Add the Astra DB component
Add other components
Connect components and run ingestion
Step 3: Connect to Agent Knowledge in watsonx Orchestrate
| This document explains how to use LangFlow to ingest data into Astra DB, to be used as the knowledge source of Agent Knowledge. | ||
|
|
||
| ## Before you begin | ||
| 1. Sign up for Astra DB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before starting the ingestion process, ensure you have access to both Astra DB and LangFlow. This section provides links to sign up or install the necessary tools.
| * [Connect the components and run the ingestion](#connect-the-components-and-run-the-ingestion) | ||
| * [Step 3: Connect to Agent Knowledge in watsonx Orchestrate](#step-3-connect-to-agent-knowledge-in-watsonx-orchestrate) | ||
|
|
||
| ## Step 1: Prepare Astra DB and collect the connection information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To ingest data into Astra DB, you first need to set up your database and collection, and gather the necessary credentials.
| ## Step 3: Connect to Agent Knowledge in watsonx Orchestrate | ||
|
|
||
| This option allows you to integrate with your Astra DB service through the Agent Knowledge feature of watsonx Orchestrate. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After ingestion, you can integrate Astra DB with Agent Knowledge in watsonx Orchestrate. This section points you to the official documentation for completing the connection setup.
| ### Prepare Astra DB | ||
| 1. Login to Astra DB | ||
| 2. Create a new database, or select an existing database | ||
| 3. Go to `Data Explorer` tab > `Collections and Tables` drop down, select `Create collection` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go to the Data Explorer tab > Collections and Tables > Create Collection.
| 1. Login to Astra DB | ||
| 2. Create a new database, or select an existing database | ||
| 3. Go to `Data Explorer` tab > `Collections and Tables` drop down, select `Create collection` | ||
| 4. Enter `Collection name`, toggle on `Vector-enabled collection`, select `Embedding generation method`, `Embedding model`, `Dimension`, `Similarity metric`, click `Create collection` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enter the Collection name, enable Vector-enabled collection, and configure...
| ### Collect the connection information | ||
| #### Token | ||
| 1. Login to Astra DB | ||
| 2. On the upper right of the portal, click `Settings` > `Tokens` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Go to
Settings>Tokenson the top-right corner.
| 1. Login to Astra DB | ||
| 2. On the upper right of the portal, click `Settings` > `Tokens` | ||
| 3. Choose `Role`, `Description`, `Expiration`, and click on `Generate token` | ||
| 4. Take a note of the generated token |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 4. Take a note of the generated token | |
| 4. Save the generated token securely. |
| 2. In `Components` > `Vector Stores`, drag and drop `Astra DB` to the canvas | ||
| 3. In the `Astra DB` component, fill in `Astra DB Application Token` | ||
| 4. Select `Database` and `Collection` as used in `Step 1` | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Launch LangFlow and create a new project.
- Under
Components>Vector Stores, drag and drop theAstra DBcomponent onto the canvas. - Enter your
Astra DB Application Token. - Select the
DatabaseandCollectionfrom Step 1.
| 4. Select `Database` and `Collection` as used in `Step 1` | ||
|
|
||
| ### Add other components | ||
| 1. In `Components` > `Data`, drag and drop `File` to the canvas, and choose the file(s) to upload |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 1. In `Components` > `Data`, drag and drop `File` to the canvas, and choose the file(s) to upload | |
| 1. In `Components` > `Data`, drag and drop `File` component and upload your file. |
| 1. In `Components` > `Data`, drag and drop `File` to the canvas, and choose the file(s) to upload | ||
| 2. In `Components` > `Processing`, drag and drop `Split text` to the canvas, and enter `Chunk Overlap` and `Chunk Size` | ||
| 3. In `Components` > `Outputs`, drag and drop `Chat Output` to the canvas | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Components > Outputs, add the Chat Output component.
Search Astra DB with LangFlow