<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Alan Knox</title>
    <description>The latest articles on DEV Community by Alan Knox (@aknox).</description>
    <link>https://dev.to/aknox</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2548460%2F3bcd8d71-ebaa-4ac2-aa96-e0ac962988bf.jpg</url>
      <title>DEV Community: Alan Knox</title>
      <link>https://dev.to/aknox</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aknox"/>
    <language>en</language>
    <item>
      <title>Beyond the AI Hype: See how AI Agents can Work for your Business</title>
      <dc:creator>Alan Knox</dc:creator>
      <pubDate>Mon, 23 Dec 2024 18:30:24 +0000</pubDate>
      <link>https://dev.to/aknox/beyond-the-ai-hype-see-how-ai-agents-can-work-for-your-business-1mif</link>
      <guid>https://dev.to/aknox/beyond-the-ai-hype-see-how-ai-agents-can-work-for-your-business-1mif</guid>
      <description>&lt;p&gt;Generative AI and AI Agents have been dominating headlines, promising to revolutionize industries and redefine how businesses operate. But as a business leader, you might be wondering: What does this mean for my company? Can these tools actually deliver value, or are they just hype?&lt;/p&gt;

&lt;p&gt;At CtiPath, we’re here to show you that AI Agents are more than just a buzzword—they’re practical, effective, and ready to work with you to drive real results.&lt;/p&gt;

&lt;p&gt;We’ve developed a demo system called Author Assist to cut through the noise and demonstrate how AI Agents can help businesses like yours. Author Assist isn’t about replacing your team; it’s about empowering them. By blending human expertise with AI capabilities, this system shows how you can collaborate with AI to streamline workflows, save time, and focus on what really matters—making strategic decisions that grow your business.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Is Author Assist?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Author Assist is a simple yet powerful system designed to help you and your team create content faster and more efficiently. Whether it’s drafting a report, brainstorming ideas, or preparing a LinkedIn post, Author Assist keeps you in control while doing the heavy lifting in the background.&lt;/p&gt;

&lt;p&gt;The demo starts with a topic of your choice and walks you through:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Refining the topic into more focused ideas.&lt;/li&gt;
&lt;li&gt;Generating an outline tailored to your needs.&lt;/li&gt;
&lt;li&gt;Drafting high-quality content for each section.&lt;/li&gt;
&lt;li&gt;Evaluating the content for accuracy and fairness.&lt;/li&gt;
&lt;li&gt;Enhancing the document with visuals and references.&lt;/li&gt;
&lt;li&gt;In less than 10 minutes, you’ll see how this system produces a rough draft that’s ready for human refinement.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why Does This Matter for Your Business?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Imagine having a tool that can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reduce the time your team spends on repetitive tasks.&lt;/li&gt;
&lt;li&gt;Ensure accuracy and eliminate bias in your materials.&lt;/li&gt;
&lt;li&gt;Quickly adapt to changing priorities or new projects.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With AI Agents like Author Assist, you’re not just saving time—you’re enabling your team to focus on higher-value activities, like strategy, innovation, and customer engagement.&lt;br&gt;
The Technology Behind the Demo&lt;/p&gt;

&lt;p&gt;We know business leaders don’t need to dive into the technical details, but it’s worth noting that this system is built on cutting-edge AI technologies, including the multi-agent platform &lt;a href="https://www.langflow.org/" rel="noopener noreferrer"&gt;Langflow&lt;/a&gt; (by &lt;a href="https://www.datastax.com/" rel="noopener noreferrer"&gt;DataStax&lt;/a&gt;), language models from &lt;a href="https://openai.com/" rel="noopener noreferrer"&gt;OpenAI&lt;/a&gt; and &lt;a href="https://www.anthropic.com/" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;, image generation from &lt;a href="https://huggingface.co/" rel="noopener noreferrer"&gt;Hugging Face&lt;/a&gt;, and AI observability with Weave (from &lt;a href="https://wandb.ai/site/" rel="noopener noreferrer"&gt;Weights &amp;amp; Biases&lt;/a&gt;). This combination of tools ensures fast, reliable, and high-quality results.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ready to See It in Action?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The best way to understand the potential of AI Agents is to see them in action. Watch our demo video to experience how Author Assist works step-by-step to create a document. You’ll see how seamlessly it integrates AI capabilities into everyday tasks while keeping you in full control.&lt;/p&gt;

