Wednesday, January 29, 2025

 The previous article talked about bias in AI applications. This one covers some of the emerging trends in AI Applications.

First, the chatbots, generative AI and search applications will continue to leverage better, cheaper, and more purposeful Large Language Models aka LLMs. Those same LLMs also come in useful to create next generation eCommerce search and product discovery solutions to produce high-quality, hyper-personalized customer search results. According to Gartner, Generative AI and search bear a reciprocal relationship because the models used in the search are trained on domain datasets. Generative AI such as ChatGPT, on the other hand, is trained on large corpus. Therefore, they are used in combination. The highly-relevant and personalized search together with a conversational capabilities of a chatbot is immense power to both traditional use cases for shoppers as well as emerging uses cases for personalized campaigns for individuals but small and medium businesses struggle to realized that potential due to scale.

Second, social media is a valuable channel for establishing and building relationships with billions of consumers and getting them to consider products and brands by facilitating 1 to 1 personalization at scale is now possible via Generative AI. One specific demonstration of this is with A/B testing where entire campaigns and content can be generated and customers can leverage that to see more ads that better suit their taste.

Third, product catalogs can become more informative with GenAI with pages enticing customers to add the product to their cart. The multimodal nature of AI allows image, text, and other content types to be brought together assisting retailers with both informative and personalized product pages. When combined with databases like Mongo DB for its flexibility with hierarchy and labeling, these algorithms can leverage product attributes and make hyper personalized recommendations especially with new products that have little history.

Fourth, the site navigation application gets a whole new facelift which shores up losses from cart abandonment, lost sales, and customers. In addition, it facilitates dynamic navigation, filters and search experiences that are hyper-personalized to the individual customer. Site search is one of the primary use cases of search and as with the discussion of AI models, the results can be highly relevant.

Fifth, checkout and delivery that is frequently associated with past purchase behavior, current browsing session data, and real-time inventory levels can be improved by showcasing “others bought” or “style your purchase” upsells which is not only using collaborative filtering but embedded semantics to promote personalization.

Sixth, customer nurturing applications with review solicitations, loyalty and reward programs and generating word-of-mouth feedback provide a new level of personalization for the shoppers. This results in an improved site experience feeding back into the virtuous cycle of retail shopping.

One of the main challenges against all these applications is the overcrowding of relevant but useless suggestions and the way to fix it is to with intensive oversight, continuous monitoring and the best practices of AI safety and security.


Tuesday, January 28, 2025

 Mitigating Bias in AI applications:

Applications such as generative Artificial Intelligence aka GenAI, computer vision and Natural Language Processing aka NLP can find insights, make predictions, and streamline operations. But as these applications become more sophisticated in learning and reasoning, they are highly dependent on data used to train them. These data inevitably contain biases. Biased algorithms limit the potential of AI and lead to flawed or distorted model outputs that can negatively impact marginalized groups.

For example, the bias demonstrated by Chatbots has surfaced as follows:

Racial bias in salary recommendations: A Stanford Law School study found that chatbots like ChatGPT 4 and Google's PaLM-2 suggested lower salaries for job candidates with Black-sounding names compared to white-sounding names. For instance, a candidate named Tamika was recommended a $79,375 salary as a lawyer, while Todd was suggested $82,485 for the same position.

Hidden racial bias in language perception: While AI models tend to use positive words when directly asked about Black people, they display negative biases towards African American English. Users of this dialect were often associated with "low status" jobs like cook or soldier, while Standard American English users were linked to "higher status" jobs like professor or economist.

Gender bias in translations: ChatGPT was found to perpetuate gender stereotypes when translating between English and languages with gender-neutral pronouns. For example, it tended to assign "doctor" to men and "nurse" to women.

Cultural biases: A comparison between ChatGPT (US-based) and Ernie (China-based) showed that ChatGPT displayed implicit gender biases, while Ernie showed more explicit biases, such as emphasizing women's pursuit of marriage over career.

