Saturday, March 29, 2025

Unleash Your LLM Potential: Deploying an Azure ML Prompt Flow: A Practical Guide

Introduction


In the rapidly evolving landscape of Large Language Models (LLMs), efficiently deploying your AI applications is crucial. Today, I want to share my recent exploration into deploying Azure Machine Learning Prompt Flows, a powerful tool for streamlining the entire LLM application development lifecycle.

What is Azure ML Prompt Flow?

Azure ML Prompt Flow is more than just a development tool, it's a complete ecosystem designed to streamline the entire lifecycle of AI application development. 

Think of it as an orchestrator that lets you chain together prompts, Python scripts, data sources, and evaluation metrics in a structured pipeline.

My Recent Project: Diving into Deployment

Azure ML Prompt Flow promised to simplify the process, and I was eager to see if it lived up to the hype. It definitely did! It provided a structured way to build, test, and iterate on my LLM-powered application. My goal was simple: transform a promising AI prototype into a robust, production-ready application.

My Journey Through Azure Prompt Flow Deployment Strategies

Deploying an AI application is no longer a one-size-fits-all endeavor. My recent project with Azure Prompt Flow illuminated the complexity and flexibility of modern AI deployment strategies. Drawing directly from Microsoft's official documentation, I'll break down the four primary deployment approaches that can transform your AI project from a prototype to a production-ready solution.

Deployment Approaches: A Deep Dive

These are the four available approaches recommended by Microsoft:

**1. Deploy to Azure App Service**

This method offers a fully managed platform for hosting web applications. This approach is particularly compelling for developers seeking:

* Rapid deployment

* Minimal infrastructure management

* Easy scaling capabilities

* Simplified web application hosting

**2. Deploy a flow using Docker**

Docker provides containerization, enabling you to package your Prompt Flow and its dependencies into a portable container. Containerization through Docker offers unprecedented consistency and portability for your Prompt Flow applications:

The key capabilities or features

* Package entire application environment

* Ensure consistency across development and production

* Simplify dependency management

* Enable seamless migration between different infrastructure

**3. Deploy a flow using Kubernetes**

For applications demanding maximum scalability and reliability, Kubernetes emerges as the gold standard:

The Key Benefits:

* Advanced container orchestration

* Automatic scaling and load balancing

* High availability architecture

* Complex microservice management

**4. Deploy the Prompt Flow code to Azure AI Foundry**

Microsoft's Azure AI Foundry represents the next evolution in AI application deployment:

Azure AI Foundry is a newer offering that helps to provide a development environment that makes it easier to create and share AI solutions.

This option is great for collaborative development and sharing of AI solutions.

The key capabilities or features

* Integrated AI development environment

* Streamlined model management

* Enhanced collaboration tools

* Comprehensive AI solution lifecycle support

Choosing Your Deployment Strategy

Selecting the right approach depends on multiple factors:

**Project Complexity:**

* Simple web app → Azure App Service

* Consistent environment needs → Docker

* Enterprise-scale applications → Kubernetes

* Collaborative AI development → Azure AI Foundry

**Other Factors:**

* Scalability Requirements

* Team Expertise

* Infrastructure Constraints

* Performance Expectations

My two cents:

If you're looking to deploy Azure ML Prompt Flows, don't be afraid to experiment. Choose a deployment method that aligns with your needs and comfort level, and be prepared to get your hands dirty. The learning experience is worth it!

I'd love to hear about your experiences deploying Prompt Flows! Share your stories and tips in the comments below.


Happy deploying!!!

Thursday, March 6, 2025

Webchat.JS / DirectLine API - how to clear the chat bot previous messages

 store.getState().activities = [];

For more details, please follow this post,
 
https://stackoverflow.com/questions/79487310/webchat-js-direct-line-api-copilot-studio-reset-the-chat-bot-messages




Wednesday, April 24, 2024

Elastic Search - Error -- curl: (52) Empty reply from server

in windows Curl command , the below  bulk import will throw the exception

C:\elasticsearch-8.12.2>curl -XPOST "https://localhost:9200/products/_bulk" -H "Content-Type: application/json" --data-binary "@products-bulk.json"   


Error:  curl: (52) Empty reply from server

Solution :

Use the cacert and -insecure and -u uid:pwd added to your curl command.
I tested and is working fine for me in Windows