&lt;p&gt;AI is no longer just a concept—it’s a tool that’s ready to transform your business. Let us show you how.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/gtOnCCBXsmE"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Local Langflow - A vector RAG application running locally</title>
      <dc:creator>Alan Knox</dc:creator>
      <pubDate>Wed, 18 Dec 2024 13:00:00 +0000</pubDate>
      <link>https://dev.to/aknox/local-langflow-a-vector-rag-application-running-locally-c52</link>
      <guid>https://dev.to/aknox/local-langflow-a-vector-rag-application-running-locally-c52</guid>
      <description>&lt;p&gt;Retrieval Augmented Generation (RAG) is a foundational and important application of AI agents. Documents are stored in a vector database, and an agent retriever can search the db based on a user's query to gather relevant information to answer the query. &lt;/p&gt;

&lt;p&gt;In the cloud version of Langflow, this is a simple setup. In fact, Langflow even includes Vector RAG as a sample flow. You only need to add your API keys. &lt;/p&gt;

&lt;p&gt;There are two parts to the flow: Loading Data and Vector Retrieval QA:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Loading Data&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fssiaopjedrf32o9lli4i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fssiaopjedrf32o9lli4i.png" alt="Image description" width="800" height="472"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Vector Retrieval QA&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fucbm7z3wzb27ccowulep.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fucbm7z3wzb27ccowulep.png" alt="Image description" width="800" height="302"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The vector db (AstraDB serverless vector), embedding model (OpenAI), and the LLM (OpenAI) require internet access and APIs. But what if you want to run everything locally without accessing the internet?&lt;/p&gt;

&lt;p&gt;This is also possible with Langflow.&lt;/p&gt;

&lt;p&gt;Start by following the instructions to download and run Langflow here: &lt;a href="https://docs.langflow.org/get-started-installation" rel="noopener noreferrer"&gt;Install Langflow&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you run Langflow locally, you can access the UI on your local machine:&lt;/p&gt;

&lt;p&gt;Langflow Running Locally&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff8ysrys6vsn8uxzjrnpb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff8ysrys6vsn8uxzjrnpb.png" alt="Image description" width="800" height="537"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At this point, you can start a flow using the same Vector RAG template that you used in the cloud version of Langflow. Simply add your API's, and it works the same.&lt;/p&gt;

&lt;p&gt;But, if you want to be completely local, you need to follow a couple more steps.&lt;/p&gt;

