Skip to content

Commit 662d69d

Browse files
committed
Updates
1 parent 1104aca commit 662d69d

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

articles/communication-services/concepts/router/distribution-concepts.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ manager: bgao
77
services: azure-communication-services
88

99
ms.author: williamzhao
10-
ms.date: 05/04/2022
10+
ms.date: 05/06/2022
1111
ms.topic: conceptual
1212
ms.service: azure-communication-services
1313
---
@@ -68,7 +68,7 @@ When a Scoring Rule isn't provided, this distribution mode will use the default
6868
### Default Label Matching
6969
For calculating a score based on the job's labels, we increment the `Match Score` by 1 for every worker label that matches a corresponding label on the job and then divide by the total number of labels on the job. Therefore, the more labels that matched, the higher a worker's `Match Score`. The final `Match Score` will always be a value between 0 and 1.
7070

71-
#### Example
71+
##### Example
7272
Job 1:
7373
```json
7474
{
@@ -115,8 +115,6 @@ Worker B's match score = 1 (for matching english language label) / 2 (total numb
115115
Worker C's match score = 1 (for matching english language label) / 2 (total number of labels) = 0.5
116116
```
117117

118-
Explanation:
119-
120118
Worker A would be matched first. Next, Worker B or Worker C would be matched, depending on who was available for a longer time, since the match score is tied.
121119

122120
### Default Worker Selector Matching
@@ -125,7 +123,7 @@ In the case where the job also contains worker selectors, we'll calculate the `M
125123
#### Equal/NotEqual Label Operators
126124
If the worker selector has the `LabelOperator` `Equal` or `NotEqual`, we increment the score by 1 for each job label that matches that worker selector, in a similar manner as the `Label Matching` above.
127125

128-
#### Example
126+
##### Example
129127
Job 2:
130128
```json
131129
{
@@ -172,14 +170,13 @@ Worker E's match score = 1 (for matching department selector) + 1 (for matching
172170
Worker F's match score = 1 (for segment not equal to vip) / 2 (total number of labels) = 0.5
173171
```
174172

175-
Explanation:
176-
177173
Worker E would be matched first. Next, Worker D or Worker F would be matched, depending on who was available for a longer time, since the match score is tied.
178174

179175
#### Other Label Operators
180176
For worker selectors using operators that compare by magnitude (GreaterThan/GreaterThanEqual/LessThan/LessThanEqual), we'll increment the worker's `Match Score` by an amount calculated using the logistic function (See Fig 1). The calculation is based on how much the worker's label value exceeds the worker selector's value or a lesser amount if it doesn't exceed the worker selector's value. Therefore, the more worker selector values the worker exceeds, and the greater the degree to which it does so, the higher a worker's score will be.
181177

182178
:::image type="content" source="../media/router/logistic-function.png" alt-text="Fig 1. Logistic function.":::
179+
183180
Fig 1. Logistic function
184181

185182
The following function is used for GreaterThan or GreaterThanEqual operators:
@@ -245,6 +242,4 @@ Worker H's match score = (1 + 1 / (1 + e^-((15 - 10) / 10)) + 1 / (1 + e^-((10 -
245242
Worker I's match score = (1 + 1 / (1 + e^-((10 - 10) / 10)) + 1 / (1 + e^-((10 - 9) / 10))) / 3 = 0.675
246243
```
247244

248-
Explanation:
249-
250245
All three workers match the worker selectors on the job and are eligible to work on it. However, we can see that Worker H exceeds the "sales" worker selector's value by a margin of 5. Meanwhile, Worker I only exceeds the cost worker selector's value by a margin of 1. Worker G doesn't exceed any of the worker selector's values at all. Therefore, Worker H would be matched first, followed by Worker I and finally Worker G would be matched last.

0 commit comments

Comments
 (0)