Socioeconomic biases: Researches use medical images as training data to recognize diseases and even while it is infused with human expertise to annotate the images, the amount of data available might not only be skewed by those who could afford to have their images taken but also by those who could afford but had no reachability to the diagnostic imaging or representation in its collection.

From these examples, bias can be tracked to “blind spots” in training data. And as it takes many forms such as selection, exclusion, prejudice, cognitive, confirmation, historical and availability biases, outcomes often disenfranchise groups of people. That is not the only risk though. Algorithms trained on biased data can falsely predict risk, negatively impact hiring, lending and more, expose existing societal prejudices, create mistrust across boundaries and even lead to fines in regulated environments. How data is collected, who collects it, whether it is wholesome in representation, and such others determine how biased the data is. More often than not, collection of data is from existing literature and these sources already demonstrate influences.

Diverse and Inclusive data sets are the biggest antidote to biases. AI models trained on a broad swath of sources do better to respond to queries from a vast group of people. As part of this strategy, methods to detect and mitigate biases in data and continuous refinement and updates to datasets are mandatory. Some of this can be realized by having a large network of data contributors, facilitation of peer reviews, multimodal data collection, medallion architecture curation, inclusive data sources and robust coverage, timestamped or versioned data, securing data at rest and in transit, least-privilege access control, ubiquitous reach to and from data, and facilitation of asset intake and metadata collection


Monday, January 27, 2025

 These are the steps for an Azure subscriber to expose an endpoint on Azure Front Door:

1. **Create an Azure Front Door Profile**: If you don't already have one, create an Azure Front Door Standard/Premium profile.

2. **Obtain a Custom Domain**: Purchase a custom domain from a domain provider or use an existing one. If your DNS domains are hosted on Azure, delegate the domain provider's DNS to Azure DNS.

3. **Create a CNAME DNS Record**: Create a CNAME record with your domain provider to point to the Front Door default frontend host. This maps your custom domain name to the Front Door default hostname.

4. **Map the Temporary afdverify Subdomain**: Map the temporary `afdverify` subdomain to verify domain ownership.

5. **Add the Custom Domain to Azure Front Door**: Go to the Domains pane of your Azure Front Door profile. Select "+ Add" to add a new domain.

6. **Validate the Custom Domain**: Choose the domain type (Non-Azure validated domain or Azure pre-validated domain). If it's a Non-Azure validated domain, manually enter the custom domain name.

7. **Associate the Custom Domain with Your Endpoint**: Associate the validated custom domain with your Azure Front Door endpoint.

8. **Verify the Custom Domain**: Ensure the custom domain is correctly associated and verify it through the Azure portal.

9. **Configure HTTPS (Optional)**: If you want to secure your custom domain with HTTPS, configure it by following the steps to enable HTTPS for your custom domain.

10. **Test the Configuration**: Test the setup by accessing your custom domain to ensure everything is working correctly.


Sunday, January 26, 2025

 Problem statement: Given the root of a binary tree, check whether it is a mirror of itself (i.e., symmetric around its center).

Example 1:

                 1

           2 2

    3 4 4 3

Input: root = [1,2,2,3,4,4,3]

Output: true

Example 2:

                 1

           2 2

    null 3 null 3

Input: root = [1,2,2,null,3,null,3]

Output: false

Constraints:

The number of nodes in the tree is in the range [1, 1000].

-100 <= Node.val <= 100

/**

 * Definition for a binary tree node.

 * public class TreeNode {

 * int val;

 * TreeNode left;

 * TreeNode right;

 * TreeNode() {}

 * TreeNode(int val) { this.val = val; }

 * TreeNode(int val, TreeNode left, TreeNode right) {

 * this.val = val;

 * this.left = left;

 * this.right = right;

 * }

 * }

 */

class Solution {

    public boolean isSymmetric(TreeNode root) {

        List<Integer> serialized = new ArrayList<Integer>();

        InorderTraversal(root, serialized);

        return IsPalindrome(serialized);

    }

    public boolean isPalindrome(List<Integer> serialized) {

        int i = 0;

        int j = serialized.count() - 1;

        while (i < j) {

            if (serialized.getAt(i) != serialized.getAt(j)) {

                return false;

            }

            i++;

            j--;

        }

        return true;

    }