&lt;p&gt;Follow the instructions on the &lt;a href="https://ollama.com/" rel="noopener noreferrer"&gt;Ollama website&lt;/a&gt; to download Ollama and pull models that you want to use. (Don't forget the embedding models.)&lt;/p&gt;

&lt;p&gt;Change the OpenAI embedding model to an Ollama model, and change the OpenAL LLM to an Ollama model. &lt;/p&gt;

&lt;p&gt;Finally, change the AstraDB vector store component to a local vector store. ChromaDB is an easy one to start with.&lt;/p&gt;

&lt;p&gt;Now, your load data and Vector Retrieval QA flows look something like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Local Loading Data&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjuhes679u83emdp2c3hz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjuhes679u83emdp2c3hz.png" alt="Image description" width="800" height="444"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Local Vector Retrieval QA&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnrl9pqarys9ktqnd4zix.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnrl9pqarys9ktqnd4zix.png" alt="Image description" width="800" height="257"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now, you can upload your documents using the Local Loading Data flow, then chat with your document using the Local Vector Retrieval QA. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Multi-Agent RAG application with QA based on Internet Search and Proprietary Docs</title>
      <dc:creator>Alan Knox</dc:creator>
      <pubDate>Tue, 17 Dec 2024 13:00:00 +0000</pubDate>
      <link>https://dev.to/aknox/multi-agent-rag-application-with-qa-based-on-internet-search-and-proprietary-docs-4ffh</link>
      <guid>https://dev.to/aknox/multi-agent-rag-application-with-qa-based-on-internet-search-and-proprietary-docs-4ffh</guid>
      <description>&lt;p&gt;The key benefits of Retrieval Augmented Generation (RAG) is being able to answer user queries based on a company's proprietary documents. In this post, I describe an application that I built using LangFlow and AstraDB (vector db) that allows someone to ask a question about machine learning, and receive an answer based on both generally available information and also information as it applies to a company's proprietary information.&lt;/p&gt;

&lt;p&gt;For the proprietary information, I used documents based on &lt;a href="https://www.ctipath.com/ctipath-mlops-solutions/" rel="noopener noreferrer"&gt;CtiPath's Enterprise-Ready Machine Learning Operations (eMLOps)&lt;/a&gt; solution.&lt;/p&gt;

&lt;p&gt;For this application, there are two agents:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;An Orchestrator Agent - this agent is responsible for coordinating the information from an internet search tool and the CtiPathDocs Agent which is in tool mode.&lt;/li&gt;
&lt;li&gt;CtiPathDocs Agent - this agent accesses information about CtiPath's eMLOps solution from a vector db.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The vector db (AstraDB) has been loaded previously using this simple flow:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Vector DB Load Data Flow&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv5y41pp6xu40qqv2pzon.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv5y41pp6xu40qqv2pzon.png" alt="Image description" width="800" height="582"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the data is loaded, the main flow is built using the two agents described above as shown here:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multi-Agent RAG Application Flow&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F61sxmzstgffg7zibgoiu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F61sxmzstgffg7zibgoiu.png" alt="Image description" width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The prompts are very important in this application. The CtiPathDocs agent is instructed to search the vector db to determine how CtiPath's eMLOps solution applies to the user's query.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CtiPathDocs Agent Prompt&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqz8q6pi1xi0okwdhd3rg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqz8q6pi1xi0okwdhd3rg.png" alt="Image description" width="800" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Meanwhile the Orchestrator Agent is allowed to search the internet via a Google Search API tool or search the vector db using the CtiPathDocs agent. General information should be gathered from the internet, while the RAG agent should be used to determine how CtiPath's eMLOps solution applies to the query.&lt;/p&gt;

&lt;p&gt;Orchestrator Agent Prompt&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk69jg0xv5u43cevtde41.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk69jg0xv5u43cevtde41.png" alt="Image description" width="800" height="331"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Notice that the Orchestrator Agent is allowed to iterate through internet searches and RAG searches until it answers the query and determines how CtiPath's eMLOps solution applies.&lt;/p&gt;

&lt;p&gt;When the Orchestrator Agent answers a general question about machine learning ("What is machine learning monitoring?") it provides both a general answer, and also explains how it relates to CtiPath's eMLOps solution.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Orchestrator Agent Output&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftycu43s1p8enqxsp08ow.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftycu43s1p8enqxsp08ow.png" alt="Image description" width="800" height="612"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This simple multi-agent RAG application shows the power of Gen AI to delivery specific information to a customer, even when they are seeking general information. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Using Datastax Langflow and AstraDB to Create a Multi-Agent Research Assistant with Safety Check - Part 5: Example Use Case</title>
      <dc:creator>Alan Knox</dc:creator>
      <pubDate>Mon, 16 Dec 2024 13:00:00 +0000</pubDate>
      <link>https://dev.to/aknox/using-datastax-langflow-and-astradb-to-create-a-multi-agent-research-assistant-with-safety-check--4jh0</link>
      <guid>https://dev.to/aknox/using-datastax-langflow-and-astradb-to-create-a-multi-agent-research-assistant-with-safety-check--4jh0</guid>
      <description>&lt;p&gt;This is the final part of a multipart post about creating a multi-agent research assistant using &lt;a href="https://datastax.com" rel="noopener noreferrer"&gt;Datastax Langflow and AstraDB&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;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:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Examine the user's request to determine whether or not it is a safe request.&lt;/li&gt;
&lt;li&gt;Find web pages that correspond to the user's request.&lt;/li&gt;
&lt;li&gt;Summarize the contents of each web page.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Here is the updated Langflow flow:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Research Assistant Podcast Script Generator Flow&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxmay2ouu3iooons7q4ka.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxmay2ouu3iooons7q4ka.png" alt="Image description" width="800" height="376"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the system prompt for the podcast script generator agent, it's important to specify exactly how the agent should create the script:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Research Assistant Podcast Script Generator Agent Prompt&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuaalzbayyabug7o9b878.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuaalzbayyabug7o9b878.png" alt="Image description" width="800" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, we can see the results from our new agent, creating a podcast script based on the compiled summaries from our web research:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Research Assistant Podcast Script Generator Results&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzsvxtdyndatbg3oq1tzn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzsvxtdyndatbg3oq1tzn.png" alt="Image description" width="800" height="499"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;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. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Using Datastax Langflow and AstraDB to Create a Multi-Agent Research Assistant with Safety Check - Part 4: Preparation</title>
      <dc:creator>Alan Knox</dc:creator>
      <pubDate>Sun, 15 Dec 2024 13:00:00 +0000</pubDate>
      <link>https://dev.to/aknox/using-datastax-langflow-and-astradb-to-create-a-multi-agent-research-assistant-with-safety-check--2h3i</link>
      <guid>https://dev.to/aknox/using-datastax-langflow-and-astradb-to-create-a-multi-agent-research-assistant-with-safety-check--2h3i</guid>
      <description>&lt;p&gt;This is the fourth part of a multipart post about creating a multi-agent research assistant using &lt;a href="https://datastax.com" rel="noopener noreferrer"&gt;Datastax Langflow and AstraDB&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;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:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Examine the user's request to determine whether or not it is a safe request.&lt;/li&gt;
&lt;li&gt;Find web pages that correspond to the user's request.&lt;/li&gt;
&lt;li&gt;Summarize the contents of each web page.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;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).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Preparation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;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.)&lt;/p&gt;

