Thursday, January 30, 2025

DeepSeek vs OpenAI

Two companies have recently drawn a lot of interest in the quickly changing field of artificial intelligence (AI): OpenAI, a well-known American AI research centre, and DeepSeek, a Chinese AI startup.

Although both have created sophisticated large language models (LLMs), their methods, prices, and ideologies are different.

Establishment and Purpose Liang Wenfeng, a co-founder of the hedge firm High-Flyer, started DeepSeek in 2023. High-Flyer first concentrated on AI and algorithm-based trading before expanding toward more general AI research, which resulted in the development of DeepSeek. To make cutting-edge AI more widely available, the company strongly emphasises open-source development.

Elon Musk, Sam Altman, and other individuals formed OpenAI in 2015 as a non-profit organization to ensure that artificial general intelligence (AGI) serves the interests of all people. To secure funding, OpenAI gradually switched to a capped-profit business model, collaborating with firms such as Microsoft to further its research.

Model Creation and Expenses

Efficiency and cost-effectiveness were key considerations in the development of DeepSeek's flagship model, DeepSeek-R1. Using cutting-edge training techniques and refined algorithms, the company claimed that less than $6 million in computational resources were needed to train DeepSeek-R1, achieving great performance without incurring significant costs.

OpenAI's models, such GPT-4, on the other hand, have been linked to noticeably greater development expenses. Although the numbers are confidential, estimates indicate that the cost of training GPT-4 was in the hundreds of millions of dollars, which is indicative of the large amount of data and computer power needed.

Capabilities and Performance

DeepSeek-R1 has proven to perform well in certain areas, especially coding and mathematical reasoning problems. According to benchmark testing, DeepSeek-R1 performs somewhat better than OpenAI's models in answering mathematical problems; on the American Invitational Mathematics Examination (AIME) 2024 benchmark, it achieved an accuracy of 79.8% as opposed to OpenAI's 79.2%.

Models from OpenAI, like GPT-4, are well known for their adaptability and general-purpose skills. They perform exceptionally well in a variety of tasks, including as creative writing, translation, and natural language comprehension.

For example, OpenAI's models outperformed DeepSeek-R1 in the Massive Multitask Language Understanding (MMLU) benchmark, demonstrating a wider knowledge base and competence in a variety of disciplines.

DeepSeek vs OpenAI Comparison Table

Feature

DeepSeek

OpenAI

Founded

2023 by Liang Wenfeng

2015 by Elon Musk, Sam Altman, et al.

Mission

Open-source AI for accessibility

Ensure AGI benefits all of humanity

Key Model

DeepSeek-R1

GPT-4

Development Cost

<$6 million

Hundreds of millions of dollars

Approach

Fully open-source

Proprietary

Performance (Math)

79.8% on AIME benchmark

79.2% on AIME benchmark

Performance (General)

Specialized (math, coding)

Versatile, excels in multiple domains

Speed

Record-breaking inference speeds

High-speed but resource-intensive

Use Cases

Problem-solving, coding, mathematical tasks

Creative writing, translation, general NLP

Access

Free and open to everyone

Paid APIs and commercial partnerships

Market Impact

Disrupted AI norms with cost-effective models

Industry leader with partnerships (Microsoft)

Ethics/Safety

Promotes transparency, shared responsibility

Focused on controlled, safe AI deployment

Target Audience

Developers, startups, researchers

Enterprises, large-scale businesses

Notable Collaboration

Open-source community

Microsoft, Azure

Innovation

Cost-effective AI at scale

Pioneering large-scale proprietary models

 

Tuesday, January 21, 2025

How to do the approval requests to be sent concurrently rather than sequentially to ensure all 53 recipients receive their emails independently and without delay.

Problem Statement

I am working on automating the process of sending leave resumption notices to staff to confirm their return. Currently, I am using the "Get Items" action to retrieve a list of items from a SharePoint list. However, I am encountering an issue with the approval workflow within the "Apply to each" action.

Challenge:

For each of the 53 items retrieved from the SharePoint list, I need to trigger 53 independent approval requests, each sent to the corresponding recipient’s email address (one per item). The current setup processes these requests sequentially, causing the flow to wait for each approval email to complete before proceeding to the next item. This results in delays.

Objective:

I need the approval requests to be sent concurrently rather than sequentially to ensure all 53 recipients receive their emails independently and without delay.

I’d appreciate any guidance or best practices to achieve this.
---------------------------------------------------------------------

To achieve concurrent approval requests in Power Automate for each item retrieved from a SharePoint list, you can use a parallel branching approach. Below is a general outline of how you can set this up in Power Automate:

Solution Outline

1.    Trigger: Use a trigger to start the flow, such as "When an item is created" or "When an item is modified" in the SharePoint list.

2.    Get Items: Use the "Get items" action to retrieve all the items from the SharePoint list.

3.    Apply to Each: Use the "Apply to each" action to iterate over the retrieved items.

    • Inside the "Apply to each" action, use the "Start and wait for an approval" action.

4.    Concurrency Control: Adjust the concurrency control settings of the "Apply to each" action to allow parallel processing.

Step-by-Step Guide

