Generative AI and LLMs
Generative Artificial Intelligence is the branch of AI that has most recently captured the interest of both consumers and businesses because of its ability to create new content, from text to images, and to engage in natural language conversations with human-like understanding of nuances.
Unlike machine learning techniques, which generally involve analyzing data to make predictions or categorize information, generative AI can produce new instances of data that mirror the distribution of the original data, driving a rush of productivity, automation and transformation across industries.
How does generative AI work?
Generative AI works through a combination of advanced machine learning techniques, neural network architectures and applicative models.
It has benefited in recent years from increased computational capabilities, specific architectures such as Transformers and GANs (Generative Adversarial Network), and the advancement of specific techniques (fine-tuning, promting, contextualization), to become a versatile tool capable of handling and synthesizing multimodal data.
For text-based applications, the cornerstone of this technology is the use of Large Scale Language Models (LLMs). They are experts in understanding and generating human language by processing large amounts of textual data. They predict subsequent text segments by calculating the probability of occurrence of words, based on the context provided by previous words. It is not only about predicting the next word in an answer, but also about generating coherent and contextually appropriate content across paragraphs or even entire documents.
Beyond text, generative AI is also revolutionizing work with images, audio and video through multimodal models. Image models such as Transformers, Generative Antagonistic Networks (GANs) and diffusion models are advanced machine learning techniques, which are used to process and generate images.
These models can interpret and generate content that combines different types of data, such as DALL-E for images, which can create images from textual descriptions, or WaveNet for audio, which can generate natural speech that adapts to different languages and emotions. In video, generative models can synthesize realistic video sequences or alter existing ones to create new interpretations.
Transformers and LLM architectures
Transformers, since their inception with Google’s 2017 paper “Attention Is All You Need”, have underpinned the development of Large Scale Language Models (LLMs) such as GPT, Llama, Mistral, or Bert. They are credited with a larger and better representation of the world, leading among other things to a finer understanding and generation of human language.
The key innovation introduced by Google in 2017 was the self-attenuation mechanism, which allows the model to process each word in the context of all others in a sentence, leading to more coherent and contextually relevant responses.
The progress towards models such as GPT4 (OpenAI), Claude 2 (Anthropic), BARD (Google), Llama 2 (Meta) has been characterized by an increase in the size and complexity of these Transformers, with GPT-4 being one of the largest with around 1500 billion parameters. The increasing size of these models has been correlated with significant performance improvements, following what are known as laws of scale: as the size of the model increases, so does its ability to capture and replicate the subtleties of human language.
This capability has made it a valuable tool for applications ranging from creative writing to technical problem solving.
Generative AI for business
The fine-tuning of LLMs plays a crucial role in the application of these models in business environments. By training them further with specialized data sets, they can be tailored to specific tasks, industries or languages, opening up endless possibilities in any sector and business area. For example:
- Marketing: Content writing and graphic creation, hyper-personalization of emails, online sentiment analysis, hyper-segmentation of customers.
- Software development: autonomous code generation, writing assistance, review and corrections.
- Design of concepts, products, processes and, if necessary, proposals for improvement of existing ones.
- Biotechnology: Accelerating drug discovery by predicting molecular structures.
- Chatbots for customer service, IT support (Helpdesk), with queries to internal databases (contracts, procedures, manuals…).
- Administration: generation of invoices, reports, periodic analysis, orders.
Specific techniques based on LLM
Enterprise applications based on generative AI incorporate a Large Scale Language Model (LLM), as one of several components within a software ecosystem.
These models provide sophisticated language generation and understanding, but must work in conjunction with other techniques to accomplish complex tasks, requiring context, computation or reasoning. To cite the most commonly used acronyms:
- PEFT (Parameter Efficient Fine Tuning): technique that adjusts only certain parameters of a base model to improve performance on specific tasks with minimal training.
- RAG (Retrieval Augmented Generation): method that combines LLMs with retrieval of external (web) or internal company data, to provide contextualized answers to queries. Embeddings, vector bases and knowledge graphs are some of the techniques used for semantic search.
- CoT, ToT, GoT (Chain, Tree, Graph-Of-Thought): approaches that structure the LLMs response process and show the step-by-step reasoning behind their conclusions, improving interpretability.
- PAL (Program Aided Language): approach where LLMs call additional programs as intermediate steps to solve complex problems where they lack skills. For example, transforming a query involving calculations into Python code via Code Interpreter for resolution.
- ReACT (Reasoning and Acting): techniques that train LLMs to provide responses that consider context and potential actions, often used in interactive scenarios.
- RLHF (Reinforcement Learning with Human Feedback): training setting where LLMs improve through trial and error, guided by feedback provided by humans, to ensure that the response is aligned with human values.
Challenges of generative AI in business
Generative AI is revolutionizing business, achieving remarkable advances in productivity, customer experience and innovation. But technological advances and their integration into business processes are not without their challenges.
It is crucial for companies to identify projects that offer significant value with minimal risk, balancing ROI potential with strategic alignment, operational stability and reputation.
- Bias, Usefulness, Toxicity, Honesty of the answers: there is a continuous work on training data, instructions and adjustments so that the applications provide answers without bias or toxicity, with truthful and useful information to the user.
- Data Privacy and Security: The handling of sensitive data by generative AI systems requires rigorous security, traceability and interpretability measures, as well as compliance with constantly evolving regulations.
- LLM choice: Deciding on the right LLM for an application involves weighing options between open source and proprietary models, considering the trade-off between model size and task specificity, and evaluating total cost of ownership (TCO).
- Quality and Readiness of Knowledge Databases: The usefulness of generative AI depends on the quality of data sources and the sophistication of indexing for semantic search (vector databases, embedding techniques, etc.).
- Technology Maturity: Enterprises must adopt a culture of experimentation, trial-and-error mentality, iterating and refining AI applications and remaining flexible to keep pace with evolving AI techniques.
- Preparing Teams: Preparing staff for AI integration is key, requiring a cultural shift towards innovation, and targeted training to develop AI competencies within the company.