&lt;p&gt;To begin, this is the Langflow flow for the summary compiler:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Summary Compiler Flow:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsf2loni3j6um54092b9x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsf2loni3j6um54092b9x.png" alt="Image description" width="800" height="518"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;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. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Summary Compiler Prompt:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Filx0vatve7o5v7ge38vc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Filx0vatve7o5v7ge38vc.png" alt="Image description" width="800" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The output is a long block of text from filtered summaries of the given topic. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Summary Compiler Results:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2m7vuj1rqqsyfxzm0brx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2m7vuj1rqqsyfxzm0brx.png" alt="Image description" width="800" height="626"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faubxfi7suqv4sv3brval.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faubxfi7suqv4sv3brval.png" alt="Image description" width="800" height="428"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuun7v8bu0akyckuyshdm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuun7v8bu0akyckuyshdm.png" alt="Image description" width="800" height="766"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Using Datastax Langflow and AstraDB to Create a Multi-Agent Research Assistant with Safety Check - Part 3: Summarizer</title>
      <dc:creator>Alan Knox</dc:creator>
      <pubDate>Sat, 14 Dec 2024 13:00:00 +0000</pubDate>
      <link>https://dev.to/aknox/using-datastax-langflow-and-astradb-to-create-a-multi-agent-research-assistant-with-safety-check--5bi7</link>
      <guid>https://dev.to/aknox/using-datastax-langflow-and-astradb-to-create-a-multi-agent-research-assistant-with-safety-check--5bi7</guid>
      <description>&lt;p&gt;This is the third part of a multipart post about creating a multi-agent research assistant using &lt;a href="https://datastax.com" rel="noopener noreferrer"&gt;Datastax Langflow and AstraDB&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The goal of this series 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:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Examine the user's request to determine whether or not it is a safe request.&lt;/li&gt;
&lt;li&gt;Find web pages that correspond to the user's request.&lt;/li&gt;
&lt;li&gt;Summarize the contents of each web page.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;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 an AstraDB database.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Web Content Summarizer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this part of the project, I create a new agent that reads the content of a website and summarizes the content and provides the output in a standard format.&lt;/p&gt;

&lt;p&gt;Note: It's possible to include the summarizer function as part of the web search agent. However, for this project, my desire is to separate the different steps so the user can become the orchestrator. For example, each flow/agent will be controlled by a Python script, allowing the user to choose which URLs to include in the database. Later the user will also be able to use the data to create different types of content such as articles, podcasts, etc.&lt;/p&gt;

&lt;p&gt;To begin, this is the flow of the web summarizer agent in Langflow:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Web Summarizer Agent Flow&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fib3ub00ee4occ56mguxj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fib3ub00ee4occ56mguxj.png" alt="Image description" width="800" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note that this flow is similar to the web search flow, however I used a different search tool to make it easier to demonstrate that many tool types are available and can be integrated together.&lt;/p&gt;