    public void InorderTraversal(TreeNode root, List<Imteger> serialized) {

        if (root == null) {

            serialized.Add(Integer.MinValue);

            return;

        }

        InOrderTraversal(root.left);

        serialized.Add(root.val);

        InOrderTraversal(root.right);

    }

}

#blogpost: https://1drv.ms/w/c/d609fb70e39b65c8/EcVxcTYDkE9Hro_eEthnuH8Bx-PIXIxbdNq2kXKuyr8TdA?e=a1ofbg

Saturday, January 25, 2025

 This is a summary of the book titled “Smart Teams: How to move from friction to flow and work better together” written by Dermot Crowley and Wiley in 2023. The author recognizes the premise as one of reduced productivity in modern workplaces with growing numbers of emails, meetings, attention-demanding messages, and ad hoc work for which he offers help to eliminate the “noise” and friction by getting more done on time. His help includes valuable tips on how great leaders promote a culture of “superproductivity” which requires collaboration and coordination, removal of organizational friction, fostering culture to boost productive flow, and essentially creating “smart teams” who know who to find and focus on the specific actions that matter towards this goal.

To achieve maximum productivity, a team needs proper systems and processes, enabling members to communicate, congregate, and collaborate effectively. A productivity culture is essential, and leaders should promote it within their organization. This is particularly challenging in hybrid or remote work environments, where employees often rely on email for communication. To improve productivity, leaders should address practices that impede it, such as the "death-by-meeting" orientation and eliminate unnecessary meetings.

To increase productivity, managers should address information overload, unfocused meetings, distractions, and unnecessary urgency. By ensuring smooth internal communications, reducing unfocused meetings, addressing distractions and interruptions, and fostering a "slow work" culture, employees can focus on performing better instead of merely focusing on speed.

The corporate world needs a "slow work" movement that shifts away from non-productive, speedy reactivity and towards increased focused, thoughtful responsiveness. This would slightly slow the pace of work, allowing team members to focus on performing better instead of merely faster.

Team productivity is maximized when members maximize both individual and group productivity. A selfless mindset, similar to a service mindset, aims to eliminate unproductive friction and promote cooperation. Leaders can boost productivity by avoiding disruptive behavior and becoming "superproductive." Building smart teams involves working well together and agreeing on productive behaviors. To increase productivity, team members should practice four individual behaviors: being purposeful, mindful, punctual, and reliable.

Purposeful teams focus on understanding the team's goals and priorities, while mindful teams focus on minimizing friction and promoting workflow. Punctuality is crucial in the US Navy, as it ensures timely completion of tasks. Reliability is essential for team members to trust each other and prioritize their obligations. These behaviors can significantly impact team productivity and contribute to the overall success of the organization.

A positive change in a team's culture depends on specific actions, not amorphous principles. Purposeful, mindful, punctual, and reliable team members can eliminate friction and lag time that can drain productivity. To adjust the team's culture, members must embrace the inherent value of productivity and delineate their specific productivity principles. Cooperation is essential for high-performing teams, and team members must cultivate an active mindset to weigh work requirements and respond to urgent requests.

Urgency rules, everywhere, are crucial for effective communication. Limiting emails to essential information and using direct conversations can help reduce noise and improve productivity. A team must develop its productivity culture by following guidelines such as "primum non nocere," "lead from the front," "remember that you are always on show," and "create projects for the team to rally around."

To cut costs and boost productivity, take a long and careful look around your organization and identify productivity impediments. By implementing these strategies, you can create a more productive and efficient team.


Friday, January 24, 2025

 Software integrations manifest in Infrastructure Engineering as well. As cloud engineers provision resources and configure them for their data scientists and application engineering teams, they must be mindful of interoperability. One specific example is used to discuss the changes to the practices of Cloud IaC in this article and it pertains to System for Cross-Domain Identity Management aka SCIM.

