DEV Community

Cover image for Using Datastax Langflow and AstraDB to Create a Multi-Agent Research Assistant with Safety Check - Part 5: Example Use Case
Alan Knox
Alan Knox

Posted on

Using Datastax Langflow and AstraDB to Create a Multi-Agent Research Assistant with Safety Check - Part 5: Example Use Case

This is the final 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. In the fourth part of the series, I demonstrated how the user could filtered the database entries using an input to AI agent, which would then compile the filtered results into a complied document.

But, now what? Now comes the fun part. How do we use all the information that the application has search, summarized, and compiled? Well, the options are as endless as our creativity.

In this final part of the series, I demonstrate one possible use case. I'm going to add another agent to create a podcast dialog script between two presenters based on the compiled research content.

Here is the updated Langflow flow:

Research Assistant Podcast Script Generator Flow
Image description

In the system prompt for the podcast script generator agent, it's important to specify exactly how the agent should create the script:

Research Assistant Podcast Script Generator Agent Prompt
Image description

Finally, we can see the results from our new agent, creating a podcast script based on the compiled summaries from our web research:

Research Assistant Podcast Script Generator Results
Image description

Creating a podcast script is only one use case for the research assistant. Now that the application can search for information on the web based on a query, summarize and compile that information, it can be used to create many different types of content.

Top comments (0)