&lt;p&gt;For this flow, a simple prompt provided the output that I needed:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Web Summarizer Agent Prompt&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsogyq335fo70y1wmuev3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsogyq335fo70y1wmuev3.png" alt="Image description" width="800" height="544"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This flow and prompt provided the output that I wanted:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Web Summarizer Agent Results&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkudjr5nu2m5sokdnpl7i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkudjr5nu2m5sokdnpl7i.png" alt="Image description" width="800" height="241"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm5a0sxmsdv0ssxm2m9ou.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm5a0sxmsdv0ssxm2m9ou.png" alt="Image description" width="800" height="428"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdow2t2nrogleq8j58cmr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdow2t2nrogleq8j58cmr.png" alt="Image description" width="800" height="631"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At this point in the project, I have a flow that checks my user's input for safety. I also have an agent that returns a list of websites and compares those websites to those already stored in a database. Another agent summarizes the content of each website. &lt;/p&gt;

&lt;p&gt;The URLs and summaries will be stored in an AstraDB database (the same database used to verify that the web search agent found new URLs). At this time, Langflow does not directly write to a database (unless it's a vector db). So, this step will be handled through Python code. &lt;/p&gt;

&lt;p&gt;The next post in the series will demonstrate how a Langflow agent can pull the summaries from the AstraDB database and perform different functions on the data.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Using Datastax Langflow and AstraDB to Create a Multi-Agent Research Assistant with Safety Check - Part 2: Verify Search</title>
      <dc:creator>Alan Knox</dc:creator>
      <pubDate>Fri, 13 Dec 2024 14:04:30 +0000</pubDate>
      <link>https://dev.to/aknox/using-datastax-langflow-and-astradb-to-create-a-multi-agent-research-assistant-with-safety-check--3825</link>
      <guid>https://dev.to/aknox/using-datastax-langflow-and-astradb-to-create-a-multi-agent-research-assistant-with-safety-check--3825</guid>
      <description>&lt;p&gt;This is the second part of a multipart post about creating a multi-agent research assistant using &lt;a href="https://datastax.com" rel="noopener noreferrer"&gt;Datastax Langflow and AstraDB&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;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:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Examine the user's request to determine whether or not it is a safe request.&lt;/li&gt;
&lt;li&gt;Find web pages that correspond to the user's request.&lt;/li&gt;
&lt;li&gt;Summarize the contents of each web page.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In a previous post, I create two flows that checked the user's topic for safety and also searched the web for websites related to that topic. In this post, I will expand on the web search agent flow to add a verification tool to the agent.&lt;/p&gt;

&lt;p&gt;The previous web search agent flow looked like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2f3prf9xrcq5b3u4w5vl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2f3prf9xrcq5b3u4w5vl.png" alt="Image description" width="800" height="389"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The agent had access to a web search tool and would return a list of URL's (and only URL's) that it found related to the topic. However, the long term goal is to add these URL's to a database, and to be able to expand the research later. Because of this, I need to verify that the URL's discovered by the web search agent are not already in a database.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AstraDB&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To begin, I created a Datastax AstraDB Serverless database, added a collection and keyspace, and uploaded some sample data. The data consists of 15 URL's that the web search agent had found previously. (For now, I loaded the data manually, but will automate the loop in a later step.)&lt;/p&gt;

&lt;p&gt;Sample data&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw4oa7h5m0nj09wt7xb2l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw4oa7h5m0nj09wt7xb2l.png" alt="Image description" width="800" height="561"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Langflow&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Next, I needed to modify the agent flow to include verification. I gave the agent another tool: an AstraDB tool. I connected this tool to my AstraDB collection and instructed the agent how to use it by modifying the agent's system prompt:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Modified agent system prompt to include URL verification from DB:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcbmoqwsqw27ruh8yqk1n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcbmoqwsqw27ruh8yqk1n.png" alt="Image description" width="800" height="289"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After added the new tool and adjusting the agent's system prompt, the modified flow for agent search with verification looks like this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Web Search and Verification Agent Flow&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhxeeb1qdss5ix16kz6sp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhxeeb1qdss5ix16kz6sp.png" alt="Image description" width="800" height="655"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And the results were as expected: the modified agent provided a list of non-duplicate websites related to the topic:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Web Search and Verification Agent Results&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4qnm5in6zt1uanbqprbh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4qnm5in6zt1uanbqprbh.png" alt="Image description" width="800" height="392"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At this point, I have a flow that checks my user's input for safety. I also have an agent that returns a list of websites and compares those websites to those already stored in a database. The next step for the multi-agent research assistant will be to summarize the content of each website. That will be Part 3.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Using Datastax Langflow and AstraDB to Create a Multi-Agent Research Assistant with Safety Check - Part 1: Safety and Search</title>
      <dc:creator>Alan Knox</dc:creator>
      <pubDate>Thu, 12 Dec 2024 14:36:41 +0000</pubDate>
      <link>https://dev.to/aknox/using-datastax-langflow-and-astradb-to-create-a-multi-agent-research-assistant-with-safety-check--53p5</link>
      <guid>https://dev.to/aknox/using-datastax-langflow-and-astradb-to-create-a-multi-agent-research-assistant-with-safety-check--53p5</guid>
      <description>&lt;p&gt;This is the first part of a multipart post about creating a multi-agent research assistant using &lt;a href="https://datastax.com" rel="noopener noreferrer"&gt;Datastax AstraDB and Langflow&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The goal of this post is to explain how multiple Langflow flows 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:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Examine the user's request to determine whether or not it is a safe request.&lt;/li&gt;
&lt;li&gt;Find web pages that correspond to the user's request.&lt;/li&gt;
&lt;li&gt;Summarize the contents of each web page.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;Part 1: Safety and Search&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;For any AI project, observability and safety are ultimate concerns. When I design an AI project, I begin and end with observability and safety. It's important to know what's happening throughout the application, and to ensure that the application is returning safe outputs to the user.&lt;/p&gt;

&lt;p&gt;For the "Safety Check", I created a simple flow using Langflow:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc50t09ghiwww3pmden0q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc50t09ghiwww3pmden0q.png" alt="Image description" width="800" height="376"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This flow accepts the user's input and provides a system prompt to the model which then provides the output.&lt;/p&gt;

&lt;p&gt;The important part of this flow is the system prompt. I begin with a simple system prompt to test the flow:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Simple SafetyCheck System Prompt&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffho162zv3r2pnmeqrkol.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffho162zv3r2pnmeqrkol.png" alt="Image description" width="800" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Simple SafetyCheck System Prompt Results&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm6x4bndtl0g6wnc7c0mu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm6x4bndtl0g6wnc7c0mu.png" alt="Image description" width="800" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, I optimized the system prompt to include additional unsafe parameters as well as to block against prompt injection:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Optimized SafetyCheck System Prompt&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flxgfxq1uv1c6s8kz7d4x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flxgfxq1uv1c6s8kz7d4x.png" alt="Image description" width="800" height="406"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Optimized SafetyCheck System Prompt Results&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2xncbs5l1jocewtudifv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2xncbs5l1jocewtudifv.png" alt="Image description" width="800" height="439"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Web Search&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For the second section of Part 1, I create an agent that can search the web based on the user's input. It's important that the agent only returns a list of URL's, so once again prompt engineering is necessary.&lt;/p&gt;

&lt;p&gt;Also, in order to demonstrate the flexibility of Langflow, I use OpenAPI models for this agent.&lt;/p&gt;

&lt;p&gt;Here is the final agentic flow:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9g1cqxc4eyitvirod0gx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9g1cqxc4eyitvirod0gx.png" alt="Image description" width="800" height="389"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I begin with a simple prompt until I get the results that I want:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Web search agent simple prompt&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe22dc2xcur5xhvdjnxbs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe22dc2xcur5xhvdjnxbs.png" alt="Image description" width="800" height="197"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Web search agent results with simple prompt&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F42uxhzcvpq89bnpyywbu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F42uxhzcvpq89bnpyywbu.png" alt="Image description" width="800" height="529"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, I optimized the prompt. The optimized prompt was more concise and added an example. The results were also good.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Web search agent optimized prompt&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbtbb3rc97ujagm803t03.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbtbb3rc97ujagm803t03.png" alt="Image description" width="800" height="312"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Web search agent optimized prompt results&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr621whyi0c7fd5g3ofwu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr621whyi0c7fd5g3ofwu.png" alt="Image description" width="800" height="528"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At this point, I have a flow that checks my user's input for safety. I also have an agent that returns a list of websites. The next step for the multi-agent research assistant will be to search each website and summarize the contents. That will be Part 2.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