curl --cacert config/certs/http_ca.crt --insecure -u elastic:l9RyDpzFJ7TBwhC06e9E -XPOST "https://localhost:9200/products/_bulk" -H "Content-Type: application/json" --data-binary "@products-bulk.json"

 

 

Tuesday, August 18, 2020

ATG BCC -- Remove struck Projects - SQL + RQL

 -- Removing locks of the project if any
delete from avm_asset_lock where workspace_id in
(select id from avm_devline where name in
(select workspace from epub_project where project_id = 'prj448130'));

-- Remove workspace
delete from avm_workspace where ws_id in
(select id from avm_devline where name in
(select workspace from epub_project where project_id = 'prj448130'));

-- Remove Devline
delete from avm_devline where name in
(select workspace from epub_project where project_id = 'prj448130');

-- delete history of the project
delete from EPUB_PR_HISTORY where project_id in
(select project_id from epub_project where project_id = 'prj448130');

-- delete history of the process
delete from EPUB_PROC_HISTORY where process_id in
(select process_id from epub_process where project = 'prj448130');

-- delete task information of process
delete from EPUB_PROC_TASKINFO where id in
(select process_id from epub_process where project = 'prj448130');

-- delete states of project (if any)
delete from EPUB_WORKFLOW_STRS where id in
(select ID from EPUB_IND_WORKFLOW where process_id in
(select process_id from epub_process where project = 'prj448130'));

delete  from EPUB_IND_WORKFLOW where process_id in
(select process_id from epub_process where project = 'prj448130');


-- delete the deployment
delete from epub_deployment where deployment_id in
(select deployment_id from epub_deploy_proj where project_id='prj448130');

-- delete the deployment data
delete from epub_deploy_proj where project_id='prj448130';

-- finally delete the process
delete from epub_process where project = 'prj448130';

Invalidate Caches

1) /dyn/admin/nucleus/atg/deployment/DeploymentRepository/
2) /dyn/admin/nucleus//atg/epub/PublishingRepository/
3) /atg/epub/version/VersionManagerRepository/

Now navigate to :
/atg/epub/PublishingRepository/
if the project name exists in BCC Home, check this RQL , if it returns data


<print-item item-descriptor="project" id="prj252141" />
<print-item item-descriptor="process" id="prc252141" />

if so, remove them in the below reverse order

<remove-item item-descriptor="process" id="prc444019" />
<remove-item item-descriptor="project" id="prj444019" />


<print-item item-descriptor="project" id="prj252141" />
<print-item item-descriptor="process" id="prc252141" />

Tuesday, June 5, 2018

JSP - debugging - VirtualContextRootInterceptor

Some times, you may not see any error in the logs, even though there are JSP errors.
or it may be difficult to find where exactly the error is being thrown from the JSP/DSP pages

The below components becomes handy in this stage, enable the logging debug on the component, then watch your logs.

/atg/dynamo/servlet/dafpipeline/VirtualContextRootInterceptor/

Alternatively, you can watch your start up logs also.

Friday, January 27, 2017

Internet explorer + Developer tools + Sig web intergration.

We are trying to intergrate the New Topaz sig web with our ATG application running on Weblogic.

Issues : The UI SIGNATURE capture will works in IE only if Developer tools (  F12 ) is enabled. if not enabled it wont work, especially the below
JS, which has all the required method calls

http://www.sigplusweb.com/SigWebTablet.js

Reason : The above JS has AJAX js  GET request. and IE caches it and then the next request never reaches the
Sigweb engine.

Resolution:

1) Using a unique query string parameter (such as a unix timestamp) on each request,
so as to make each request URL unique, thereby preventing caching.



Why F12 works : Looks like I have  "always refresh from server" option enabled in F12.
Other browsers don't cache Ajax calls, but IE does

Wednesday, July 15, 2015

IVY and JRebel -

I am seeing two very useful tools which can ease your local development setup and build process in your ATG Project.

1. JRebel - automated build, similar to file-sync , plus it will sync up your .java file changes. No need to build your ear after every Java change.
    One build daily, and use JRebel, which will take care of your Java changes. (ie Reload Code Changes Instantly)
    Limitations : ATG properties files changes seems not picking up.

2. Ivy - Ivy is a tool for managing / resolving  project dependencies.(You dont need to worry about adding project to classpath/ creating  userdefined libraries and all ).

Ivy is open source and released under a very permissive Apache License.
JRebel is Licensed.