A smiling man holds a laptop in a server room.

What Are AI Algorithms and How Do They Work?

AI algorithms are sets of instructions that tell artificial intelligence technology how to process information, react to data and make decisions autonomously.

Enterprise AI embedded in CRM generating sales emails and AI-powered reply recommendations.
Salesforce Artificial Intelligence

Salesforce AI delivers trusted, extensible AI grounded in the fabric of our Salesforce Platform. Utilise our AI in your customer data to create customisable, predictive and generative AI experiences to fit all your business needs safely. Bring conversational AI to any workflow, user, department and industry with Einstein.

Enterprise AI generating automated follow-up emails and service response recommendations across CRM workflows.
AI Built for Business

Enterprise AI built directly into your CRM. Maximise productivity across your entire organisation by bringing business AI to every app, user and workflow. Empower users to deliver more impactful customer experiences in sales, service, commerce and more with personalised AI assistance.

Five robotic characters standing together with a digital screen displaying "Agentforce" and options: Sales Development Representative Agent, Service Agent, Sales Coach Agent.
Ready to build your own agents?

See how you can create and deploy assistive AI experiences to solve issues faster and work smarter.

FAQs

In practice, they are closely related. Machine learning is a subset of AI, so the algorithms used in machine learning (like decision trees or neural networks) are part of the broader AI toolkit.

AI algorithms learn by identifying patterns from past examples (data). The more examples they see (especially diverse, high-quality ones), the better they become at making accurate predictions.

Yes. Algorithms such as convolutional neural networks handle images, while natural language processing algorithms tackle text data, extracting meaning and context from unstructured sources.

Overfitting occurs when an AI model performs extremely well on training data but struggles with new, unseen data. Regular testing and validation help avoid this pitfall.

Generative AI is a category of AI algorithms (like generative adversarial networks) designed to create new data, such as images or text, that closely resembles real-world examples. While both deal with enabling machines to learn, generative AI focuses on producing fresh content.

AI algorithms are grouped into four types, each a different way for machine learning to work with data. Supervised learning algorithms use labelled data that matches inputs to outputs, and include linear regression, logistic regression, decision trees, random forest, naive Bayes and support vector machines. Unsupervised learning works on unlabelled data to find trends and correlations through clustering, association rules and dimensionality reduction. Reinforcement learning learns by trial and error from positive or negative rewards, and semi supervised learning combines a small amount of labelled data with unlabelled data, which helps when labelled data is hard or costly to obtain.

Algorithmic AI follows fixed rules and steps, such as searching for the best move in a board game, and it does not learn or adapt. It follows the same path every time. AI algorithms adapt and improve as they receive new data, so they cope better with changing conditions and can evolve over time. Programmers can control them closely at every stage, or leave them unsupervised to find patterns without human intervention.

AI algorithms can be trained in four common ways. Batch training feeds the whole dataset, or large chunks of it, into the model at once, and is common for offline deep neural networks such as those that process images. Online training learns continuously as new data arrives, for example in predictive maintenance where each sensor reading updates the model to predict equipment failure. Incremental training updates the model at regular intervals, as an email filter does when it learns from how users move or mark emails. Transfer learning starts from a model trained on a large general dataset and fine tunes it on a smaller, specific one, which saves time and resources.

In business and marketing, AI algorithms power personalised product recommendations on ecommerce and streaming platforms, and the Australian retailer Big W, for example, uses machine learning on purchase history for suggestions and promotions. AI marketing also uses them for predictive insights, audience segmentation and email campaign refinement. In healthcare they support disease diagnosis, drug discovery and personalised medicine, and deep neural networks can detect early stage cancers from images. In finance and banking they detect anomalies in real time for fraud and credit scoring.

Learn more about AI agents and how they can help your business.

Einstein Features Cheat Sheet guide
Guide

The Agentforce Guide to Reasoning, Subagents, Instructions and Actions.

AI for Small Business blog
Blog

LLMs and Copilots Alone Won’t Save You: Why You’re Doing Enterprise AI Wrong