Month: May 2024
Excel Labs
Hello Team,
Does this add-in send prompts entered by the user on Excel directly to OpenAI?
Hello Team,Does this add-in send prompts entered by the user on Excel directly to OpenAI? Read More
learning Java script and growing the skills for a tech job
Hi, I’m a data consultant and I’ve been working with some light coding and really enjoy and wanting to find the best way to start learning more coding weather it be YouTube course or some coding classes. If anyone has some suggestions
Hi, I’m a data consultant and I’ve been working with some light coding and really enjoy and wanting to find the best way to start learning more coding weather it be YouTube course or some coding classes. If anyone has some suggestions Read More
Entering Data from another sheet
Hello ,
I am creating a new excel sheet from scratch as my old program FileMaker Pro isn’t compatible anymore. I used to be able to have a template on there, and it would pull data for each student individually from another source.
I need to somehow recreate this in excel, and pull data into my template that includes students names, DOB, and classroom name.
Is it possible to set this up so data for each student pulls into my template and as I scroll it switches to a different student and their info?
I currently have all my data pulled.
Does the data all need to be on one line combined in one cell or can everything have its own cell then pull into the template into a certain cell for each student? So essentially it all pulls together and as I scroll it switches students and their info.
thanks so much. I know this is a big ask!
Hello , I am creating a new excel sheet from scratch as my old program FileMaker Pro isn’t compatible anymore. I used to be able to have a template on there, and it would pull data for each student individually from another source. I need to somehow recreate this in excel, and pull data into my template that includes students names, DOB, and classroom name. Is it possible to set this up so data for each student pulls into my template and as I scroll it switches to a different student and their info? I currently have all my data pulled.Does the data all need to be on one line combined in one cell or can everything have its own cell then pull into the template into a certain cell for each student? So essentially it all pulls together and as I scroll it switches students and their info.thanks so much. I know this is a big ask! Read More
Timesheet Help – Adding potential unpaid break
Hi all,
I’m trying to create a timesheet that calculates my hours while subtracting a potential unpaid break. Currently, what I have is =IFERROR(MOD(([@[Time Out]]-[@[Time In]])-([@[Unpaid Time End]]-[@[Unpaid Time Start]]),1)*24,0). This works, but only if values are inputted under the unpaid times. This is great if I do have an unpaid break. But what if I don’t take a break? I’d have to enter the exact same time under unpaid time in and unpaid time end (e.g., 2:00pm – 2:00pm), or else the hours worked for that day will stay 0.
How do I rewrite the formula so that Unpaid Time Start/End is only calculated if time values are inputted? I really appreciate any help.
Hi all, I’m trying to create a timesheet that calculates my hours while subtracting a potential unpaid break. Currently, what I have is =IFERROR(MOD(([@[Time Out]]-[@[Time In]])-([@[Unpaid Time End]]-[@[Unpaid Time Start]]),1)*24,0). This works, but only if values are inputted under the unpaid times. This is great if I do have an unpaid break. But what if I don’t take a break? I’d have to enter the exact same time under unpaid time in and unpaid time end (e.g., 2:00pm – 2:00pm), or else the hours worked for that day will stay 0. How do I rewrite the formula so that Unpaid Time Start/End is only calculated if time values are inputted? I really appreciate any help. Read More
Helical trajectory generation using frenet frame
How to generate a helical trajectory using frenet frame?
Position vector given as
[x y z]^T=[[500sin(0.01t) 500cos(0.01t) −2t−20000]^T
initial position is
ζ (0) = [−300 0 −19800]^T
initial line velocity is
υ(0) =[5 0 0]^T,
the initial attitude is
γ (0) = [0, 0, 0]^T
How to convert this data to frenet frame and find attitude coordinates and then plot a helical trajectoryHow to generate a helical trajectory using frenet frame?
Position vector given as
[x y z]^T=[[500sin(0.01t) 500cos(0.01t) −2t−20000]^T
initial position is
ζ (0) = [−300 0 −19800]^T
initial line velocity is
υ(0) =[5 0 0]^T,
the initial attitude is
γ (0) = [0, 0, 0]^T
How to convert this data to frenet frame and find attitude coordinates and then plot a helical trajectory How to generate a helical trajectory using frenet frame?
Position vector given as
[x y z]^T=[[500sin(0.01t) 500cos(0.01t) −2t−20000]^T
initial position is
ζ (0) = [−300 0 −19800]^T
initial line velocity is
υ(0) =[5 0 0]^T,
the initial attitude is
γ (0) = [0, 0, 0]^T
How to convert this data to frenet frame and find attitude coordinates and then plot a helical trajectory frenet, matlab, program, trajectory, helical, helix MATLAB Answers — New Questions
I was trying to play video in integrate HTML of App designer, but it is not working correctly on App. It does work in browsers.
Here is my code for HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>文件选择器</title>
<style>
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f4f4f4;
}
.chosefile {
position: absolute;
top: 50px; /* 距顶部50像素 */
left: 50px; /* 距左侧50像素 */
padding: 10px 20px;
font-size: 16px;
color: #fff;
background-color: #007bff;
border: none;
border-radius: 5px;
cursor: pointer;
outline: none;
transition: background-color 0.3s, transform 0.2s;
}
.calc {
position: absolute;
top: 50px; /* 距顶部50像素 */
left: 200px; /* 距左侧50像素 */
padding: 10px 20px;
font-size: 16px;
color: #fff;
background-color: #007bff;
border: none;
border-radius: 5px;
cursor: pointer;
outline: none;
transition: background-color 0.3s, transform 0.2s;
}
.chosefile:hover, .calc:hover {
background-color: #0056b3;
}
.chosefile:active, .calc:hover {
transform: scale(0.98);
}
</style>
<style>
#frameMarker {
width: 100px;
height: 10px;
background-color: red;
position: absolute;
}
#coordinateArea {
width: 100%;
height: 20px;
position: relative;
background-color: #ddd;
}
</style>
</head>
<body>
<input type="file" id="fileInput" style="display: none;" />
<button class="chosefile" onclick="setup()">选择文件</button>
<button class="calc" onclick="setup();">选择</button>
<div id="prompt">
<span><label for="prompt"><strong>Data from MATLAB will display here:</strong></label></span>
<br/><br/>
<div id ="dataDisplay">Please set data in MATLAB…</div>
</div>
<video id="videoPlayer" width="320" height="240" controls>
<source src="E:/OneDrive/BDF/test.mp4" type="video/mp4">
Your browser does not support the video element.
</video>
<div id="coordinateArea">
<div id="frameMarker"></div>
</div>
</body>
<script type="text/javascript">
function setup(htmlComponent) {
let button1 = document.querySelector(".calc");
let button2 = document.querySelector(".chosefile")
button1.addEventListener("click", function(event) {
htmlComponent.sendEventToMATLAB("ButtonClicked",1);
});
button2.addEventListener("click", function(event) {
htmlComponent.sendEventToMATLAB("ChosefileClicked",1);
});
htmlComponent.addEventListener("DataChanged", function(event) {
document.getElementById("dataDisplay").innerHTML = htmlComponent.Data;
});
}
</script>
<script>
document.getElementById(‘videoPlayer’).addEventListener(‘timeupdate’, function() {
var video = document.getElementById(‘videoPlayer’);
var marker = document.getElementById(‘frameMarker’);
var duration = video.duration;
var currentTime = video.currentTime;
var coordinateAreaWidth = document.getElementById(‘coordinateArea’).clientWidth;
// 计算标记的位置
var position = (currentTime / duration) * coordinateAreaWidth;
marker.style.left = position + ‘px’;
});
</script>
</html>Here is my code for HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>文件选择器</title>
<style>
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f4f4f4;
}
.chosefile {
position: absolute;
top: 50px; /* 距顶部50像素 */
left: 50px; /* 距左侧50像素 */
padding: 10px 20px;
font-size: 16px;
color: #fff;
background-color: #007bff;
border: none;
border-radius: 5px;
cursor: pointer;
outline: none;
transition: background-color 0.3s, transform 0.2s;
}
.calc {
position: absolute;
top: 50px; /* 距顶部50像素 */
left: 200px; /* 距左侧50像素 */
padding: 10px 20px;
font-size: 16px;
color: #fff;
background-color: #007bff;
border: none;
border-radius: 5px;
cursor: pointer;
outline: none;
transition: background-color 0.3s, transform 0.2s;
}
.chosefile:hover, .calc:hover {
background-color: #0056b3;
}
.chosefile:active, .calc:hover {
transform: scale(0.98);
}
</style>
<style>
#frameMarker {
width: 100px;
height: 10px;
background-color: red;
position: absolute;
}
#coordinateArea {
width: 100%;
height: 20px;
position: relative;
background-color: #ddd;
}
</style>
</head>
<body>
<input type="file" id="fileInput" style="display: none;" />
<button class="chosefile" onclick="setup()">选择文件</button>
<button class="calc" onclick="setup();">选择</button>
<div id="prompt">
<span><label for="prompt"><strong>Data from MATLAB will display here:</strong></label></span>
<br/><br/>
<div id ="dataDisplay">Please set data in MATLAB…</div>
</div>
<video id="videoPlayer" width="320" height="240" controls>
<source src="E:/OneDrive/BDF/test.mp4" type="video/mp4">
Your browser does not support the video element.
</video>
<div id="coordinateArea">
<div id="frameMarker"></div>
</div>
</body>
<script type="text/javascript">
function setup(htmlComponent) {
let button1 = document.querySelector(".calc");
let button2 = document.querySelector(".chosefile")
button1.addEventListener("click", function(event) {
htmlComponent.sendEventToMATLAB("ButtonClicked",1);
});
button2.addEventListener("click", function(event) {
htmlComponent.sendEventToMATLAB("ChosefileClicked",1);
});
htmlComponent.addEventListener("DataChanged", function(event) {
document.getElementById("dataDisplay").innerHTML = htmlComponent.Data;
});
}
</script>
<script>
document.getElementById(‘videoPlayer’).addEventListener(‘timeupdate’, function() {
var video = document.getElementById(‘videoPlayer’);
var marker = document.getElementById(‘frameMarker’);
var duration = video.duration;
var currentTime = video.currentTime;
var coordinateAreaWidth = document.getElementById(‘coordinateArea’).clientWidth;
// 计算标记的位置
var position = (currentTime / duration) * coordinateAreaWidth;
marker.style.left = position + ‘px’;
});
</script>
</html> Here is my code for HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>文件选择器</title>
<style>
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f4f4f4;
}
.chosefile {
position: absolute;
top: 50px; /* 距顶部50像素 */
left: 50px; /* 距左侧50像素 */
padding: 10px 20px;
font-size: 16px;
color: #fff;
background-color: #007bff;
border: none;
border-radius: 5px;
cursor: pointer;
outline: none;
transition: background-color 0.3s, transform 0.2s;
}
.calc {
position: absolute;
top: 50px; /* 距顶部50像素 */
left: 200px; /* 距左侧50像素 */
padding: 10px 20px;
font-size: 16px;
color: #fff;
background-color: #007bff;
border: none;
border-radius: 5px;
cursor: pointer;
outline: none;
transition: background-color 0.3s, transform 0.2s;
}
.chosefile:hover, .calc:hover {
background-color: #0056b3;
}
.chosefile:active, .calc:hover {
transform: scale(0.98);
}
</style>
<style>
#frameMarker {
width: 100px;
height: 10px;
background-color: red;
position: absolute;
}
#coordinateArea {
width: 100%;
height: 20px;
position: relative;
background-color: #ddd;
}
</style>
</head>
<body>
<input type="file" id="fileInput" style="display: none;" />
<button class="chosefile" onclick="setup()">选择文件</button>
<button class="calc" onclick="setup();">选择</button>
<div id="prompt">
<span><label for="prompt"><strong>Data from MATLAB will display here:</strong></label></span>
<br/><br/>
<div id ="dataDisplay">Please set data in MATLAB…</div>
</div>
<video id="videoPlayer" width="320" height="240" controls>
<source src="E:/OneDrive/BDF/test.mp4" type="video/mp4">
Your browser does not support the video element.
</video>
<div id="coordinateArea">
<div id="frameMarker"></div>
</div>
</body>
<script type="text/javascript">
function setup(htmlComponent) {
let button1 = document.querySelector(".calc");
let button2 = document.querySelector(".chosefile")
button1.addEventListener("click", function(event) {
htmlComponent.sendEventToMATLAB("ButtonClicked",1);
});
button2.addEventListener("click", function(event) {
htmlComponent.sendEventToMATLAB("ChosefileClicked",1);
});
htmlComponent.addEventListener("DataChanged", function(event) {
document.getElementById("dataDisplay").innerHTML = htmlComponent.Data;
});
}
</script>
<script>
document.getElementById(‘videoPlayer’).addEventListener(‘timeupdate’, function() {
var video = document.getElementById(‘videoPlayer’);
var marker = document.getElementById(‘frameMarker’);
var duration = video.duration;
var currentTime = video.currentTime;
var coordinateAreaWidth = document.getElementById(‘coordinateArea’).clientWidth;
// 计算标记的位置
var position = (currentTime / duration) * coordinateAreaWidth;
marker.style.left = position + ‘px’;
});
</script>
</html> appdesigner, app designer MATLAB Answers — New Questions
New List Experience – Turn Off Pop up window
Hello everyone,
We have the new SharePoint list experience and honestly, we hate it so much!
It is so buggy and we want to roll back.
1. When we click on new item or open an item, it opens up in a teeny tiny pop-up. Is there any way to revert to the full screen that opens from the right? We had a great three-column set up and now the form opens in a tiny window in a single column.
2. When we click on the column name to filter/sort or edit, it keeps throwing an error “Could not find tow selection cell or item key header” and have to refresh the page to access the list again.
3. Layout and formatting have gone haywire and all the align and padding conditional formatting done through column JSON formatting are no longer consistent across devices.
Why does Microsoft shove such a buggy awful product down our throats with no rollback option? This is something we should opt in for experiments and definitely not ready for production tenants.
We absolutely hate this!
Hello everyone, We have the new SharePoint list experience and honestly, we hate it so much! It is so buggy and we want to roll back. 1. When we click on new item or open an item, it opens up in a teeny tiny pop-up. Is there any way to revert to the full screen that opens from the right? We had a great three-column set up and now the form opens in a tiny window in a single column. 2. When we click on the column name to filter/sort or edit, it keeps throwing an error “Could not find tow selection cell or item key header” and have to refresh the page to access the list again. 3. Layout and formatting have gone haywire and all the align and padding conditional formatting done through column JSON formatting are no longer consistent across devices. Why does Microsoft shove such a buggy awful product down our throats with no rollback option? This is something we should opt in for experiments and definitely not ready for production tenants. We absolutely hate this! Read More
I have written a code to reproduce fig 2 in the attached paper but I don’t seem to get it right.
I am trying a code to reproduce fig 2 in the attached paper, but I don’t seem to get it right. Any help would be apreciated. Thanks
% Material properties
rho = 1.35e3; % Density in kg/m^3
Cp = @(T) (-0.07827 + 0.00223*T – 8.66702e-7*T.^2 + 9.63112e-11*T.^3) * 1e3; % Specific heat in J/g°C converted to J/kgK
alpha = 3.5e3; % Absorption coefficient in m^-1
R = 0.1; % Reflectivity
pulseWidth = 6e-9; % Pulse width in seconds
fluence = 790e-3; % Laser fluence in J/cm^2
I0 = fluence / pulseWidth; % Peak laser intensity
% Spatial domain
L = 1e-3; % Length of the sample in meters (1 mm)
num_elements = 100; % Number of spatial elements
x = linspace(0, L, num_elements); % Spatial grid
% Time domain
total_time = 50e-9; % Total time in seconds
num_time_steps = 500; % Number of time steps
t = linspace(0, total_time, num_time_steps); % Time vector
% Initial temperature distribution
T0 = 20; % Initial temperature in °C
T = T0 * ones(num_elements, 1); % Initial temperature vector
% Thermal diffusivity (D = k / (rho * Cp))
D = 0.4e-4; % Thermal diffusivity in m^2/s
k = D * rho * Cp(T0); % Thermal conductivity in W/m°C
% FEM setup
dx = L / (num_elements – 1); % Spatial step size
dt = total_time / num_time_steps; % Time step size
% FEM matrices
A = zeros(num_elements, num_elements);
B = zeros(num_elements, 1);
% Assembly of FEM matrices
for i = 2:num_elements-1
A(i, i-1) = k / dx^2;
A(i, i) = -2 * k / dx^2;
A(i, i+1) = k / dx^2;
end
% Boundary conditions
A(1, 1) = 1;
A(1, 2) = 0;
A(end, end) = 1;
A(end, end-1) = 0;
% Time-stepping solution
T_history = zeros(num_elements, num_time_steps);
T_history(:, 1) = T;
for n = 1:num_time_steps-1
B(2:end-1) = alpha * I0 * exp(-alpha * x(2:end-1)) * (1 – R);
B(end) = T0; % Bottom boundary condition (fixed temperature)
T = T + dt * (A * T + B);
T(1) = T0; % surface boundary condition
T_history(:, n+1) = T;
end
% Plotting the results
figure;
hold on;
plot(t, T_history(1, :), ‘r’, ‘DisplayName’, ‘Surface’);
plot(t, T_history(find(x >= 1e-6, 1), :), ‘g’, ‘DisplayName’, ‘1 mum’);
plot(t, T_history(find(x >= 5e-6, 1), :), ‘b’, ‘DisplayName’, ‘5 mum’);
xlabel(‘Time (s)’);
ylabel(‘Temperature (°C)’);
legend;
title(‘Temperature profiles at different depths’);
hold off;I am trying a code to reproduce fig 2 in the attached paper, but I don’t seem to get it right. Any help would be apreciated. Thanks
% Material properties
rho = 1.35e3; % Density in kg/m^3
Cp = @(T) (-0.07827 + 0.00223*T – 8.66702e-7*T.^2 + 9.63112e-11*T.^3) * 1e3; % Specific heat in J/g°C converted to J/kgK
alpha = 3.5e3; % Absorption coefficient in m^-1
R = 0.1; % Reflectivity
pulseWidth = 6e-9; % Pulse width in seconds
fluence = 790e-3; % Laser fluence in J/cm^2
I0 = fluence / pulseWidth; % Peak laser intensity
% Spatial domain
L = 1e-3; % Length of the sample in meters (1 mm)
num_elements = 100; % Number of spatial elements
x = linspace(0, L, num_elements); % Spatial grid
% Time domain
total_time = 50e-9; % Total time in seconds
num_time_steps = 500; % Number of time steps
t = linspace(0, total_time, num_time_steps); % Time vector
% Initial temperature distribution
T0 = 20; % Initial temperature in °C
T = T0 * ones(num_elements, 1); % Initial temperature vector
% Thermal diffusivity (D = k / (rho * Cp))
D = 0.4e-4; % Thermal diffusivity in m^2/s
k = D * rho * Cp(T0); % Thermal conductivity in W/m°C
% FEM setup
dx = L / (num_elements – 1); % Spatial step size
dt = total_time / num_time_steps; % Time step size
% FEM matrices
A = zeros(num_elements, num_elements);
B = zeros(num_elements, 1);
% Assembly of FEM matrices
for i = 2:num_elements-1
A(i, i-1) = k / dx^2;
A(i, i) = -2 * k / dx^2;
A(i, i+1) = k / dx^2;
end
% Boundary conditions
A(1, 1) = 1;
A(1, 2) = 0;
A(end, end) = 1;
A(end, end-1) = 0;
% Time-stepping solution
T_history = zeros(num_elements, num_time_steps);
T_history(:, 1) = T;
for n = 1:num_time_steps-1
B(2:end-1) = alpha * I0 * exp(-alpha * x(2:end-1)) * (1 – R);
B(end) = T0; % Bottom boundary condition (fixed temperature)
T = T + dt * (A * T + B);
T(1) = T0; % surface boundary condition
T_history(:, n+1) = T;
end
% Plotting the results
figure;
hold on;
plot(t, T_history(1, :), ‘r’, ‘DisplayName’, ‘Surface’);
plot(t, T_history(find(x >= 1e-6, 1), :), ‘g’, ‘DisplayName’, ‘1 mum’);
plot(t, T_history(find(x >= 5e-6, 1), :), ‘b’, ‘DisplayName’, ‘5 mum’);
xlabel(‘Time (s)’);
ylabel(‘Temperature (°C)’);
legend;
title(‘Temperature profiles at different depths’);
hold off; I am trying a code to reproduce fig 2 in the attached paper, but I don’t seem to get it right. Any help would be apreciated. Thanks
% Material properties
rho = 1.35e3; % Density in kg/m^3
Cp = @(T) (-0.07827 + 0.00223*T – 8.66702e-7*T.^2 + 9.63112e-11*T.^3) * 1e3; % Specific heat in J/g°C converted to J/kgK
alpha = 3.5e3; % Absorption coefficient in m^-1
R = 0.1; % Reflectivity
pulseWidth = 6e-9; % Pulse width in seconds
fluence = 790e-3; % Laser fluence in J/cm^2
I0 = fluence / pulseWidth; % Peak laser intensity
% Spatial domain
L = 1e-3; % Length of the sample in meters (1 mm)
num_elements = 100; % Number of spatial elements
x = linspace(0, L, num_elements); % Spatial grid
% Time domain
total_time = 50e-9; % Total time in seconds
num_time_steps = 500; % Number of time steps
t = linspace(0, total_time, num_time_steps); % Time vector
% Initial temperature distribution
T0 = 20; % Initial temperature in °C
T = T0 * ones(num_elements, 1); % Initial temperature vector
% Thermal diffusivity (D = k / (rho * Cp))
D = 0.4e-4; % Thermal diffusivity in m^2/s
k = D * rho * Cp(T0); % Thermal conductivity in W/m°C
% FEM setup
dx = L / (num_elements – 1); % Spatial step size
dt = total_time / num_time_steps; % Time step size
% FEM matrices
A = zeros(num_elements, num_elements);
B = zeros(num_elements, 1);
% Assembly of FEM matrices
for i = 2:num_elements-1
A(i, i-1) = k / dx^2;
A(i, i) = -2 * k / dx^2;
A(i, i+1) = k / dx^2;
end
% Boundary conditions
A(1, 1) = 1;
A(1, 2) = 0;
A(end, end) = 1;
A(end, end-1) = 0;
% Time-stepping solution
T_history = zeros(num_elements, num_time_steps);
T_history(:, 1) = T;
for n = 1:num_time_steps-1
B(2:end-1) = alpha * I0 * exp(-alpha * x(2:end-1)) * (1 – R);
B(end) = T0; % Bottom boundary condition (fixed temperature)
T = T + dt * (A * T + B);
T(1) = T0; % surface boundary condition
T_history(:, n+1) = T;
end
% Plotting the results
figure;
hold on;
plot(t, T_history(1, :), ‘r’, ‘DisplayName’, ‘Surface’);
plot(t, T_history(find(x >= 1e-6, 1), :), ‘g’, ‘DisplayName’, ‘1 mum’);
plot(t, T_history(find(x >= 5e-6, 1), :), ‘b’, ‘DisplayName’, ‘5 mum’);
xlabel(‘Time (s)’);
ylabel(‘Temperature (°C)’);
legend;
title(‘Temperature profiles at different depths’);
hold off; finite element method MATLAB Answers — New Questions
Visualozing Attention for Sequence Data in the Frequency domain
I have trouble finding out how i can map my attention weights onto my input data.
My input data is in a 512*1 Cell, it represents a vibration in the frequency-domain, after going through different layers (mainly 2 CNN and 2 Bi-GRU), i have a high level representation of it(480*1), that enters a self attention layer.
I am able to extract the attention weights (256*1), but I am unsure on how to map them to my input sequence, am i able to just upscale the attention vector and overlay it onto my input?
I’ve added a screenshots of the model structure, to help you understand the problem.
The whole problem is further illustrated in this research paper.
I would be grateful for anyone, who can help me understand how I need to proceed.I have trouble finding out how i can map my attention weights onto my input data.
My input data is in a 512*1 Cell, it represents a vibration in the frequency-domain, after going through different layers (mainly 2 CNN and 2 Bi-GRU), i have a high level representation of it(480*1), that enters a self attention layer.
I am able to extract the attention weights (256*1), but I am unsure on how to map them to my input sequence, am i able to just upscale the attention vector and overlay it onto my input?
I’ve added a screenshots of the model structure, to help you understand the problem.
The whole problem is further illustrated in this research paper.
I would be grateful for anyone, who can help me understand how I need to proceed. I have trouble finding out how i can map my attention weights onto my input data.
My input data is in a 512*1 Cell, it represents a vibration in the frequency-domain, after going through different layers (mainly 2 CNN and 2 Bi-GRU), i have a high level representation of it(480*1), that enters a self attention layer.
I am able to extract the attention weights (256*1), but I am unsure on how to map them to my input sequence, am i able to just upscale the attention vector and overlay it onto my input?
I’ve added a screenshots of the model structure, to help you understand the problem.
The whole problem is further illustrated in this research paper.
I would be grateful for anyone, who can help me understand how I need to proceed. machine learning, time series MATLAB Answers — New Questions
WindowButtonDownFcn vs zoom or pan
In my figure I have some little images; I’ve implemented WindowButtonDownFcn so when I click on an image, I do something different according to the image selected
The cursor position is checked with WindowButtonMotionFcn
Practically, every little image simulates a button with its callback function. I do this because the graphical aspect of my figure is better, and I can have a ‘button’ of different shape instead of the square or rectangular button shape. Moreover, I don’t have the button outline.
Im my figure I have also an axis, used to plot data.
When I activate the zoom or the panning, the WindowButtonDownFcn function doesn’t work, my ‘buttons’ don’t work anymore until I deactivate the zoom or the pan.
This behaviour there is also if I set the zoom (or panning) on programmatically.
Is there a way to avoid this behaviour? I need the WindowButtonDownFcn ALWAYS working.
Thank youIn my figure I have some little images; I’ve implemented WindowButtonDownFcn so when I click on an image, I do something different according to the image selected
The cursor position is checked with WindowButtonMotionFcn
Practically, every little image simulates a button with its callback function. I do this because the graphical aspect of my figure is better, and I can have a ‘button’ of different shape instead of the square or rectangular button shape. Moreover, I don’t have the button outline.
Im my figure I have also an axis, used to plot data.
When I activate the zoom or the panning, the WindowButtonDownFcn function doesn’t work, my ‘buttons’ don’t work anymore until I deactivate the zoom or the pan.
This behaviour there is also if I set the zoom (or panning) on programmatically.
Is there a way to avoid this behaviour? I need the WindowButtonDownFcn ALWAYS working.
Thank you In my figure I have some little images; I’ve implemented WindowButtonDownFcn so when I click on an image, I do something different according to the image selected
The cursor position is checked with WindowButtonMotionFcn
Practically, every little image simulates a button with its callback function. I do this because the graphical aspect of my figure is better, and I can have a ‘button’ of different shape instead of the square or rectangular button shape. Moreover, I don’t have the button outline.
Im my figure I have also an axis, used to plot data.
When I activate the zoom or the panning, the WindowButtonDownFcn function doesn’t work, my ‘buttons’ don’t work anymore until I deactivate the zoom or the pan.
This behaviour there is also if I set the zoom (or panning) on programmatically.
Is there a way to avoid this behaviour? I need the WindowButtonDownFcn ALWAYS working.
Thank you windowbuttondownfcn MATLAB Answers — New Questions
Add a new customer to a list of customers in a table
I use a sheet just for gathering customer information for new customers. I use this to feed information to sheets that generate bids for the 4 services I offer. Cells B3-B7 are Named Cells.
I’d like to copy this information (above) to a list of customers in a table on a separate sheet (below). This way, when I work for a customer on future jobs and do the exact same job I can run a macro to copy information from the table back to the cells in the screenshot above. From here I can quickly generate a bid for my services at current prices, and I don’t have to worry about typing in the wrong information.
So my question is: how do I copy Nicole’s information to row 6, the next customer’s information to rows7, etc with a macro?
I use a sheet just for gathering customer information for new customers. I use this to feed information to sheets that generate bids for the 4 services I offer. Cells B3-B7 are Named Cells. I’d like to copy this information (above) to a list of customers in a table on a separate sheet (below). This way, when I work for a customer on future jobs and do the exact same job I can run a macro to copy information from the table back to the cells in the screenshot above. From here I can quickly generate a bid for my services at current prices, and I don’t have to worry about typing in the wrong information. So my question is: how do I copy Nicole’s information to row 6, the next customer’s information to rows7, etc with a macro? Read More
Excel Help
I have an excel file with emp id, name, designation, department, date, ot hours and normal hours as columns.
Here are some sample data
111,John,Manager,HR,01/01/2024,0,9
111,John,Manager,HR,01/03/2024,3,0
111,John,Manager,HR,01/04/2024,2,9
222,Rogr,Supervr,MM,01/01/2024,0,9
222,Rogr,Supervr,MM,01/02/2024,0,9
333,Sand,PSWABCs,NG,01/15/2024,0,9
333,Sand,PSWABCs,NG,01/16/2024,0,9
333,Sand,PSWABCs,NG,01/17/2024,0,9
333,Sand,PSWABCs,NG,01/19/2024,0,9
333,Sand,PSWABCs,NG,01/25/2024,4,9
My requirement is show emp id, name, designation, department, type and convert the date into column and show the ot and normal hours. Type column should show the hour type (OT or Normal)
If the employee got both ot and normal, there should be 2 rows. Row 1 normal hours and Row 2 OT hours.
Also, if for the month a date is missing, I still need to see that as a header column and show 0 for both OT and normal.
With the above sample data, I am looking for the following results for employee 111
111,John,Manager,HR,01/01/2024,OT,0
111,John,Manager,HR,01/01/2024,Normal,9
111,John,Manager,HR,01/03/2024,OT,3
111,John,Manager,HR,01/03/2024,Normal,0
111,John,Manager,HR,01/04/2024,OT,2
111,John,Manager,HR,01/04/2024,Normal,9
I have an excel file with emp id, name, designation, department, date, ot hours and normal hours as columns.Here are some sample data111,John,Manager,HR,01/01/2024,0,9111,John,Manager,HR,01/03/2024,3,0111,John,Manager,HR,01/04/2024,2,9222,Rogr,Supervr,MM,01/01/2024,0,9222,Rogr,Supervr,MM,01/02/2024,0,9333,Sand,PSWABCs,NG,01/15/2024,0,9333,Sand,PSWABCs,NG,01/16/2024,0,9333,Sand,PSWABCs,NG,01/17/2024,0,9333,Sand,PSWABCs,NG,01/19/2024,0,9333,Sand,PSWABCs,NG,01/25/2024,4,9My requirement is show emp id, name, designation, department, type and convert the date into column and show the ot and normal hours. Type column should show the hour type (OT or Normal)If the employee got both ot and normal, there should be 2 rows. Row 1 normal hours and Row 2 OT hours.Also, if for the month a date is missing, I still need to see that as a header column and show 0 for both OT and normal.With the above sample data, I am looking for the following results for employee 111111,John,Manager,HR,01/01/2024,OT,0111,John,Manager,HR,01/01/2024,Normal,9111,John,Manager,HR,01/03/2024,OT,3111,John,Manager,HR,01/03/2024,Normal,0111,John,Manager,HR,01/04/2024,OT,2111,John,Manager,HR,01/04/2024,Normal,9 Read More
Symbol Vertical Alignment
Can anyone tell me if the vertical alignment of a symbol can be adjusted?
Wanting to use Segoe Fluent Icons as bullets, but the fluent symbols are aligned with the top of the line space and the text is aligned in the middle.
Hoping I can get the symbol and text to be aligned. See below examples, 2nd example is using Segoe Emoji, which aligns fine. TIA
Can anyone tell me if the vertical alignment of a symbol can be adjusted? Wanting to use Segoe Fluent Icons as bullets, but the fluent symbols are aligned with the top of the line space and the text is aligned in the middle. Hoping I can get the symbol and text to be aligned. See below examples, 2nd example is using Segoe Emoji, which aligns fine. TIA Read More
How to buy MATLAB license in Ukraine (2023)?
Dear Sirs,
I would like to buy MATLAB for the company in Ukraine.
But I can’t do that because Mathworks representer in Ukraine is russia.
Could you please help me to buy license officially?
Best wishes,
OlegDear Sirs,
I would like to buy MATLAB for the company in Ukraine.
But I can’t do that because Mathworks representer in Ukraine is russia.
Could you please help me to buy license officially?
Best wishes,
Oleg Dear Sirs,
I would like to buy MATLAB for the company in Ukraine.
But I can’t do that because Mathworks representer in Ukraine is russia.
Could you please help me to buy license officially?
Best wishes,
Oleg license purchase issue MATLAB Answers — New Questions
How to make the colorbar/colormap with colors the same as ANSYS in Matlab?
In ANSYS, when there is zero deflection, the color is blue. For maximum negative and maximum positive, red is shown. In matlab, when there is zero deflection, the color is green. For maximum positive deflection the color is red and for maximum negative deflection the color is blue. How to configure Matlab to display the same colorbar as Ansys?
See the difference between the figures:
Matlab:
Ansys:
Thank you!In ANSYS, when there is zero deflection, the color is blue. For maximum negative and maximum positive, red is shown. In matlab, when there is zero deflection, the color is green. For maximum positive deflection the color is red and for maximum negative deflection the color is blue. How to configure Matlab to display the same colorbar as Ansys?
See the difference between the figures:
Matlab:
Ansys:
Thank you! In ANSYS, when there is zero deflection, the color is blue. For maximum negative and maximum positive, red is shown. In matlab, when there is zero deflection, the color is green. For maximum positive deflection the color is red and for maximum negative deflection the color is blue. How to configure Matlab to display the same colorbar as Ansys?
See the difference between the figures:
Matlab:
Ansys:
Thank you! colormap, color, surface, contour, 3d plots, plot MATLAB Answers — New Questions
Error while importing Google Satellite image into Roadrunner
I have exported a Google Satellite image from QGIS (as a GeoTIFF file), however, when I try to import it into Roadrunner, the bounding box appears but the image doesn’t, and an error (visible in the attached image) appears in the output. How to solve this?I have exported a Google Satellite image from QGIS (as a GeoTIFF file), however, when I try to import it into Roadrunner, the bounding box appears but the image doesn’t, and an error (visible in the attached image) appears in the output. How to solve this? I have exported a Google Satellite image from QGIS (as a GeoTIFF file), however, when I try to import it into Roadrunner, the bounding box appears but the image doesn’t, and an error (visible in the attached image) appears in the output. How to solve this? google satellite, import MATLAB Answers — New Questions
How to make map with unequal colorbar
Hello everyone,
I know this question has been asked numeroud times, but still I am stuck at this.
I want to make a create a map in which colorbar is cutomized. I am pasting a example
Any help or tips will be great.
ThanksHello everyone,
I know this question has been asked numeroud times, but still I am stuck at this.
I want to make a create a map in which colorbar is cutomized. I am pasting a example
Any help or tips will be great.
Thanks Hello everyone,
I know this question has been asked numeroud times, but still I am stuck at this.
I want to make a create a map in which colorbar is cutomized. I am pasting a example
Any help or tips will be great.
Thanks colormap, colorbar MATLAB Answers — New Questions
What are Common Causes and Solutions for QuickBooks Error 1310?
QuickBooks Error 1310 often arises from permission issues or file system restrictions encountered during software installation or updates. Insufficient permissions or restrictions on certain directories can hinder the process, leading to error messages like “Error writing to file” or “Error creating file.” Common causes include inadequate user permissions, interference from antivirus software, or system errors. To resolve this issue, users should first ensure they have administrative privileges and temporarily disable antivirus programs during installation. Additionally, adjusting file permissions, cleaning temporary files, and running installation processes as an administrator can help mitigate the error. Performing a clean install of QuickBooks after thorough system checks can also address underlying issues, ensuring smooth software functionality without interruptions.
QuickBooks Error 1310 often arises from permission issues or file system restrictions encountered during software installation or updates. Insufficient permissions or restrictions on certain directories can hinder the process, leading to error messages like “Error writing to file” or “Error creating file.” Common causes include inadequate user permissions, interference from antivirus software, or system errors. To resolve this issue, users should first ensure they have administrative privileges and temporarily disable antivirus programs during installation. Additionally, adjusting file permissions, cleaning temporary files, and running installation processes as an administrator can help mitigate the error. Performing a clean install of QuickBooks after thorough system checks can also address underlying issues, ensuring smooth software functionality without interruptions. Read More
Best Practice Guidance for PTU
Co-authors: Luca Stamatescu, Alex Shen, Ming Gu, Michael Tremeer
Contributors: Ranjani Mani
In today’s rapidly evolving tech landscape, proficiency with Azure OpenAI is crucial for maintaining a competitive edge. Enhanced by the latest announcements at Build 2024, this guide from our Global Black Belt team focuses on the effective management of Provisioned Throughput Units (PTUs) to optimize both performance and cost-efficiency in AI deployments. This document provides essential strategies for strategic PTU management, alignment with the Azure Well-Architected Framework, and the latest Azure API management tools, empowering you to fully utilize the capabilities of Azure OpenAI.
Understanding and Leveraging PTUs for Azure Open AI
Understanding the Value of PTUs
Provisioned Throughput Units (PTUs) are designed to deliver consistent and predictable performance for AI models on Azure OpenAI, making them an essential consideration for efficient deployments. By understanding the advantages of PTUs, such as cost-effectiveness through appropriate sizing and handling peak loads with overflow patterns, one can appreciate how PTUs strike a balance between performance and cost-efficiency. These units maintain minimal latency and provide a high-quality user experience, even during peak usage times. By integrating PTUs with Pay-As-You-Go options for additional traffic, optimal cost management is achievable while maintaining high service levels.
Call To Action: For a comprehensive understanding of how PTUs can improve Azure OpenAI deployment’s performance and cost-effectiveness, please refer to the following resources.
Primary Resource: Azure OpenAI Service provisioned throughput – Azure AI services | Microsoft Learn
Additional Resources:
Right-size your PTU deployment and save big
Estimating PTU Requirements
Accurately estimating PTUs for a deployment requires analysis of specific scenarios, whether the traffic is consistent or subject to peaks. Implementing spillover or bursting strategies can efficiently manage unexpected traffic surges without the need for excessive provisioning. Using historical data alongside the Azure OpenAI Capacity Calculator allows for the simulation of various traffic patterns and precise PTU estimations. It’s important to align with the customer’s performance expectations and their tolerance for potential performance dips during peak periods.
Call To Action: Utilize the Azure OpenAI Capacity Calculator to prepare accurate PTU estimates. Engage with the GBB team for benchmarking support to ensure optimal solution sizing.
Primary Resource: Azure Open AI Solution Sizing Tool
Additional Resources:
Azure/azure-openai-benchmark: Azure OpenAI benchmarking tool (github.com)
Securing and Optimizing Azure OpenAI Deployments
Security, Compliance, and PII Management Guidance
It is crucial to guide new customers in securing their Azure OpenAI deployments. This involves using Microsoft Entra ID for authentication and implementing role-based access control (RBAC). Educating about security strategies and potential vulnerabilities as outlined in the Azure Well-Architected Framework is essential for enhancing security postures. Discuss the importance of a recovery strategy that includes plans for fine-tuned models and training data and implementing Private Endpoints to restrict network access to trusted sources only.
Handling PII through GenAI Gateway: The GenAI Gateway offers options for managing Personally Identifiable Information (PII), such as centralized detection and masking, and using Azure Text Analytics API for automated PII detection. Employing workflow automation tools like Azure Functions or Logic Apps can automate the detection and masking process, effectively balancing latency with privacy needs.
Call To Action: Ensure your Azure Open AI deployment aligns with best practices for security and compliance as per the Azure Well-Architected Framework.
Primary Resource: Azure Well-Architected Framework perspective on Azure OpenAI Service
Additional Resources:
Security and Data Integrity | Microsoft Learn
Handling Peak Loads with Advanced Load Distributions Patterns
In managing peak loads with Azure OpenAI resources, it is critical to implement efficient patterns like load balancer, circuit breakers and Token Limit policy, which align with Azure’s architectural best practices. These strategies help manage traffic efficiently without over-provisioning PTUs, ensuring that service quality is maintained even during high traffic periods. The recent announcements on GenAI Gateway have further simplified the process of implementing APIM policies while enriching the functionalities further.
Azure OpenAI Token Limit policy allows you to manage and enforce limits per API consumer based on the usage of Azure OpenAI tokens. With this policy you can set limits, expressed in tokens-per-minute (TPM).
This policy provides flexibility to assign token-based limits on any counter key, such as Subscription Key, IP Address or any other arbitrary key defined through policy expression. Azure OpenAI Token Limit policy also enables pre-calculation of prompt tokens on the Azure API Management side, minimizing unnecessary request to the Azure OpenAI backend if the prompt already exceeds the limit.
Load Balancer and Circuit Breaker features allow you to spread the load across multiple Azure OpenAI endpoints. With support for round-robin, weighted (new), and priority-based (new) load balancing, you can now define your own load distribution strategy according to your specific requirements.
Implementation Considerations: Define priorities within the load balancer configuration to ensure optimal utilization of specific Azure OpenAI endpoints, particularly those purchased as PTUs. In the event of any disruption, a circuit breaker mechanism kicks in, seamlessly transitioning to lower-priority instances based on predefined rules. Our updated circuit breaker now features dynamic trip duration, leveraging values from the retry-after header provided by the backend. This ensures precise and timely recovery of the backends, maximizing the utilization of your priority backends to their fullest.
Call to Action: Evaluate your application’s peak load behaviors to determine the most suitable strategy for ensuring continuous critical operation with consistent performance.
Primary Resources: Implementing a Gen AI Gateway
Additional Resources:
GenAI Gateway Capabilities in APIM
OpenAI PTU – Handling High Utilization
Monitoring and Optimization
Setting Up Azure Monitoring Workbooks
Effective monitoring of your Azure OpenAI PTU deployments can be significantly enhanced by utilizing Azure’s comprehensive suite of monitoring tools. Here’s a streamlined approach to ensure you have complete visibility and control over your deployment’s performance:
Azure OpenAI Metrics Dashboards: Start with the out-of-box dashboards provided by Azure OpenAI in the Azure portal. These dashboards display key metrics such as HTTP requests, tokens-based usage, PTU utilization, and fine-tuning activities, offering a quick snapshot of your deployment’s health and performance.
Analyze Metrics: Utilize Azure Monitor metrics explorer to delve into essential metrics captured by default:
Azure OpenAI Requests: Tracks the total number of API calls split by Status Code.
Generated Completion Tokens and Processed Inference Tokens: Monitors token usage, which is crucial for managing capacity and operational costs.
Provision-managed Utilization V2: Provides insights into utilization percentages, helping prevent overuse and ensuring efficient resource allocation.
Time to Response: Time taken for the first response to appear after a user send a prompt.
It is good to monitor max/avg values at different granularities ranging from minute to day level.
Diagnostic Settings and Log Analytics: Configure diagnostic settings to collect detailed logs and metrics, routing them to Azure Monitor Logs. Use Azure Log Analytics for an in-depth examination of these logs, allowing for complex analyses and the creation of customized visualizations. This integration is key for diagnosing specific issues and gaining deeper operational insights.
Alerts Setup: Set up alerts in Azure Monitor to receive proactive notifications about conditions that could impact your deployment. These alerts can be instrumental in addressing potential issues swiftly, maintaining system performance and availability.
Azure Monitor Workbooks: Employ Azure Monitor Workbooks to create custom interactive reports and visualizations. Tailor these reports to meet your specific monitoring needs, and share them with your team for collaborative analysis and decision-making.
Call To Action: Enhance your monitoring capabilities for Azure OpenAI PTU deployments by implementing these integrated Azure monitoring tools. Start with viewing metrics on the dashboards, set up diagnostic settings to collect detailed data, and use Azure Monitor Workbooks and Log Analytics for comprehensive analysis and proactive management. This approach ensures that your deployments are monitored effectively, supporting optimal performance and reliability.
Primary Resources: Monitoring Azure OpenAI Service – Azure AI services
Additional Resources:
Monitoring your Azure OpenAI usage (part 2) – Stefano Demiliani
Calculating Usage-Based Chargebacks
To calculate usage-based chargebacks for Provisioned Throughput Units (PTUs) when sharing an Azure OpenAI instance across multiple business units, it is essential to monitor and log token consumption accurately. Incorporate the “azure-openai-emit-token-metric” policy in Azure API Management to emit token consumption metrics directly into Application Insights. This policy facilitates tracking various token metrics such as Total Tokens, Prompt Tokens, and Completion Tokens, allowing for a thorough analysis of service utilization. Configure the policy with specific dimensions such as User ID, Client IP, and API ID to enhance granularity in reporting and insights. By implementing these strategies, organizations can ensure transparent and fair chargebacks based on actual usage, fostering accountability and optimized resource allocation across different business units.
Call To Action: Implement robust chargeback calculation mechanisms by leveraging Azure API Management Policies and leverage out of the box/custom Application Insights Dashboards for clear visibility into PTU usage across your organization.
Primary Resource: Azure API Management policy reference – azure-openai-emit-token-metric
Additional Resources:
Azure OpenAI Emit Token Metric policy in Azure API Management
Implementing Cost-Efficient Solutions
To optimize cost efficiency in managing Provisioned Throughput Units (PTUs), organizations should consider a multi-faceted approach:
Semantic Caching: Utilize the Azure OpenAI Semantic Caching policy to reduce token usage by storing and reusing responses for semantically similar prompts through Azure Redis Enterprise or compatible caches. This method enhances response times and reduces costs.
Batch Workloads in Lean Times: Schedule batch processing tasks during periods of low PTU utilization to maximize the use of pre-purchased PTUs, ensuring efficient resource usage throughout the day.
Spillover Pattern: Adopt a spillover strategy to manage excess traffic by routing it to Pay-As-You-Go (PAYG) endpoints during peak times. This allows for maintaining service quality with minimal PTU over-provisioning and significant cost savings.
Call to Action: Assess your current PTU management strategies and consider integrating these approaches to enhance efficiency and reduce costs. Utilize tools like the Azure OpenAI Sizing Tool to evaluate and optimize your PTU allocations based on real usage patterns, ensuring a balanced and cost-effective deployment.
Primary Resources:
Cost Optimization | Microsoft Learn
GenAI Gateway Capabilities in APIM
Support and Escalation
Managing Service Parameters with AOAI Deployments
Effective management of Service Parameters with Azure OpenAI PTU deployments hinges on meticulous capacity monitoring and handling overcapacity intelligently. Azure uses a variation of the leaky bucket algorithm to manage bursts and prevent utilization from exceeding 100%. This strategy helps balance high utilization against the risk of over-utilization. After processing a request, Azure adjusts the utilization measure based on the actual compute cost, ensuring accurate capacity monitoring.
Here’s a concise guide to maintaining your service parameters efficiently:
Key Metrics and Monitoring
Provisioned-Managed Utilization V2: This Azure Monitor metric is crucial for real-time monitoring, measuring your deployment’s utilization in 1-minute increments. It ensures that your deployment processes calls with consistent timing.
Handling Capacity Limits
429 Responses: Not an error but an indicator of full capacity usage at a given time. Managing these involves two strategic approaches:
Traffic Redirection: Redirect excess traffic to alternative models or deployments to maintain service availability.
Retry Logic: Implement client-side retry mechanisms where longer latencies are acceptable, thereby maximizing throughput.
Managing Concurrent Calls
Understand the impact of prompt size and max_token settings on the number of manageable concurrent calls. The system continues to accept requests until reaching 100% utilization, guided by the settings you choose.
Call To Action: Regularly monitor the Provisioned-Managed Utilization V2 metric to optimize service parameters. Respond promptly to 429 responses by redirecting traffic or employing retry strategies. Adjust max_token values and other settings to optimize the balance between concurrency and utilization, ensuring your deployments maintain optimal value of service parameters.
Primary Resource: Understanding Rate Limits-limits
Handling Throttling Errors
When encountering throttling errors with Provisioned Throughput Units (PTUs), it is important to understand and follow best practices to avoid rate limiting issues. Throttling typically occurs when the service’s request rate exceeds the quota or allocated PTUs. To handle throttling effectively:
Gradually increase workloads to avoid sudden spikes in demand.
Batch requests where appropriate, combining multiple tasks into a single call, especially if there’s headroom on tokens per minute but limits are being hit on requests per minute.
Implement retry logic with exponential backoff strategies for handling 429 (Too Many Requests) errors, allowing subsequent attempts at spaced-out intervals.
Monitor your application’s usage patterns and adjust PTU allocation accordingly using Azure AI Studio’s quota management features.
Utilize Azure API Management (APIM) to implement policies for queuing, rate-throttling, and error handling.
By adhering to these guidelines and proactively managing PTU allocations, you can minimize the impact of throttling on your applications’ performance.
Call To Action: Review and apply the outlined strategies to mitigate throttling errors in your deployment, ensuring optimal performance of your Azure OpenAI services. If persistent issues occur, consider consulting with Azure technical support for further assistance.
Primary Resource: Optimizing Azure Open AI – A guide to limits & quotas
Additional Links for PTU Deep Dive:
Azure OpenAI Landing Zone reference architecture
Baseline architecture for Enterprise Chat Applications
Azure Workbooks – Monitoring OpenAI Workloads with Confidence
Azure OpenAI Using PTUs/PayGos with APIM – Using the Scaling Special Sauce
Smart load balancing for OpenAI endpoints and Azure API Management
Use APIM to configure retry and fall back to another instance based on HTTP status
Microsoft Tech Community – Latest Blogs –Read More
Business-in-a-box: Applying AutoGen and multi-agent systems to an enterprise context
Contributors: Priya Kedia, Shikha Agrawal, Nyuk Ching Lee, Ming Gu, Sunil Sattiraju, Naveen Gopalakrishna, Scott Holden, Daniel Csillag
Generative AI (GenAI) is revolutionizing how businesses engage with customers and streamline internal processes. However, scaling these innovations beyond a handful of use cases remains a significant challenge. Typically, enterprises build separate applications for different use cases— for example, a HR chatbot for the HR team, a legal advice RAG application for the legal team, and a customer service assistant for their frontline teams—each requiring its own knowledge base and tools. While a shared platform can be built, maximizing reuse is difficult, and each new application demands its own business case.
We believe the answer lies in agentic systems, where multiple agents collaborate to achieve a task. Instead of developing numerous standalone applications, you can build a single capability that unlocks potentially unlimited use cases. In this article, we will demonstrate how to apply multi-agent frameworks like AutoGen to various enterprise scenarios, to inspire you to implement this in your organization.
An overview of the Business-in-a-Box
The Business-in-a-Box is comprised of three interfaces:
User Interface: Enables users to interact with the system and assign tasks to the agents.
Audit Interface: Allows you to observe how agents collaborate, each with specific domain knowledge and tools.
Manager Interface: Facilitates human-in-the-loop supervision, where a human supervisor can guide agents if they encounter obstacles or need approvals.
There are many agents inside the box, spanning marketing, HR, procurement, technology, invoice auditing and more. Each of these agents has their own specialized set of knowledge and tools, making them experts in their domain.
Three levels of GenAI systems
There are three key levels of interactive GenAI systems: chatbots, single agents and multi-agent systems.
Level 1: Informational Chatbots
Retrieval Augmented Generation (RAG) chatbots are among the most common GenAI use cases. They enable Large Language Models (LLMs) to answer questions using your organization’s data.
Video overview: In this video, we ask the Business-in-a-Box “What is the dress code?” The HR Agent retrieves your organization’s specific policies from a knowledge base (e.g., Azure AI Search) and answers the question.
Level 2: Single Agents
Single agent systems go beyond simple informational responses, possessing the ability to impact the world around them by automating tasks, delivering significantly more value.
Video overview: we ask the Business-in-a-Box to “Issue a badge.” The Procurement Agent identifies that human approval is required before proceeding. The human supervisor receives a message from the Procurement Agent, and approves the request. The Procurement Agent then issues the badge, which is mailed to the employee’s nearest office location.
Level 3: Multi-Agent Systems
Multi-agent systems involve specialized agents collaborating to solve complex problems. Each agent is an expert in a specific domain. Similar to humans, no one agent can do everything, but together, they can achieve significant outcomes. The way these agents collaborate mirrors how people collaborate, as part of cross-functional teams, where each person has their own expertise.
Video overview: onboarding a new employee involves multiple areas of the business. The HR Agent identifies key onboarding steps, while the Procurement and Tech Agents complete their respective tasks such as setting up an Office 365 account or ordering a laptop.
So what?
At this point, you may be wondering- couldn’t we have automated this with a simple workflow? The power of multi-agent systems becomes evident, when you combine agents in different ways to solve use cases that you never anticipated.
By building one capability, you can solve almost an unlimited number of use cases. Here are a few examples of different ways these agents could be combined, to solve other problems:
Let’s make this real by exploring another use case.
Video overview: we ask the system to share updates on a new product release and obtain legal approval. The Product Agent provides updates, the Marketing Agent drafts the press release, and the Legal Agent obtains sign-off. The key takeaway is that one capability enables almost unlimited use cases.
This requires a different set of agents to work together to complete the task. Whilst the use case is interesting, the key takeaway is that one capability enables almost unlimited use cases.
An organizational shift
We can further mirror human collaboration by organizing agents to align with an organization’s existing structure. For instance, placing the Legal Agent in the legal business unit ensures the team closest to the information maintains its accuracy and relevance. The legal team then owns the roadmap for the legal agent, adding new information and capabilities to their agent. The Legal Agent can also collaborate directly with the lawyers, reaching out for approvals or guidance when necessary.
Responsible AI
It is important to consider the impacts of these types of systems and the automation they drive. The focus should be on using these systems to empower people by managing the overhead of coordinating tasks across a large enterprise and automating simple tasks, therefore allowing individuals to focus on leveraging their unique skills.
Let’s consider the example of a legal team, who support the business by reviewing contracts and providing guidance. New work is accepted in the form of a brief that follows a set template. Often these templates are not complete or unclear in their intent, causing the legal team to spend a significant amount of time requesting additional information and fixing errors.
Now suppose a product team wishes to update their product terms ahead of a new product launch. In this scenario, they would ask their Product Agent to achieve this goal. The Product Agent reaches out to the Legal Agent and obtains the template. It then collaborates with the product team to gather all the relevant information before providing it to the marketing team. When the brief is submitted, the Legal Agent triages it, ensures it contains all the necessary information, and places it into the legal team’s work queue.
In this way, the legal team is empowered to focus on their specialized skillset, and spend more time assessing risks and reviewing contracts, rather than guiding the rest of the business on how to write a proper brief.
The network effect
The most incredible property of this system is the impact that adding just one new component can have (for example an API function or a new set of documents to a knowledge base). This small addition can unlock potentially multiple use cases, thanks to the network effect. For example, if the lawyers expose the ability to obtain legal sign-off as a function for their agent, this might unlock ten new use cases across the business that were previously not possible. These could include writing press releases, signing supply agreements, or updating product documentation. This provides an incredible level of reuse.
Furthermore, new use cases become an emergent property of the system. We are no longer building use cases individually but instead taking a data-centric view of the organization. By focusing on adding new data, we unlock use cases, rather than the other way around.
What are the limitations of this project?
The demonstration shown is a real, live multi-agent system capable of handling unplanned use cases and taking action in the real world. There are a number of limitations that are important to note:
Placeholder Functions: The demonstration shows agents correctly triggering functions with the right parameters; actual integrations were left as future work.
Small number of documents: The knowledge base has a limited number of documents, making it easier to retrieve the right information. This is similar to challenges in existing RAG solutions but could compound if multiple retrieval steps are needed.
Scaling to hundreds of agents: Further research is needed to understand how systems scale beyond a few agents. In this demo, seven agents worked together to solve tasks. As more agents are added, routing requests becomes more complex. New strategies, such as hierarchical structures similar to today’s organizations, may be developed. This would involve multiple groups, of multi-agent systems working together. For instance, a high-level business objective could be assigned to a “leadership team” of agents, who oversee each of the key business units. The task would then be cascaded down to another multi-agent system, representing that business unit.
While the exact scalability of these systems is not yet known, it is clear that multi-agent systems have immense potential to transform organizational operations.
How does it work?
This demo uses AutoGen, a multi-agent framework by Microsoft Research. Agents are wrapped using Prompt Flow, orchestrated with Azure AI Studio and Managed Online Endpoints. The knowledge base is built using Azure AI Search, and conversation history is managed with Cosmos DB.
Conclusion
Multi-agent systems represent the next wave of Generative AI use cases, offering entirely new opportunities to drive efficiencies in your business. The Business-in-a-Box demonstrates several key benefits:
Allows people to focus on what matters: by doing the heavy lifting involved with coordinating activities across an organization, peoples’ time is freed up to focus on their specializations.
Enabling GenAI to scale: by not needing to build one application after another, organizations are able to reduce the friction of adopting GenAI across their entire organization. One capability can unlock almost unlimited use cases.
Applicable to most industries: these are common challenges that most organizations face, across most industries.
Whilst still an emerging area, investing in agentic use cases, digitatization and developing tools will be key to ensuring you are able to leverage these new technologies and seize the GenAI moment.
Acknowledgements
Thank you to the incredible team who helped deliver this project.
Microsoft Tech Community – Latest Blogs –Read More