Step 1: Create a new Flow

  1. Go to Power Automate (https://flow.microsoft.com/).
  2. Click on "Create" and select "Automated flow".
  3. Choose a trigger, such as "When an item is created" or "When an item is modified" for your SharePoint list.

Step 2: Get Items from SharePoint

  1. Add a new action and search for "SharePoint".
  2. Select the "Get items" action.
  3. Configure the "Get items" action to point to your SharePoint list.

Step 3: Apply to Each

  1. Add an "Apply to each" action.
  2. Set the "Output" field to the value from the "Get items" action (usually value).

Step 4: Start Approval Process

  1. Inside the "Apply to each" action, add a "Start and wait for an approval" action.
  2. Configure the "Start and wait for an approval" action:
    • Set the "Approval type" to "Approve/Reject - First to respond".
    • Set the "Title" and "Assigned to" fields accordingly (e.g., use dynamic content to assign to the appropriate email address).

Step 5: Enable Concurrency Control

  1. Click on the "Apply to each" action to open its settings.
  2. In the settings pane, turn on "Concurrency Control".
  3. Set the "Degree of Parallelism" to a suitable number (e.g., 20). This number controls how many approval requests can be processed concurrently.

Step 6: Save and Test the Flow

  1. Save the flow.
  2. Test the flow by creating or modifying items in the SharePoint list.

Example Flow Configuration

Here is an example of how the flow might look:

  1. Trigger: When an item is created in SharePoint.
  2. Get Items: Retrieve items from the SharePoint list.
  3. Apply to Each:
    • Start and Wait for an Approval:
      • Title: "Leave Resumption Approval"
      • Assigned toitem.email (Use dynamic content to assign to the recipient's email).

PowerShell Solution

If you prefer to use PowerShell, you can use the PnP PowerShell module to retrieve the items and send approval emails. Below is an outline of the PowerShell script:

Install PnP PowerShell Module

PowerShell

Install-Module -Name PnP.PowerShell -Force

PowerShell Script

PowerShell

# Connect to SharePoint
Connect-PnPOnline -Url "https://yourtenant.sharepoint.com/sites/yoursite" -Interactive
 
# Get items from SharePoint list
$items = Get-PnPListItem -List "YourListName"
 
# Loop through each item and send approval email
foreach ($item in $items) {
    $email = $item["Email"]
    $subject = "Leave Resumption Approval"
    $body = "Please approve the leave resumption for " + $item["Title"]
 
    # Send approval email
    Send-MailMessage -To $email -Subject $subject -Body $body -SmtpServer "smtp.yourserver.com"
}

Summary

Using Power Automate with parallel branching or PowerShell with a loop, you can send concurrent approval requests to each recipient. The key in Power Automate is to enable concurrency control in the "Apply to each" action. This ensures that all recipients receive their approval requests independently and without delay.


How to retrieve a list of users who have both PowerApps Premium and Power Automate Premium licenses. Could you please provide a solution using either a PowerShell script or a Power Automate flow to accomplish this?

 To retrieve a list of users who have both PowerApps Premium and Power Automate Premium licenses, you can use a PowerShell script. Below is a step-by-step guide to accomplish this. The script will use the Microsoft Graph API to query the necessary license details.

Prerequisites

  1. Microsoft Graph PowerShell Module: Ensure you have the Microsoft.Graph PowerShell module installed.
  2. Admin Permissions: Ensure you have the required permissions to query user licenses.
  3. Azure AD App Registration: Register an app in Azure AD and grant the necessary API permissions to read user licenses.

Steps

  1. Install Microsoft Graph PowerShell Module:

PowerShell

Install-Module Microsoft.Graph -Scope CurrentUser

  1. Connect to Microsoft Graph:

PowerShell

Connect-MgGraph -Scopes "User.Read.All"

  1. PowerShell Script:

PowerShell

# Define the SKU IDs for PowerApps Premium and Power Automate Premium

$PowerAppsPremiumSkuId = "c68f8d98-5534-43a8-9110-0d174bc7c6e3" # Replace with actual SKU ID for PowerApps Premium

$PowerAutomatePremiumSkuId = "9c0dab89-a30c-4bfd-8a92-6dff3f1d8d04" # Replace with actual SKU ID for Power Automate Premium

 

# Get all users in the organization

$users = Get-MgUser -All

 

# Filter users who have both licenses

$usersWithBothLicenses = @()

foreach ($user in $users) {

    # Get the user's license details

    $userLicenseDetails = Get-MgUserLicenseDetails -UserId $user.Id

 

    # Check if the user has both licenses

    $hasPowerAppsPremium = $userLicenseDetails.SkuId -contains $PowerAppsPremiumSkuId

    $hasPowerAutomatePremium = $userLicenseDetails.SkuId -contains $PowerAutomatePremiumSkuId

 

    if ($hasPowerAppsPremium -and $hasPowerAutomatePremium) {

        $usersWithBothLicenses += $user

    }

}

 

# Output the list of users with both licenses

$usersWithBothLicenses | Select-Object DisplayName, UserPrincipalName

Explanation

  • SKU IDs: Replace the placeholders for PowerAppsPremiumSkuId and PowerAutomatePremiumSkuId with the actual SKU IDs for those licenses. You can retrieve the SKU IDs by listing all available licenses using the Graph API.
  • Get-MgUser: Retrieves all users in the organization.
  • Get-MgUserLicenseDetails: Retrieves the license details for each user.
  • Filtering: The script checks if each user has both the PowerApps Premium and Power Automate Premium licenses. If so, the user is added to the list.

Running the Script

  1. Open PowerShell with administrative privileges.
  2. Run the script above.
  3. The script will output the list of users who have both PowerApps Premium and Power Automate Premium licenses.

 

 


DeepSeek vs OpenAI

DeepSeek vs OpenAI Two companies have recently drawn a lot of interest in the quickly changing field of artificial intelligence (AI): Op...