Azure Logic Apps – RAG

It’s been a couple of weeks ago since last blog, because of holiday’s. Lots of new updates have been made lasts weeks, with the latest updates in Azure Logic Apps, document parsing and chunking have become simpler, especially for low-code RAG ingestion. This empowers users to easily integrate AI and automation into their workflows. Here’s how you can leverage these new features for real-world applications.

Use Case 1: Streamlining Document Processing for AI Workflows

Integrating these parsing features into Logic Apps allows businesses to automatically extract and process information from PDFs, Word documents, and more. Imagine a legal firm processing contracts. With Logic Apps, contracts can be parsed, and key sections (like clauses or terms) can be chunked for specific analysis using AI models.

Use Case 2: Intelligent Document Ingestion for Customer Support

Using low-code RAG ingestion, customer service teams can upload FAQs, manuals, or troubleshooting guides into AI-powered chatbots. This helps the bot easily fetch relevant information by accessing pre-processed and chunked data from sources like SharePoint.

Use Case 3: Knowledge Management and Searchability

Organizations often have vast libraries of documents spread across various platforms like OneDrive or SharePoint. By using document parsing and chunking, data can be broken into manageable pieces, making it easier to search and integrate with AI-powered tools like Azure Cognitive Search for better knowledge management.

Use Case 4: Automated Data Extraction for Financial Services

Banks and financial institutions can automate the ingestion of loan documents, invoices, or financial reports. With the parsing and chunking feature, these documents are automatically broken down into tokenized text that can feed AI systems for risk analysis or compliance checks.

Use Case 5: Enhancing Generative AI Models

For organizations building generative AI applications, document parsing ensures that large text inputs are chunked and tokenized for efficient training and inference. This enables AI models to perform better, particularly in retrieval-augmented generation (RAG) scenarios, where the model can quickly refer to relevant document segments.

How to RAG in Logic Apps

Parse a document

The Parse a document action converts content, such as a PDF document, CSV file, Excel file, and so on, into a tokenized string. For this example, suppose your workflow starts with the Request trigger named When a HTTP request is received. This trigger waits to receive an HTTP request sent from another component, such as an Azure function, another logic app workflow, and so on. The HTTP request includes the URL for a new uploaded document that is available for the workflow to retrieve and parse. An HTTP action immediately follows the trigger, and sends an HTTP request to the document’s URL, and returns with the document content from its storage location.

If you use other content sources, such as Azure Blob Storage, SharePoint, OneDrive, File System, FTP, and so on, you can check whether triggers are available for these sources. You can also check whether actions are available to retrieve the content for these sources. For more information, see Built-in operations and Managed connectors.

  1. In the Azure portal, open your Standard logic app resource and workflow in the designer.
  2. Under the existing trigger and actions, follow these general steps to add the Data Operations action named Parse a document to your workflow.
  3. On the designer, select the Parse a document action.
  4. After the action information pane opens, on the Parameters tab, in the Document Content property, specify the content to parse by following these steps:
    1. Select inside the Document Content box. The options for the dynamic content list (lightning icon) and the expression editor (function icon) appear.
      • To choose the output from a preceding action, select the dynamic content list.
      • To create an expression that manipulates output from a preceding action, select the expression editor.
      This example continues by selecting the lightning icon for the dynamic content list.
    2. After the dynamic content list opens, select the output that you want from a preceding operation. In this example, the Parse a document action references the Body output from the HTTP action.

The Body output now appears in the Document Content box:

Under the Parse a document action, add the actions that you want to work with the tokenized string output, for example, Chunk text, which this guide describes later.

Chunk text

The Chunk text action splits content into smaller pieces for subsequent actions to more easily use in the current workflow. The following steps build on the example from the Parse a document section and splits token string output for use with Azure AI operations that expect tokenized, small content chunks.

 Note

Preceding actions that use chunking don’t affect the Chunk text action, nor does the Chunk text action affect subsequent actions that use chunking.

  1. In the Azure portal, open your Standard logic app resource and workflow in the designer.
  2. Under the Parse a document action, follow these general steps to add the Data Operations action named Chunk text.
  3. On the designer, select the Chunk text action.
  4. After the action information pane opens, on the Parameters tab, for the Chunking Strategy property, select TokenSize as the chunking method, if not already selected.Expand tableStrategyDescriptionTokenSizeSplit the specified content, based on the number of tokens.
  5. After you select the strategy, select inside the Text box to specify the content for chunking.The options for the dynamic content list (lightning icon) and the expression editor (function icon) appear.
    • To choose the output from a preceding action, select the dynamic content list.
    • To create an expression that manipulates output from a preceding action, select the expression editor.
    This example continues by selecting the lightning icon for the dynamic content list.
    1. After the dynamic content list opens, select the output that you want from a preceding operation.In this example, the Chunk text action references the Parsed result text output from the Parse a document action.

The Parsed result action output now appears in the Text box:

Complete the setup for the Chunk text action, based on your selected strategy and scenario. For more information, see Chunk text – Reference.

Example workflow

The following example includes other actions that create a complete workflow pattern to ingest data from any source:

Conclusion

Azure Logic Apps’ document parsing and chunking capabilities unlock a wide range of automation possibilities. From legal workflows to customer support, these features allow businesses to harness AI for smarter document processing. By leveraging low-code RAG ingestion, organizations can simplify the integration of AI models, enabling smoother data ingestion, enhanced searchability, and more efficient knowledge management.

Stay tuned for more updates on AI, infrastructure, and security developments, as these features continue to evolve and unlock new capabilities in the Azure ecosystem!

, ,

Leave a Reply

Your email address will not be published. Required fields are marked *