DEV Community

Cover image for Using Datastax Langflow and AstraDB to Create a Multi-Agent Research Assistant with Safety Check - Part 4: Preparation
Alan Knox
Alan Knox

Posted on

Using Datastax Langflow and AstraDB to Create a Multi-Agent Research Assistant with Safety Check - Part 4: Preparation

This is the fourth part of a multipart post about creating a multi-agent research assistant using Datastax Langflow and AstraDB.

The goal of this post is to explain how multiple Langflow flows and AstraDB can be integrated to create a multi-agent application. For this project, the application will assist a researcher in finding websites about a particular topic in 3 steps:

  1. Examine the user's request to determine whether or not it is a safe request.
  2. Find web pages that correspond to the user's request.
  3. Summarize the contents of each web page.

In previous posts, I create two flows that checked the user's topic for safety and also searched the web for websites related to that topic. Then I modified the web search agent to verify that urls found were not already stored in a database. Finally, I created summaries of each website along with key concepts and terms which could be stored in an AstraDB database (using code, since that function is not available in Langflow... yet).

Preparation

Even though the project is "complete", there is one more step that is necessary before I can use it to build an application. I need to create a flow that takes a user's input, gathers the relevant summaries, and compiles them into a document that can be used by the application. (I'll demonstrate a sample application in my next post.)

To begin, this is the Langflow flow for the summary compiler:

Summary Compiler Flow:
Image description

The flow is fairly simple. The agent uses the AstraDB component as a tool. The user enters a filter. The agent's prompt instructs it to read data from the AstraDB collection based on the filter and then compile all the relevant pieces of information along with the associate URL into one text block.

Summary Compiler Prompt:
Image description

The output is a long block of text from filtered summaries of the given topic.

Summary Compiler Results:
Image description
Image description
Image description

Now that our Research Assistant has gathered all the information, we can use the information to create content. In the final post of this series, I'll create another flow that uses this compiled information as one example.

Top comments (0)