Identity and access solutions have always looked for bringing together users recognized by different systems that do not share anything. A user in AWS public cloud might not be recognized in Azure for instance. SCIM is a protocol that standardizes how identity information is exchanged between one entity and another. By virtue of being an open standard for people to access cloud-based resources, it eases onboarding and interoperability. That includes how identity data is exchanged, how the communication is fostered across different platforms and how identity providers and IAM systems can work together even they are heterogeneous. Having manually add users to each application and a few other Role-based access control chores become tedious in organizations that have many employees, partners and stakeholders. SCIM makes it easy to grant access to new hires to the appropriate applications and revoke access from those leaving with seamless synchronization across a variety of platforms. SCIM leverages JSON data format and database create-update-delete operations on resources which improves programmability. An SCIM endpoint is created usually within Azure AD which can communicate with on-premises Active Directory. Using a predefined schema and automatic synchronization of identity resources, it improves consistency and security across disparate systems. The automatic user provisioning, standardized API and user attributes management simplifies identity management by bringing together a single source of truth.

As a protocol, IAM solution developers are already aware of Security Assertion and Markup Language that has worked for a while. While SAML works with SSO to integrate login across security domains and features similar to SCIM for a unified experience, SCIM lays the foundation for SAML to work in a new target system. SAML leverages XML for assertions and gives you a token to use with your browser session, SCIM is for provisioning identities across multiple applications. SCIM and SSO work together but like SAML, SSO is for authentication not provisioning.

Bulk recognition of identities is possible with SCIM which saves time and cost and spans proprietary and third-party technologies even though certain IAM products like Active Directory have also tried to embrace open standards with their OpenLDAP protocol. While OpenLDAP used to be for legacy systems and on-premises, SCIM is cloud-first and cloud-friendly where different identity providers can participatge.


Thursday, January 23, 2025

 As Infrastructure engineering deploys AI at scale, organizations can take a better approach with AI and LLMS. This list here discusses those actionable items that have gained widespread nod in the community.

1. Observability becomes more critical and empowering as LLMs grow and mature. The types of teams working in the Generative AI have become more diverse. While data scientists are savvy about continuous monitoring, many others are not. If they perform prompt engineering and retrieval augmented generation (RAG) they will need to know what’s going on behind the scenes. They learn quickly with their prompt engineering, then might do more experimentation with language models, then proceed with RAG, before tuning its models to a specific domain knowledge and grounding outputs with searches. Observability helps with every stage of the life cycle.

2. Simpler use cases are called for before sophisticated ones with multi-agents. This aligns with an organization’s human resources and skills experiences. And since the landscape changes quickly, developing “evergreen” skills in evaluation and implementation remain essential. Leveraging context windows for RAG is an example. As context windows get larger, will RAG remain relevant? Organizations could do well to have not only a goal but a path to the AI maturity for their production deployments.

3. Gaining customer confidence in the AI models output is crucial. Customers neither trust the AI model to learn enough to make a decision based on its output nor the data on which the AI models train and test. Fetching some telemetry, accessing certain logs, and presenting them along with the AI output garners some trust and confidence. Techniques like factual grounding help here.

4. The most powerful use cases for LLMs are often the simplest as in the case of summarizing driving productivity gains. Summarization is popular because it is an easy way to build trust in LLMs with its straightforward evaluation. They are also powerful because they add instant value in many use cases. Multimodality is also important to consider here. Building a multimodal model from the ground up helps summaries to be drawn from text, image, and a variety of sources.

5. Tooling must keep up with the AI maturity roadmap. As production-oriented systems are developed, controls and human evaluation are necessary at each stage of the game. Organizations know that usage and maturity must evolve without disruption.

6. Balancing compute time, compute cost, and model quality requires cutting edge observability. Organizations must drive quality and performance of their observability capabilities because there are a number of integrations that need to work collaboratively and effectively. Even networking performance monitoring can become imperative.

7. Prioritizing the metrics that matter is more important than ever. With changes happening quickly, metrics serve as guardrails to ensure that new approaches do not chew up time and effort for the promise of productivity and introduce new risks. Establishing clear service level objectives works in this case.