In this video, we explore how to set up document ingestion using the Retrieval-Augmented Generation (RAG) pattern with Azure Logic Apps.
This is greatly simplified with the addition of two new Data Operation Actions, Parse Document and Chunk Text, along with existing connectors to Azure AI Search and Azure OpenAI. These are all Actions that exist in Azure Logic Apps Standard Edition.
Starting from scratch, I will walk through the entire process, including setting up Azure OpenAI, Azure Search, and Azure Logic Apps—no prior AI or Logic Apps experience is required!
This video is designed to give you practical, hands-on experience with Azure’s Artificial Intelligence capabilities and Logic Apps so anyone can build on these skills for new projects and solutions.
Brand new to AI? That is ok! Check out my five video learning cheat sheet here.
Quick Link Download (see files below)s: 9-Step Task List & JSON Logic App
Watch for new content related to the Azure Integration Services, Azure Logic Apps, and Azure AI being created soon.
If you have any questions, feel free to reach out!
Process PDF Documents Logic App (just copy and paste into a new workflow)
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"For_each": {
"type": "foreach",
"foreach": "@outputs('List_all_the_blobs_using_path')?['body']?['blobs']",
"actions": {
"Chunk_text": {
"type": "ChunkText",
"inputs": {
"chunkingStrategy": "TokenSize",
"text": "@body('Parse_a_document')?['text']",
"EncodingModel": "cl100k_base",
"PageOverlapLength": 0,
"TokenSize": 4096
},
"runAfter": {
"Parse_a_document": [
"SUCCEEDED"
]
}
},
"Parse_a_document": {
"type": "ParseDocument",
"inputs": {
"content": "@body('Read_blob_content')?['content']"
},
"runAfter": {
"Read_blob_content": [
"SUCCEEDED"
]
}
},
"Read_blob_content": {
"type": "ServiceProvider",
"inputs": {
"parameters": {
"containerName": "@items('For_each')?['containerName']",
"blobName": "@items('For_each')?['name']"
},
"serviceProviderConfiguration": {
"connectionName": "AzureBlob-1",
"operationId": "readBlob",
"serviceProviderId": "/serviceProviders/AzureBlob"
},
"retryPolicy": {
"type": "none"
}
}
},
"Get_multiple_embeddings": {
"type": "ServiceProvider",
"inputs": {
"parameters": {
"deploymentId": "text-embedding-ada-002",
"input": "@body('Chunk_text')?['value']"
},
"serviceProviderConfiguration": {
"connectionName": "openai-1",
"operationId": "getArrayEmbeddings",
"serviceProviderId": "/serviceProviders/openai"
},
"retryPolicy": {
"type": "none"
}
},
"runAfter": {
"Chunk_text": [
"SUCCEEDED"
]
}
},
"Index_multiple_documents": {
"type": "ServiceProvider",
"inputs": {
"parameters": {
"indexName": "vector-1729738193967",
"documents": "@body('Select')"
},
"serviceProviderConfiguration": {
"connectionName": "azureaisearch-2",
"operationId": "indexDocuments",
"serviceProviderId": "/serviceProviders/azureaisearch"
},
"retryPolicy": {
"type": "none"
}
},
"runAfter": {
"Select": [
"SUCCEEDED"
]
}
},
"Select": {
"type": "Select",
"inputs": {
"from": "@range(0, length(body('Chunk_text')['value']))",
"select": {
"chunk": "@body('Chunk_text')['value'][item()]",
"title": "@items('For_each')?['name']",
"text_vector": "@body('Get_multiple_embeddings')['embeddings'][item()]",
"chunk_id": "@guid()",
"parent_id": "@guid()"
}
},
"runAfter": {
"Get_multiple_embeddings": [
"SUCCEEDED"
]
}
}
},
"runAfter": {
"List_all_the_blobs_using_path": [
"SUCCEEDED"
]
}
},
"List_all_the_blobs_using_path": {
"type": "ServiceProvider",
"inputs": {
"parameters": {
"containerName": "input"
},
"serviceProviderConfiguration": {
"connectionName": "AzureBlob-1",
"operationId": "listBlobs",
"serviceProviderId": "/serviceProviders/AzureBlob"
},
"retryPolicy": {
"type": "none"
}
},
"runAfter": {}
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"triggers": {
"Recurrence": {
"type": "Recurrence",
"recurrence": {
"frequency": "Month",
"interval": 1
}
}
}
},
"kind": "Stateful"
}
Recent Comments