Introducing Your Personal AI Documentation Assistant Now that you've got GPT4Readability installed and have an OpenAI API key generated, you have access to the CLI. This article is focused on the CLI but you can also try the no-code web application on HuggingFace spaces at: https://huggingface.co/spaces/JohanDL/GPT4Readability. Let's say you have a Python project in need of a README, but you don't even remember what the code was supposed to do. Instead of spending hours trying to figure out the connections in the codebase, let GPT4Readability do the heavy lifting: Just replace /path/to/your/project with the root directory of your Python project. GPT4Readability will generate a comprehensive README.md file named MyAwesomeREADME.md using the "gpt-3.5-turbo" model from OpenAI. Currently, there are two available models you can use with GPT4Readability: gpt-3.5-turbogpt-4


GPT4Readability - Never Write a README Again

Code Improvements: A Learning Tool for All GPT4Readability isn't just for updating codebases that lack the documentation they deserve. It's also an incredible learning tool for developers at all levels. To generate suggestions on the functions in your codebase, use the suggestions tool as shown below:


Example Suggestion from Running GPT4Readability on my First Python Project: Original function: Suggestion: Explanation: Removed the unnecessary variable no_prop and its associated flag. Instead, we can directly return None if no properties are found.Combined the assignment statements for Metal_A, Metal_B, and Max_H into a single line for better readability.Removed the no_prop check after the loop since we can directly return None if no properties are found.Simplified the dictionary creation by directly assigning the values to the keys. These changes improve the readability of the code by reducing unnecessary variables and simplifying the logic. There is no significant impact on performance or space complexity.


Wrapping Up GPT4Readability is a highly useful tool for understanding and improving your Python projects! If GPT4Readability saves you time or you have any questions, please feel free to reach out to me (you can use any of the links in the section below). Also, please consider giving the GitHub repository a star!! If you find a bug or have a suggestion for improving GPT4Readability, don't hesitate to open an issue on the GitHub Issues page.


Connect with Me! I'm an aspiring deep-learning researcher currently working as a Computer Vision Engineer at KEF Robotics in Pittsburgh! Connect with me, and feel free to reach out to chat about anything ML related! Follow me on MediumTwitterLinkedInGitHubBuy me a coffee?


DAE Talking: High Fidelity Speech-Driven Talking Face Generation with Diffusion Autoencoder

The Diffusion Auto-Encoder Diffusion models are well known for their ability to produce ultra-high-quality images with excellent diversity. These models use a latent vector of noise the same shape as the image and denoise them across multiple steps. However, one of the well-known limitations of diffusion models is that the latent vectors lack semantic meaning. In GANs or VAEs (the usual competitors to diffusion models) it is possible to perform edits in the latent space that leads to predictable changes in the output images. Diffusion models, on the other hand, do not possess this quality. Diffusion auto-encoders overcome this problem by instead using two latent vectors, a semantic code, and a standard, image-sized latent. DAE is an autoencoding model, meaning that it consists of an encoder and decoder and is trained auto-regressively. The encoder of the DAE encodes an image into a semantic representation of that image. The decoder then takes the semantic latent vector and a noise image and runs the diffusion process to reconstruct the image. In the case of DAE-Talker, a DAE model is trained on approximately 10 minutes of data of the target actor.


Controlling the Latent Space With the trained DAE permitting control over generated images through the use of semantic latent vectors, it becomes possible to generate video by manipulating the latent vectors only. This is the aim of the speech2latent component of this paper. Given audio as input, it outputs a sequence of latent vectors that are later decoded by the DAE. An important point to note here is that the random noise image is fixed for every frame in the generated video. This cuts down on random noise that would create temporal inconsistencies in the final video. The speech2latent component consists of several layers. The first of these is a frozen feature extractor from the Wav2Vec2 model. Wav2Vec2 is a transformer-based model that is used for speech recognition. Taking the feature extractor allows for the extraction of rich latent features of speech; this is done by several papers that look to generate signals from speech, for example, FaceFormer or Imitator. This set of features is processed further using convolution and conformer blocks (a mix of CNN and transformer layers). After this, a pose adaption layer is applied (we cover this in a second), before a final set of conformer layers and a linear projection onto the DAE latent space.


Pose Adaptor The problem of speech-driven animation is a one-to-many problem. This is particularly true in the case of head pose, where the same audio can easily correspond to many different poses. To alleviate this issue, the authors propose the addition of a specific component in the speech2latent network that models pose. A pose predictor predicts pose from speech, while a pose projector adds the pose back into the intermediate features of the network. By adding a pose loss at this stage, the pose is better modeled. As the pose is projected into the features, either predicted poses or ground truth poses can be used.


Discussion While this is not the first method in talking face generation to make use of diffusion models, it seems to have found a very successful way of doing so. The results are, in my opinion, the best quality of any existing model. Additionally, the ability to control or generate the pose makes the model particularly flexible. With that being said, however, the model is not perfect. This method takes person-specificity to the extreme. The model is trained on 12 minutes of data from a single speaker, with no variation in background, lighting or camera. This is an order of magnitude more data than is used by most other methods. Perhaps for this reason, the experiments are restricted to one dataset only. Without seeing experiments on anyone except Obama, it is hard to verify that the model will work for most people. Furthermore, this is not an easy model to train. The DAE component alone trained for three full days on 8 V100 GPUS, with the speech2latent taking more time still. According to current GCP prices, this could cost upwards of $1500 per training! Inference will likely take a long time, too, as 100 denoising steps are required per frame.


Conclusion Overall this is an extremely promising method showing the best results currently available, if you don't mind the massive costs involved with training. If someone can work out how to develop a person-generic version of this model (and can afford to do so) I think we may be getting close to solving the problem of talking face generation entirely.


Igniting Cognitive Combustion: Fusing Cognitive Architectures and LLMs to Build the Next Computer

Symbolic and Sub-Symbolic For most of us, technology implies logical, explainable systems based on symbols like code, numbers, and language. We give computers explicit symbolic instructions, and they deterministically follow our recipes to produce expected outputs. These rule-based systems are the yang to the yin of messy, unstructured sub-symbolic systems. Sub-symbolic systems like neural networks mimic biological neurons' distributed, parallel nature. They emerge answers from the uncoordinated activities of individual nodes, just as colonies emerge from ants following simple patterns. While symbolic systems are crafted by human logic, sub-symbolic systems identify patterns and make fuzzy associations on their own. Their results seem magical but opaque compared to symbolic, transparent processes. Yet, like the yin-yang symbol, our minds unite these dual modes. Our symbolic faculties let us craft and follow the rules, build logical arguments, and communicate clearly through language. Our sub-symbolic faculties recognize faces, sense emotions, and move smoothly through the messy physical world.


Square Peg. Round Hole. Our rule-bound world has encountered an unruly stranger - the large language model (LLM). We demand our technologies behave logically and produce consistent results, yet LLMs think probabilistically, seeing possibilities where we see dead-ends. We dismiss their creativity as hallucinatory, judging through the square lens of symbolic thinking. But the future requires an engine that can ignite both symbolic and subsymbolic in cognitive combustion, harnessing their energy to drive us to new computational heights. The good news is scientists have been working on this for a while. Who wouldn't want to crack the code of making machines act like humans?


Cognitive Architectures Since the 1950s, researchers have pursued "cognitive architectures" - systems that can reason broadly, gain insights, adapt to change, and even reflect on their own thinking. After decades of research, cognitive architectures have proliferated to over 300 proposals. In their review, Kosteruba and Tsotsos analyzed 84 architectures, organizing them into a taxonomy. They found architectures spanned from biologically-inspired neural networks to rigid symbolic rule systems, with many hybrids in between.


Common Model of Cognition Thankfully we don't have to parse through all of these models. In 2017, John Laird and colleagues proposed a "standard model of mind" to provide a common framework for discussing these architectures. Their model synthesizes key concepts from three pioneering architectures: ACT-R, developed by John Anderson since 1976, models cognition through interacting procedural and declarative memories. Procedural memory encodes skills and routines, while declarative memory stores facts. By following procedures to access and apply declarative knowledge, ACT-R demonstrates how the interplay between "knowing that" and "knowing how" enables intelligent behavior.Soar, created by John Laird in the 1980s, provides a unified rule-based system spanning perception, learning, planning, problem-solving, and decision-making. "Productions" represent knowledge as condition-action rules operating on working memory. Soar simulates the mind's flexible, goal-directed abilities by dynamically following productions.Sigma, conceived by Polk and Newell in 1988, sees the mind as an asynchronous society of behaviors. Mental modules pass messages that trigger other behaviors, continuing until desires are satisfied or abandoned. This "behavior generation and management" loop gives rise to complex, adaptive behavior. The standard model of mind comprises three interactive memory systems: Declarative memory is our knowledge base, storing facts and concepts we can consciously declare. It retains information like your favorite color, historical events, traffic signs, or vocabulary. Declarative memory provides the raw material for thought, which other systems draw upon. Procedural memory encodes skills and routines, the "how-to" knowledge enabling behavior. It allows us to ride bikes, tie shoes or play instruments. Procedural memory translates knowledge into action. Working memory is our mental workspace, temporarily retaining and manipulating information to enable planning, problem-solving, and decision-making. When solving a math problem, working memory holds numbers, operations, and intermediate steps until a solution emerges. It integrates accessing and applying knowledge from declarative and procedural memory. In this model, there isn't a controller; instead, it is driven by a 'cognitive cycle.' Like the clock cycle in computers, this "cognitive cycle" drives the operation of the system by executing procedures to achieve goals. Driving a car, for example, requires: Declarative knowledge of signs, controls, and routesProcedural skills for drivingWorking memory to monitor conditions and react in the moment


Integrating Language Models into the Standard Model of Mind The standard model articulated key faculties before the current boom in language models. While it's still early, today's agent frameworks (AutoGPT, BabyAGI, etc.) have created some of these capabilities. Rather than distinct memory modules, these frameworks access external knowledge sources through vector search. Perception and motor modules are implemented as API calls and plugins. The language model's context window is the temporary working memory. A key gap remains: robust learning. Systems today lack a mechanism for accumulating knowledge and skills continuously from experience. They rely on prompt and model tuning instead. The next breakthrough will be integrating a mechanism that enables continuous learning from interactions, accumulating knowledge and skills on the fly - like human minds!


A New Recipe for Progress? Crafting Cognitive Architectures Today we find ourselves with new ingredients - language models, vector search, APIs - and old recipes for intelligence from cognitive architectures. Whether these can be stirred into a new system with capabilities beyond any single part remains unclear. History offers examples of recipes that endured, like von Neumann's computing framework or the internal combustion engine. But for every visionary recipe, there were many failed concoctions. One thing is clear. When we figure out this new 'cognition engine,' it will propel progress more profoundly than any technology before it.


What Is Innateness and Does It Matter for Artificial Intelligence? (Part 2)

Innateness in Artificial Intelligence The deep learning revolution has been accompanied by a shift in the relationship between AI and the study of the human mind. Artificial neural networks (ANNs) were originally inspired, loosely, by the massive interconnections of neurons within mammalian brains. While the typical example used of an ANN for broad audiences is a simplistic Feed-Forward Network - in which there is an input layer, hidden layers in the middle, and then an output layer through which information flows only in one direction - deep neural networks (DNNs) possessing many hundreds of such hidden layers have become more "internally heterogeneous" than their shallower predecessors (pictured below). Source: Wikimedia Commons licensed under the Creative Commons Attribution-Share Alike 4.0 International license. Over time, however, a reversal of the idea came about in popular AI discourse: that the human brain is actually like DNNs. The flip from biological inspiration for ANNs to biological brains being in the same league as DNNs is not just a linguistic quirk - it betrays both a sophisticated understanding of innateness in human minds and a proper interdisciplinarity in studying AI. For all its merits, the deep learning revolution brought with it a tendency to lower the standards of rigor necessary for understanding the only category of examples we have of intelligence - biological intelligence (a lack of cognitive framing recently lamented by Peter Voss as an obstacle on the path to Artificial General Intelligence, or AGI). It is not a surprise, then, that figures like Gary Marcus express repeated frustration with machine learning researchers who seem resistant to the idea of building highly structured systems, specified with some significant level of domain-specific knowledge. Marcus is, after all, a cognitive psychologist by trade. And it is not surprising that the one public debate between Gary Marcus and Yann LeCun in 2017 was centered on the question: "Does AI Need More Innate Machinery?" But this was in the pre-large language model (LLM) era. More recently, in June 2022, Yann LeCun and Jacob Browning, arguing that we may learn new things about human intelligence through AI, claim that LLMs have learned to manipulate symbols, "displaying some level of common-sense reasoning, compositionality, multilingual competency, some logical and mathematical abilities and even creepy capacities to mimic the dead." The catch - "they do not do so reliably." LeCun has since expressed his pessimism about LLMs in the pursuit of AGI but has not, clearly at least, connected this to pessimism about deep learning itself (whatever confusions one has about LeCun's positions, contra Marcus, the former remains something of an empiricist, though not a radical one). Unreliability has been no obstacle for others, however, who lean into the idea that LLMs can contribute to debates about innateness in humans. Linguist Steven Piantadosi wrote a highly disseminated article arguing that LLMs' success "undermines virtually every strong claim for the innateness of language that has been proposed by generative linguistics" (p. 1). He characterizes LLMs as "automated scientists or automated linguists, who also work over relatively unrestricted spaces, searching to find theories which do the best job of parsimoniously predicting observed data" (p. 19). If Piantadosi's argument were at least partially correct - and LLMs in some way explain how humans acquire natural languages - it would bear directly on the necessity (or lack thereof in this case) of innateness for biological and artificial intelligence. To be sure, others have cast doubt on the argument. Linguist Roni Katzir, upon testing GPT-4 himself, finds that the system fails to prove that it is "suitably biased" (p. 2) towards established constraints in human language use, arguing that they do not model human linguistic cognition so much as they model linguistic text. He argues that it would be strange to even expect LLMs to explain human language acquisition given the different purposes behind their design. Researchers Jon Rawski and Lucie Baumont bluntly argue that Piantadosi's argument is fallacious, in addition to prioritizing predictive power over explanatory power. Gameplaying AIs as Windows Into Artificial General Intelligence In many ways, the debate over innateness in AI in contrast to humans is an oddity. While machine learning has often seen an effort to minimize the number of innate components needed for a system to succeed, the debate assumes that the successes of the deep learning era are a kind of streak of empiricism. Innateness has mattered for the field in ways relevant to the pursuit of AGI. The issue is that when innateness is a factor in successful systems, it is often downplayed or ignored, with the conceptual significance of advancements lost on even those who promote them most. Nowhere is this more evident than in gameplaying AIs. One of the most baffling things about AlphaGo Zero's accompanying research paper was the authors' insistence that the system starts learning how to play Go from a state of "tabula rasa." Of course, AlphaGo Zero is remarkable for achieving superhuman performance in Go through self-play reinforcement learning, but it was Gary Marcus who explained at length just how much built-in stuff - that is, innate, before learning anything about Go at all - AlphaGo Zero possessed. Indeed, the domain knowledge used by AlphaGo Zero is as follows, drawn directly from the 2017 research paper (p. 360): (1) Perfect knowledge of the game rules used during the Monte Carlo tree search (MCTS). (2) The use of Tromp-Taylor scoring during MCTS simulations and self-play training - this is a list of 10 logical rules specifying several game features, including the 19x19 grid, black and white stones, what counts as "clearing" a color, and so on. (3) Input features that describe the position are structured as a 19x19 image; "that is, the neural network architecture is matched to the grid-structure of the board." (4) "The rules of Go are invariant under rotation and reflection" - this odd phrasing means two things: that the dataset was augmented during training "to include rotations and reflections of each position" and that "random rotations or reflections of the position during MCTS" were sampled using a specific algorithm. Much like how a human individual cannot frame the world in moral terms without a distinctive moral capacity built in from the start, AlphaGo Zero could not even recognize the Go board, the stones, the movements of either the board or the stones, and the rules of the game without this innate endowment. More than this, as Marcus notes, the MCTS apparatus was in no way learned from the data, but instead programmed in from the start, with the choice of which augmentations to include "made with human knowledge, rather than learned" (p. 8). Describing AlphaGo Zero as a blank slate because it is trained via self-play reinforcement learning is enormously misleading and it was not a victory for empiricism. Rather, as Marcus correctly explains, it is an "illustration...of the power of building in the right stuff to begin with...Convolution is the prior that has made the field of deep learning work; tree search has been vital for game playing. AlphaZero has combined the two" (p. 89). Indeed, much like human moral judgments result from a structured process in the mind drawing principally from a system dedicated to moral intuitions while interfacing with other systems, AlphaGo Zero could not handle the complexity of Go by simply dropping one of its innate components. And, as Artur d'Avila Garcez and Luís C. Lamb note, MCTS is a symbolic problem-solver, making its coupling with AlphaGo Zero's neural network an element of neuro-symbolic AI. This combinatorial aspect of AlphaGo Zero's innate endowment is what makes it so impressive and we should appreciate its built-in knowledge before training as well as the marvel of the training itself. Unique, combinatorial design choices that richly structure the system to a specific problem are often responsible for many gameplaying AIs' greatest successes, though techniques like reinforcement learning and self-play are inflated in commentary at the expense of these choices. This is strikingly evident in Meta's "Cicero," the Diplomacy-playing agent whose thunder was stolen by being released eight days before ChatGPT. Cicero, the first agent to reach human-level - not superhuman - performance in Diplomacy, exemplifies these combinatorial elements in two ways: First, on a high level, the system combines strategic reasoning and natural language communication during gameplay. Second, the system's architecture depends on a combination of research and techniques drawn from areas including strategic reasoning, natural language processing, and game theory. The result, as Gary Marcus and Ernest Davis describe, is "a collection of highly complex, interacting algorithms." To succeed at Diplomacy, players must engage in strategic reasoning as they seek to acquire a majority of supply centers on the map. This element of the game, which incorporates tactical proficiency from one move to the next in the service of an overarching goal, is similar to other games like Chess, Go, and Poker - each, by now, mastered in one way or another by AI. Where Diplomacy differs is that players spend significant time negotiating with one another in open-ended text-based or verbal dialogue. Sounds pretty straightforward, right? Players negotiate with one another to secure favorable outcomes - easy. It's anything but. Remember, there is a tendency to underappreciate the complexity of both the situations our moral judgments are in response to and the judgments themselves. Diplomacy can be deceptive in an analogous way should we not look from a distance. Aligning the strategic reasoning capabilities of an agent with natural language communication is enormously complex. Cicero's architecture can be divided between a planning engine and a dialogue agent. The planning engine is responsible for strategic reasoning whereas the dialogue agent handles natural language communication. Crucially, these two divisions are mediated by a highly specific mechanism (a "dialogue-conditional action model"), and the dialogue agent is controlled by the planning engine. This high-level structure ensures that the planning engine can generate intents which are then used to construct the agent's goals. This information is then fed into the dialogue agent so that message generation between Cicero and other players remains aligned with the strategic aims of the agent. While Cicero sometimes contradicts itself, its designers report that no humans identified the agent as an AI during anonymous, multi-level tournament play, highlighting the human-like success of the system. The lower-level structure has a distinctiveness of its own. One might suspect that, given the success of AlphaGo Zero through self-play, a Diplomacy agent should also train on this technique. But, pre-Cicero research found that training a Diplomacy agent without human data led to relatively poor play against humans. Nor is the Monte Carlo tree search algorithm particularly useful here. While MCTS had been tested in Diplomacy before Cicero (to my knowledge, primarily in the strategic aspect of the game, not so much the negotiation aspect), differences between Go and Diplomacy make it less effective. Go is an asynchronous game where players take their turns one at a time, thereby transmitting all relevant information on the board by the time the next player moves. Diplomacy is simultaneous - players negotiate, then input their actions privately, which are revealed to everyone simultaneously. MCTS cannot cope well with this structure. Here's what Meta AI's team did instead: building on prior research in Diplomacy-playing AIs, they constructed an algorithm called "piKL" (acceptably pronounced "pickle"). piKL is designed to 'interpolate' between the dual needs of searching for novel strategies and imitating humans. This algorithm is foundational to the planning engine. Echoing research done for the Poker-playing agent Libratus, Meta AI reports that "piKL treats each turn in Diplomacy as its own subgame..." A generative large language model, furthermore, underpins the dialogue agent. This LLM was fine-tuned on existing game dialogue. But, language models are ungrounded from the context of the Diplomacy world and thus generate outputs inconsistent with the strategic aims of the agent (in addition to being easily manipulable by humans). To work around this, some human messages on which it was trained were labeled with proposed actions - these represent the intentions of players. The language model was conditioned on these intents. We can begin to see how this all fits together. During play, the planning engine selects the relevant intents to control the language model. This control is premised on truthful actions for the system and mutually beneficial actions for the recipient of the communication (the system models actions for every player). Implications Cicero is a tour de force in engineering. It is, also, one of the most striking examples of an AI system accomplishing a distinctively human feat with a rich, highly structured endowment encoded with some domain knowledge. These internal components interface relatively productively in the alignment of strategic reasoning and natural language communication. Marcus and Davis were among the few who immediately recognized the significance of this system beyond the game of Diplomacy: "If Cicero is any guide, machine learning may ultimately prove to be even more valuable if it is embedded in highly structured systems, with a fair amount of innate, sometimes neurosymbolic machinery." Still, many in AI believe that this misses the point: yes, biological intelligence may have all sorts of innate features but artificially intelligent systems may not need them. There are, the idea goes, other ways to perform intelligent behavior than the ways humans do it. One need only look at AlphaGo Zero: this system, whose internal components are comparatively simpler than the human brain, plays Go better than any human in the world. Why focus on building more innate things into such a system when it gets the job done so well already? And why not try to minimize the number of moving parts operative in Cicero while we're at it? This hypothetical interlocutor misses the forest for the trees. As Marcus explains in his 2018 paper: "whereas a human can learn many games without specific innate representational features for any particular game, each implementation of [AlphaGo Zero] is innately endowed with game-specific features that lock the system to one particular realization of one particular game, focusing on one particular problem. Humans are vastly more flexible in how they approach problems" (p. 9). The leap from "narrow" to "general" AI is directly connected to the problem of innateness. And biological intelligence shows why: while it is true that no human individual can play Go at the level of AlphaGo Zero (assuming nothing like KataGo vs. Kellin Pelrine is replicated with AlphaGo Zero), the system could not get to this point without highly specific innate structure, in much the same way that human moral judgment takes on its very specific character owing to our innate structure. Insights from biology to AI go further than this. Gameplaying AIs are often notable in that they allow researchers to test techniques in environments where there are well-defined objectives (i.e., clear-cut conditions for victory) along with stable constraints (i.e., rules of the game, the board on which it is played, the number of players, and so on). These games are isolated exploitations of human cognitive abilities, including tactical proficiency, strategic reasoning, natural language communication, deception, cooperation and collaboration, and honesty and dishonesty, among others. The problem is that AlphaGo Zero, Cicero, and other gameplaying AIs are not doing what we are doing when we play Go, Diplomacy, or any other strategy game. As the interlocutor points out, they find different ways of succeeding: AlphaGo Zero can play against itself millions of times with a carefully augmented search algorithm specially designed for Go; Cicero can negotiate without the feeling of being betrayed misguiding its actions with substantial 'metagame' knowledge. But AlphaGo Zero can not strategize outside of Go, or even recognize a Go board that does not meet the exact dimensions it was innately programmed to recognize; Cicero cannot negotiate outside of Diplomacy because it does not know how to read intentions so much as it optimizes for agreements each would find acceptable. And herein lies the problem: when humans strategize in Go, they can put this ability to use in any other game or context; when humans read intentions in Diplomacy, they can use that same cognitive capability anywhere outside of the game with flexibility and robustness, whether in actual face-to-face diplomacy or casual conversation. The core point is this: The "different" ways that AIs use to succeed at games in ways superior to humans while simultaneously remaining confined to these domains are due to the power of their innate structure. It will take a new kind of innate structure that mixes with the successful elements of deep learning to make the leap from narrow to general AI. Conclusion The idea of innateness, in my experience, bothers people. But what is interesting is not that people are bothered by the idea that human arms, legs, circulatory systems, or spinal cords are innate - they're not. Rather, people tend to be bothered by the idea that higher-order faculties of the mind are innate - things like moral values, languages, musical sense, and the like. This double standard has been identified as a potential obstacle in the cognitive and neurosciences, an implicit bias of sorts, which I have argued is likely responsible for some of the resistance to innateness in AI. The "fetish" for end-to-end learning that Rodney Brooks tweeted about may, in part, be the result of this strange double standard simply having made its way into AI, rather than being unique to the field. But identifying merely raises the stakes in illustrating why neat separations between engineering and science in the effort to build human-like AI, or AGI itself will not suffice going forward. The mindset that says, "Let's just see what works and what doesn't work" has tremendous creative advantages, but human-like AI is too high a mountain for this alone. Human-like AI is, as illustrated, likely to be a series of well-structured research problems that cannot afford to take implicit assumptions about biology and cognition in humans or animals for granted. References: [1] B. Alloui-Cros, Mastering Both the Pen and the Sword? Cicero in the Game of Diplomacy (2023), Substack [2] A. Bakhtin, et al., No-Press Diplomacy from Scratch (2021), ArXiv [3] N. Brown and T. Sandholm, Superhuman AI for Heads-Up No-Limit Poker (2017), Science [4] V.J. Carchidi, Do Submarines Swim? (2022), AI & Society [5] N. Chomsky, Naturalism and Dualism in the Study of Language and Mind (1994), International Journal of Philosophical Studies [6] D. Silver, et al., Mastering the Game of Go Without Human Knowledge (2017), Nature [7] G. Dupre, (What) Can Deep Learning Contribute to Theoretical Linguistics? (2021), Minds and Machines [8] A. Garcez and L. Lamb, Neurosymbolic AI: The 3rd Wave (2023), Artificial Intelligence Review [9] M. Holmes, Face-to-Face Diplomacy (2018), Cambridge University Press [10] A.P. Jacob, et al., Modeling Strong and Human-Like Gameplay with KL-Regularized Search (2021), ArXiv [11] R. Katzir, Why large language models are poor theories of human linguistic cognition. A reply to Piantadosi (2023), LingBuzz [12] G. Marcus and E. Davis, What Does Meta AI's Diplomacy-Winning Cicero Mean for AI? (2022), Communications of the ACM [13] G. Marcus, Innateness, AlphaZero, and Artificial Intelligence, ArXiv [14] Meta Fundamental AI Research Diplomacy Team (FAIR), et al., Human-level Play in the Game of Diplomacy by Combining Language Models with Strategic Reasoning (2022), Science [15] S. Piantadosi, Modern Language Models Refute Chomsky's Approach to Language (2023), LingBuzz [16] J. Rawski and L. Baumont, Modern Language Models Refute Nothing (2023), LingBuzz [17] A. Theodoridis and G. Chalkiadakis, Monte Carlo Tree Search for the Game of Diplomacy (2020), 11th Hellenic Conference on Artificial Intelligence [18] S. Ullman, Using Neuroscience to Develop Artificial Intelligence (2019), Science


What Is Innateness and Does It Matter for Artificial Intelligence? (Part 1)

Biological Innateness in Moral Cognition The debate over both the robustness of the concept of innateness and whether humans possess innate cognitive endowments is a ripe 2,000-odd years old by now. I do not expect to settle the debate here nor provide a conversation-ending definition of the term. But a personal perspective on this is useful to get our feet wet, which will then be used to bootstrap our way into innateness in biology and AI. How to Get Interested in Innateness A significant amount of intellectual energy in my undergraduate and graduate years was spent arguing in favor of the idea that human moral psychology has a powerful, domain-specific, and innate basis in the mind - that is, a specialized cognitive system designated for the generation of moral intuitions, possessing independence from other systems of the mind, like the visual or auditory systems, though constantly required to interface with them in the course of ordinary human behavior. This was unusual, as I studied political science, a discipline that tends to not consider these issues in the detail characteristic of the cognitive and neurosciences. My motivation came from a source of frustration: I was taking a course on international organizations when the subject of the United Nations' 1948 Universal Declaration of Human Rights came up, which serves in many ways as the foundation of international human rights activism and law that sprung up in the decades following its adoption. International Relations scholars (a subfield of political science) have many ways of framing this document's creation and subsequent uses - some focusing on the anti-colonial movements of the first half of the twentieth century and the collapse of empires, others on ideational influences stretching back decades or centuries through political activism and religious traditions, and others still on the distribution of power across countries. Morality - meaning the moral judgments of individuals, the moral norms of particular cultures, and the moral traditions of groups and countries - underwrites much of this. However, interesting as all that is, one thing irked me: these scholars would write learned tomes on the historical origin of this or that human right in the Universal Declaration, how one religious tradition's moral values overlap with another's (or doesn't), even how the definition of "human" was re-shaped in the first half of the twentieth century leading to a concomitant expansion of moral concern. But virtually all of them made the same, implicit assumption: that morality could be understood in purely social scientific terms. This seemed implausible to me on its face. Thousands of pages can be written on the evolution of moral norms and customs that find themselves bound up in an international declaration. But how on earth do individuals develop a capacity to generate moral intuitions in the first place? Answering that question, it seems, necessarily shapes how we answer questions related to the development of international human rights norms and laws. Moral Cognition's Innate Basis While moral psychology has since pervaded international relations, much of the debate over innateness remains insufficiently fleshed out. Innateness can mean too many things, too often getting wrapped up in debates about biological determinism. Instead, to understand human morality, we should employ the same methodological techniques we use to understand any other physical or cognitive system of the body. We thus distinguish between the ability to generate moral intuitions and moral judgments and how this ability is used - the distinction between competence and performance employed throughout the cognitive sciences. Doing this allows us to strip away much of the messiness of social and political life to explain an ability - moral competence - that developmentally healthy humans possess. Our target of explanation in moral psychology, properly conceived, is moral competence, leaving performance to another day. As legal scholar and philosopher Matthias Mahlmann writes in a recent, major work on moral cognition and human rights: "Nevertheless, the performance of this capacity, the final evaluation of an action can be biased - for example, by the interests of the evaluating person. Consequently, such influences need to be factored out of the analysis if we are to properly study the cognitive competence in question, which is not an easy thing, particularly in empirical work" (p. 403). One can imagine why this is so difficult to do in the social sciences, especially, where the "final evaluation of an action" is frequently bound to empirically irrelevant factors. One can also, as we discuss below, imagine why this is difficult in AI, where systems require some level of human input to probe their competencies. So, we begin the analysis with the understanding that human beings can intuitively frame the social world in moral terms. As philosopher Susan Dwyer put it: "Moral evaluations, like permissibility judgments and attributions of responsibility, simply cannot get started if we do not already "see" the world in terms of agents, patients, and consequences" (p. 248). But how should we understand this capacity? What explains this ability to "see" the world in these terms? The next step is to ask what the fundamental properties of these moral evaluations look like. But remember: we cannot simply pick our favorite examples of good or evil and start from there. Nor, furthermore, can we use established ethical taxonomies - like the ethic of autonomy or the ethic of community - as our starting point, as prominent researchers like Jonathan Haidt and Craig Joseph do, because these simply neglect the most basic nature of moral evaluations. What do I mean by this? The truth is that moral judgment is deceptive - it is an intimate experience that most human individuals experience throughout their lives, oriented toward emotionally charged social situations and institutional arrangements. But once we have narrowed our focus to moral competence and stripped away the irrelevant factors, moral judgment has "seemingly innocuous" properties with "far-reaching consequences," as legal scholar John Mikhail puts it. These properties are as follows, drawn from Mikhail's description here (pp. 4546): (1) Novelty: The moral judgments individuals produce have no "point-for-point relationship" between any of the judgments they have produced in the past nor any they have encountered from others.Elaboration: While moral judgments may seem similar on the surface, they are elicited by circumstances that are entirely novel to the individual. A judgment that one person is wrong to strike another unprovoked sound familiar, but the people involved, the surrounding environment, the actions they take, and so on, are unique. Such a judgment is, then, novel. (2) Unbounded: An individual can produce, in principle, an unlimited number of moral judgments. There is no limit on the number or kinds of moral judgments an individual can make, save for non-moral constraints like memory, time, etc.Elaboration: An individual does not merely produce verbalized judgments about situations. Rather, each judgment presupposes mental representations of circumstances that are entirely novel to the individual. A judgment that one person is wrong to strike another unprovoked is not "just a judgment" - it depends on a mental representation of the specific configuration of people, actions, and other variables. The unbounded nature of moral judgments is that these judgments - and the mental representations they presuppose - can be generated by individuals infinitely. Taken together, the "far-reaching consequences" become apparent. When we attempt to make sense of the ability to produce novel moral judgments on an unbounded scale, we realize that the "finite storage capacity of the brain" rules out the possibility that the brain simply recruits a pre-sorted list of mental representations to produce them. "Instead," Mikhail writes, "her brain must contain, with respect to moral judgment, something more complex: some kind of cognitive system, perhaps characterizable in terms of principles or rules, that can construct or generate the unlimited number and variety of representations her exercise of moral judgment presupposes." (Mikhail also uses the language of "a recipe or program of some sort," which the AI researcher may find more plausible.) Implications Lo, and behold, the argument for morality's innate basis in the human mind comes into view. This innate basis is domain-specific (specialized for the evaluation of moral worth), and innate - that is, basic moral competence, the ability to morally frame and evaluate the world, is unlearned. The specific ways in which humans morally evaluate the world, furthermore, are also unlearned (meaning our moral faculty is not recruited for just any reason - such as, in Mahlmann's example, assigning virtue to a tree because an apple dropped into the hands of a hungry person). While it is not a logical impossibility that such an ability could be learned, it would stretch one's credulity to insert "learning" or "brain-environment interaction" as the primary mechanism responsible for the development of one's moral competence. While conceptions of innateness vary greatly, it is not at all uncommon to find neuroscientists saying the following: "The superiority of human cognitive learning and understanding compared with existing deep network models may largely result from the much richer and complex innate structures incorporated in the human cognitive system" (p. 693). By working, then, with the basic properties of moral judgment identified above, we should expect to find complex representations underlying them upon experimental inquiry. Indeed, individuals can be found to impose complex legal and philosophical principles on novel situations intuitively - without having a need to systematically and consciously apply the principles or even having been trained in them formally. Mikhail found, for example, that children responding to classic moral dilemmas posed by developmental psychologists in experimental settings employ an intuition against the legal conception of harmful battery. He thus postulates "an acute sensitivity to the purposeful harmful battery as a property of the human mind" (p. 780). This, we may characterize as innate moral knowledge specified in advance of experience, emerging reliably in the course of biological development. Later research conducted by Sydney Levine, Mikhail, and Alan M. Leslie finds initial experimental support for the idea that intentions are inferred by individuals evaluating novel actions in part by imposing a "presumption of innocence" on other agents. This picture of the mind is complex - it presumes that "moral intuitions can be understood as the output of a computational process performed over structured mental representations of human action," as these authors note elsewhere. Experiments probing participants' intuitions about moral dilemmas using "act trees" supported a long-running theme throughout certain areas of cognitive science: that the mental representations which presuppose moral intuitions are not "exceedingly simple" and cannot be captured "in terms of heuristics and biases" (p. 31). (Note that it could have turned out, upon experimental inquiry, that moral intuitions' mental representations were quite simplistic. Were this the case, we may still posit an innate basis for morality, but perhaps not a dedicated cognitive system.) What all this goes to show is that biological innateness is more than just a matter of what systems of the mind are endowed by genetics in advance of experience and to what extent they are pre-specified with domain-specific knowledge. Rather, it goes to show that such capacities interface with one another productively and without the conscious awareness of individuals. Causal representations of human action, moral intuition, linguistic intuition, and theory of mind, are all operative, in some fashion, in the seemingly simple matter of verbally deeming a novel action to be unjust or immoral. When dealing with the matter of innateness, then, we understand the following as paramount: First, positing the innate basis for a human capacity like moral judgment is not straightforward - the most basic properties of moral judgments are deceptively complex, requiring patience and attention to detail to identify them. Second, once identified, it takes conscious, deliberate effort to tease out the conceptual significance of these basic properties to articulate the broad contours of morality's innate basis in the mind. In this case, the cognitive system is characterized by rules, principles, or concepts encoded with some moral knowledge. Third, this cognitive system must interface productively with others in mind, including causal representations of human actions, theory of mind, linguistic cognition, visual cognition, and so on. Finally, what innateness reveals about human moral judgment is that the intuitions on which they are founded are principled and rely on structured mental representations. The tricky part is remembering how to conceptualize competence and performance. When we study moral competence, we study it in isolation from the rest of the mind. But we understand that, in ordinary life (and right now), the systems of the mind must routinely interface with one another in productive, dynamic ways. This methodological technique (abstracting the cognitive system away from concrete human behavior) is most difficult when dealing with cognitive functions like moral judgments or linguistic cognition, though we readily employ it elsewhere - the concept of an "immunocompromised" individual only makes sense, for example, if we assume that there is one, idealized immune system that human beings all possess. With all this in the background, we turn to the creation of artificial minds and how lessons in biological innateness can aid research programs to that end in Part 2. References [1] J. Donnelly, Universal Human Rights in Theory and Practice (2013), Cornell University Press. [2] S. Dwyer, How Good Is the Linguistic Analogy? (2006), The Innate Mind: Vol. 2 [3] M. Finnemore, The Purpose of Intervention (2003), Cornell University Press [4] A. Getachew, Worldmaking After Empire (2019), Princeton University Press [5] J. Haidt and C. Joseph, The Moral Mind: How Five Sets of Innate Intuitions Guide the Development of Many Culture-Specific Virtues, and Perhaps Even Modules (2008), The Innate Mind: Vol. 3 [6] M. Keck and K. Sikkink, Activists Beyond Borders (2014), Cornell University Press [7] S. Levine, A.M. Leslie, J. Mikhail, The Mental Representation of Human Action (2018), Cognitive Science [8] S. Levine, J. Mikhail, and A.M. Leslie, Presumed Innocent? How Tacit Assumptions of Intentional Structure Shape Moral Judgment (2018), Journal of Experimental Psychology: General [9] M. Mahlmann, Mind and Rights (2023), Cambridge University Press [10] J. Mikhail, Any Animal Whatever? (2014), Ethics [11] J. Mikhail, Elements of Moral Cognition (2011), Cambridge University Press [12] C. Reus-Smit, Individual Rights and the Making of the International System (2013), Cambridge University Press [13] D. Traven, Law and Sentiment in International Politics (2021), Cambridge University Press


This AI newsletter is all you need #55

What happened this week in AI by Louie This week we were excited to finally get to test Open AI's Code Interpreter, a new capability of GPT-4 within ChatGPT. OpenAI was also active with other announcements including revealing its plans to establish a team dedicated to achieving superalignment within the next four years. After an initial alpha release, the Code Interpreter feature, which includes coding and data visualization capabilities, is now available in beta mode for all ChatGPT Plus users. The Code Interpreter empowers ChatGPT with a range of functions, including data analysis, chart creation, file upload and editing, mathematical operations, and code execution. Using the Code Interpreter is relatively straightforward for most use cases, especially when approached as an analyst. Data, including compressed files like ZIP archives, can be easily uploaded by clicking the plus button. The initial prompt can be minimal, as the AI excels at comprehending data meaning and structure from context alone. Once loaded, the AI automatically handles tasks such as data merging and sophisticated data cleaning. Ethan Mollick has documented many interesting use cases of Code Interpreter on his Twitter and in this blog. Particularly powerful is the ability to recognize mistakes (due to failed code execution) and for the model to iterate to correct them. The feature can be used for many unique applications and people have documented uses including data analysis and visualization, trend identification, topic analysis, engagement pattern examination, SEO optimization, KPI analysis, video creation and even building machine learning data sets and models. The possibilities are extensive and are expanding as access to the Code Interpreter grows. There have been some recent signs of waning interest in ChatGPT (reports of website visitors down, albeit as GPT-Turbo and GPT-4 are rolled out more widely elsewhere via API), so this new feature comes at a good time for OpenAI. We think Code Interpreter unlocks many more capabilities from LLMs and can be incredibly useful, massively reducing cost and barriers to entry of basic data analysis. However, it still needs human oversight and human imagination to ask the right questions and get the most insights. We expect a lot more progress in this direction in the months and years ahead as LLMs are given more powerful tools to work with. In other AI news, Kinnu, the Generative AI-powered education startup that we introduced back in October, has successfully raised a $6.5 million funding round. Kinnu is primarily dedicated to adult enthusiast learners and utilizes AI to optimize content for each individual learner. "We always found it peculiar that most online education offerings simply scaled up the worst aspects of traditional schooling," states Christopher Kahler, co-founder, and CEO of Kinnu. "We believe there is a significant opportunity for AI-powered learning that focuses on accelerating the pace of human learning itself." We are thrilled with the progress made by Kinnu and concur on the potential for AI to contribute to enhanced education. - Louie Peters - Towards AI Co-founder and CEO


This AI newsletter is all you need #55

Hottest News Introducing Superalignment OpenAI has introduced the concept of Superalignment, emphasizing the necessity for scientific and technical breakthroughs to ensure that highly intelligent AI systems align with human intentions. The organization highlights the significance of establishing innovative governance institutions and exploring novel approaches to accomplish this alignment. 2. Miner Pivots 38,000 GPUs From Crypto to AI Cryptomining firm Hive Blockchain is shifting its focus from Ethereum mining to AI workloads. With 38,000 GPUs at their disposal, they intend to generate revenue while still utilizing some GPU power for crypto mining. However, transitioning to AI computing presents challenges, as older ETH mining GPUs have limited value in this market. 3. AWS Launches $100M Generative AI Innovation Center AWS has announced a substantial investment in the advancement of generative AI. With a commitment of $100 million, the newly established AWS Generative AI Innovation Center aims to assist customers and partners worldwide in unlocking the potential of generative AI. The Innovation Center is already collaborating with companies such as Highspot, Lonely Planet, Ryanair, and Twilio on generative AI solutions. 4. Google's medical AI chatbot is already being tested in hospitals Google's Med-PaLM 2, an AI tool developed to provide answers regarding medical information, has undergone testing at the Mayo Clinic research hospital. As a variant of the language model PaLM 2, Med-PaLM 2 has exhibited promising results in terms of reasoning, delivering consensus-supported answers, and comprehension, although some accuracy issues persist. 5. Alibaba launches A.I. tool to generate images from text Chinese technology giant Alibaba has launched Tongyi Wanxiang, an artificial intelligence tool capable of generating images from prompts. The tool allows users to input prompts in both Mandarin and English, and it generates images in various styles, including 2D illustrations, sketches, and 3D cartoons.


This AI newsletter is all you need #55

Five 5-minute reads/videos to keep you learning Intriguing Properties of Quantization at Scale Recent research reveals that the quality of Large Language Models' Post-Training Quantization (PTQ) is strongly influenced by pre-training hyperparameters. The study indicates that optimization choices, including weight decay, gradient clipping, and data type selection, have a significant impact on PTQ performance, with float16 and bfloat16 displaying notable influence. The research emphasizes the significance of optimization choices in the development of robust language models. 2. Best GPUs for Machine Learning for Your Next Project This article highlights the increasing use of GPUs in machine learning and provides a guide on choosing the best GPUs for AI applications. It mentions key factors to consider, such as compatibility and memory capacity, and identifies top GPU options from NVIDIA, including the Titan RTX and Tesla V100. It also suggests cost-effective alternatives like the EVGA GeForce GTX 1080 and AMD Radeon GPUs. 3. AI Weights Are Not Open "Source" The article delves into the issue of AI model weights and their availability as open-source. It argues that although the source code of AI models may be open, the weights - which encompass the actual learned knowledge - are generally not openly shared due to various reasons, such as concerns regarding intellectual property, privacy, and commercial interests. 4. Artificial intelligence glossary: 60+ terms to know AI has been growing exponentially, and there are different levels of awareness surrounding it. This glossary aims to serve as a resource for those who are just being introduced to AI and for those looking for a reference or a vocabulary refresher. 5. Getting started with Code Interpreter in ChatGPT In this article, Ethan Mollick has documented numerous interesting use cases of Code Interpreter on his Twitter. He has also highlighted its features, the process of using it, and more.


This AI newsletter is all you need #55

Papers & Repositories A Survey on Evaluation of Large Language Models This article provides a comprehensive review of evaluation methods for Language Models. It focuses on what to evaluate (including various dimensions like reasoning, ethics, and applications), where to evaluate (both general and specific benchmarks), and how to evaluate (including human evaluations versus automatic evaluations). 2. DreamDiffusion: Generating High-Quality Images from Brain EEG Signals This paper introduces DreamDiffusion, a novel method for generating high-quality images directly from brain electroencephalogram (EEG) signals, without the need to translate thoughts into text. By utilizing pre-trained models and advanced signal modeling techniques, it overcomes challenges like limited information and noise. 3. LongNet: Scaling Transformers to 1,000,000,000 Tokens This work introduces LongNet, a Transformer variant that can scale sequence length to more than 1 billion tokens, without sacrificing the performance on shorter sequences. It uses dilated attention to efficiently process longer sequences while maintaining performance on shorter ones. One of the key benefits of employing this technique is its compatibility with existing optimization approaches. It seamlessly integrates with any other methods already in use, expanding the range of options available for optimization. 4. The Curse of Recursion: Training on Generated Data Makes Models Forget Researchers explore "model collapse," the disappearance of original content distribution when models are trained using content from other models. This phenomenon affects LLMs, Variational Autoencoders, and Gaussian Mixture Models, emphasizing the need to understand and preserve data from genuine human interactions to maintain the benefits of web-collected data. 5. ChatLaw: Open-Source Legal Large Language Model with Integrated External Knowledge Bases ChatLaw is an open-source legal language model specifically designed for the Chinese legal domain. It utilizes a combination of vector and keyword retrieval techniques to address model hallucinations during data retrieval, resulting in more accurate responses. Self-attention is employed to improve accuracy and reliability in reference data. Enjoy these papers and news summaries? Get a daily recap in your inbox!


This AI newsletter is all you need #55

Weekly AI Podcast In this week's episode of the "What's AI" podcast, Louis Bouchard interviews Petar Veličković, a research scientist at DeepMind and an affiliate lecturer at Cambridge. Petar shares insights on the value of a Ph.D., emphasizing its role as a gateway to research and the opportunities it provides for building connections and adaptability. He also highlights the evolving landscape of AI research, underscoring the importance of diverse backgrounds and contributions. The interview provides valuable perspectives on academia versus industry, the role of a research scientist, working at DeepMind, teaching, and the significance of curiosity in driving impactful research. Tune in on YouTube, Spotify, or Apple Podcasts if you are interested in AI research!


This AI newsletter is all you need #55

Meme of the week! Meme shared by mrobino


This AI newsletter is all you need #55

Featured Community post from the Discord weaver159#1651 has recently introduced a new project called MetisFL, which is a federated learning framework designed to enable developers to easily federate their machine learning workflows and train models across distributed data silos, all without the need to centralize the data. The core of the framework is written in C++ and prioritizes scalability, speed, and resiliency. Currently, the project is transitioning from a private, experimental version to a public beta phase. Check it out on GitHub and support a fellow community member. Share your thoughts on this project in the thread here.


This AI newsletter is all you need #55

AI poll of the week! Join the discussion on Discord.


This AI newsletter is all you need #55

Article of the week Better than GPT-4 for SQL queries: NSQL (Fully OpenSource) by Dr. Mandar Karhade, MD. PhD. SQL is still the most commonly used language. Wouldn't it be great if we could write SQL queries by asking a large language model? It will offset so much of the work and probably democratize access to insights to almost everyone in the company who needs it. In this piece, the author talks about NSQL which is a new family of open-source large foundation models (FMs) designed specifically for SQL generation tasks.


This AI newsletter is all you need #55

Our must-read articles Classification Metrics Clearly Explained! by Jose D. Hernandez-Betancur Unleash Data Insights: Mastering AI for Powerful Analysis by Amit Kumar Meet Fully OpenSource Foundation Model By Salesforce XGen-7B by Dr. Mandar Karhade, MD. PhD. If you want to publish with Towards AI, check our guidelines and sign up. We will publish your work to our network if it meets our editorial policies and standards.


This AI newsletter is all you need #55

Job offers Data Architect @ShyftLabs (Toronto, Canada) Machine Learning Specialist - Legal Systems @Uni Systems (Brussels, Belgium) Graphics AI Research Developer @Plain Concepts (Remote) Data Engineer @Tomorrow (Freelance/Romania) Growth Manager, Data & Analytics @WillowTree (Remote) Client Platform Engineer @Chainalysis (Remote) Intern - Software Engineering Interns - ACST @Activate Interactive Pte Ltd (Singapore) Interested in sharing a job opportunity here? Contact sponsors@towardsai.net. If you are preparing your next machine learning interview, don't hesitate to check out our leading interview preparation website, confetti!


From Text to Beyond Words

Introduction Imagine having a clever friend who can understand what you're saying and respond in a way that makes sense. Language models are like those clever friends but in the form of computer programs. They use advanced techniques to learn from a lot of text and become really good at understanding and generating language. They can do things like completing sentences, translating languages, answering questions, and analyzing the sentiment or emotion in the text.


From Text to Beyond Words

The Origin: Rise of the Large Language Models Studying early language models was important because they laid the foundation for later advancements. They taught us more about how language works and how computers can learn from it. But they couldn't fully understand the complexities of human language. They used different approaches to make sense of words and sentences. One approach was using rules, which were like instructions for how to process language. These rules were created by experts and told the computer how to analyze and generate language. But these rule-based systems struggled with the complexities of human language and often couldn't understand the full meaning. Another approach was using statistics, which means looking at patterns in lots of language examples. Computers would learn from these patterns and make guesses about what words should come next. While this approach was better at handling some language complexities, it still had limitations in understanding context and generating meaningful sentences. Later, a more advanced model came along, which used new techniques that made them much better at understanding and generating language. This new model could capture the connections between words and understand context much more effectively. It was called Transformer.


From Text to Beyond Words

The Transformer: A Breakthrough for Language Models Well, of course, not the Bumblebee, we are talking about a deep learning model here in sequence-to-sequence problems like neural machine translation, early proposals used RNNs (Recurrent Neural Networks) in an encoder-decoder architecture. However, these architectures struggled with retaining information from the beginning of long sequences when new elements were added. The encoder's hidden state was typically associated with the most recent word in the input sentence. Consequently, if the decoder only relied on the last hidden state, it would lose important information about the initial elements. To address this limitation, the attention mechanism was introduced. Instead of relying solely on the last state of the encoder, the attention mechanism enables the decoder to access all states of the encoder, capturing information from the entire input sequence. This involves extracting a weighted sum of past encoder states, allowing the decoder to assign importance to each element of the input when predicting the next output element. As this approach still has a limitation: each sequence must be processed one element at a time. Both the encoder and decoder need to wait for the t-1 steps to complete before processing the t-th step. Consequently, when dealing with large datasets, this approach becomes time-consuming and computationally inefficient. The Transformer model utilizes a self-attention mechanism to extract features for each word, determining their importance in relation to other words in the sentence. Unlike recurrent units, this feature extraction involves weighted sums and activations, making it highly parallelizable and efficient. This use of the attention mechanism was introduced in the paper, "Attention is all you need" (Vaswani, Ashish & Shazeer, Noam & Parmar, Niki & Uszkoreit, Jakob & Jones, Llion & Gomez, Aidan & Kaiser, Lukasz & Polosukhin, Illia. (2017))[1]. This paper made a significant breakthrough in using the attention mechanism, which was the key enhancement for a model known as Transformer. The most famous current models that emerged in NLP tasks consist of dozens of transformers and one of its variants was GPT-2.


From Text to Beyond Words

Predecessors to Large Language Models Here, we'll explore two influential models, Word2Vec and GloVe, which revolutionized the representation of words in NLP. Additionally, we'll delve into recurrent neural networks (RNNs) and their ability to process sequential data. Let's uncover the key aspects of these models and their contributions to the field of language processing. Word2Vec: A popular model introduced in 2013. It represents words as dense vectors in a high-dimensional space, capturing word meanings. By training on large text data, it learns to predict surrounding words given a target word. Word2Vec transformed word representation in natural language processing, enabling a better understanding of word meanings.GloVe: Introduced in 2014, is another influential model. It represents words as vectors in a continuous space and uses global statistics about word co-occurrence. By considering the context of words, GloVe captures both semantic and syntactic relationships, enhancing language understanding.Recurrent Neural Networks (RNNs): RNNs are neural networks that process sequential data like sentences. They maintain an internal memory to capture previous information. RNNs excel at generating relevant output based on input sequence but struggle with long-term dependencies and grasping extensive context. They demonstrated the importance of learning distributed representations of words, capturing semantic relationships, and modeling sequential data. This laid the foundation for advanced large-scale language models such as GPT-3 and beyond, pushing the boundaries of language processing.


From Text to Beyond Words

Evolution of large-scale models Tracing the timeline of advancements in large-scale language models, from GPT-1 to GPT-3 and beyond. GPT-1 (Generative Pre-Trained Transformer 1): In 2018, OpenAI introduced GPT-1, a pioneering large-scale language model based on transformers. It was trained on vast amounts of internet text data and showed impressive language skills, excelling in various tasks.GPT-2 (Generative Pre-Trained Transformer 2): Released in 2019, GPT-2 elevated large-scale language models to new levels. With a larger dataset than GPT-1 and 1.5 billion parameters, it showcased exceptional text-generation abilities. Although initially restricted due to concerns, OpenAI later made the full model accessible to the public.GPT-3 (Generative Pre-Trained Transformer 3): Unveiled in 2020, GPT-3 represented a groundbreaking advance in large-scale language modeling. It became one of the largest models ever created, with 175 billion parameters. GPT-3 demonstrated extraordinary language generation skills and delivered exceptional performance across diverse tasks, from answering questions to code generation and lifelike conversations. ChatGPT is based on the GPT-3 architecture. The term "ChatGPT" is often used to refer to the specific implementation of the GPT-3 model designed for interactive conversations and dialogue systems. Further, Sam Altman, the CEO of OpenAI, in one of his interviews, confirmed that the GPT-4 will have around 100 trillion parameters. So, it will be another huge leap in the advancement of super AGI.


From Text to Beyond Words

Will Jobs be Affected? Well, we do not doubt that this massive leap in the field of Artificial Intelligence is going to create new jobs. But does that also mean that some of the jobs that we see around the world today may not exist tomorrow? Let's see what Sam Altman answered to one of similar questions in one of his interviews. So, this pretty much sums up my article. Apologies if it was too long, I hope you liked it. We talked about the rise of LLMs and witnessed their journey "From Text to Beyond Words". One thing that we know for sure is that these models will continue to improve at a much faster rate day by day. But that does not assure that they will not impact our lives in a negative manner. There will be new jobs, but some present jobs will disappear too; we will be able to do 10x more, but then there will be 10x more to do. There is only one truth, that world will not be the same again.


Freezing Layers of a Deep Learning Model - the proper way

Introduction It is often useful to freeze some of the parameters for example when you are fine-tuning your model and want to freeze some layers depending on the example you process like illustrated As we can see for the first example we are freezing the first two layers, and updating the parameters of the last two while for the second example we freeze the second and forth layer and fine-tuning the others. There will be many other cases when this technique is useful and if are are reading this article you will probably have a case for this.


Problem setting To simplify things a little bit, let's assume we have a model that accepts two different types of inputs - one with 3 features an other with 2 features, and depending on which inputs are passed we are going to pass them through two different initial layers. Thus, we want to update only the parameters related to those particular inputs during training. As we can see below, we want to freeze hidden_task1 layer when input1 is passed and freeze hidden_task2 layer when input2 is passed.


In a world with only SGD optimizers If we were working with SGD optimizer only, the problem would be solved simply using requires_grad = False that would not compute the gradients for the parameters we specify and thus we would obtain the desired results. In the outputs below we can see that the "Changed" parameter after the task 1 & task 2 updates are correct and we achieved the desired result.


Complications with Adaptive Optimizers Now let's try to run the same again, but using Adam optimizer : In the "Changed" part we now see that after the second task update, hidden_task1.weight got changed as well, which is not what we want. Let's try to understand what is going on here. The update rule for SGD is defined as: Where alpha is the learning rate, nabla L is the gradient with respect to the parameters. As we can see, if the gradient is zero the parameters do not get updated as the updates rule is only a function of the gradients. And when we set requires_grad = False the gradients will be zero for those layers and won't be computed. What about Adaptive optimizers such as ADAM or others where the update rule is not only a function of the gradients? Let's look at ADAM: Where Beta1, Beta2 are some hyper-parameters, alpha is the learning rate, mt is the first moment and vt is the second moment of the gradients gt. This update rule allows to compute adaptive learning rates for each parameter. Most importantly for our problem, even if the current gradient gt is set to zero through requires_grad = False , the parameters are still updated by the optimizer using the stored mt and vt values. Indeed, if we print optimizer.state we can see that the optimizer stores the number of steps (i.e., the number of gradient updates that each parameter had), exp_avg, which is the first moment and exp_avg_sq the second moment: We can see that in the first optimizer.step() update we get only two parameters in the optimizer states - hidden_task1and output . In the second optimizer's step, we have all the parameters but notice that hidden_task1 is updated twice which it shouldn't. So how to deal with them? The solution is actually very simple - instead of using requires_grad set simply set grad = None for the parameters. The code thus becomes: If we run the code now the ADAM optimizer, the results are as expected Also the optimizer.state is now different - in the second optimizer's step hidden_task1 is not updated and its step value is 1.


Distributed Data Parallel As an additional note, in case we want the support of DistributedDataParallel in PyTorch to work with multiple GPUs, we need to slightly modify the implementation described above as follows: It is a little bit more complicated, and if you know of a cleaner way to write it please share in the comments!


Feedback I would appreciate any feedback on the above - if you know whether there might be any potential problems doing it this way and if there are other ways to achieve the same.


Conclusions In this article, we described how to do layers freezing when during training we need to freeze and unfreeze some layers. If what you want is to freeze completely some of the layers during the whole training, you can use both solutions described in this article, as it would not matter in your case whether you are using SGD or an adaptive optimizer. However, as we have seen, the issue arises when you need to freeze and unfreeze layers during training, and the different behavior we see when using optimizers whose update rule only depends on the gradient and the ones whose update rule depends on other variables such as momentum. You can also find the full code here.


Kluges That Work: Turning Pattern Matchers into Logical Reasoners

HumanEval: Can your LLM code? One such benchmark is Human Eval. First introduced in a paper titled "Evaluating Large Language Models Trained on Code" (2021) by Open AI, it checks for the functional correctness of programs generated by LLMs. HumanEval measures the models on a pass metric. A pass@1 score indicates the likelihood of a model generating the correct solution on one try. A pass@100 score measures the likelihood of generating at least one correct solution after 100 attempts. OpenAI's Codex, a model tailored for code generation, achieved a pass@1 score of 33.5% and a pass@100 score of 77.4% on the HumanEval benchmark besting GPT-3, which had a pass@1 score of 0! In other words, Codex had a one in three chance of generating the right solution on one try but a three in four chance of getting it right within 100 tries. The challenge is determining which of the 100 attempts is correct. i.e., generative AI generates a lot of BS. One way to make sure you have the right code is to test it.


CodeT: Testing your way to the right answer In software engineering, test-driven development (TDD) is a practice where engineers first write tests before writing a single line of code. However, writing effective tests is difficult and laborious. In 2022, researchers at Microsoft proposed a method called CodeT that uses language models to generate test cases and code samples automatically. Now the tests could tell us which code output is the right one. But, the LLM could generate incorrect tests that pass faulty code samples. To address this, CodeT applies "dual execution agreement," meaning code must not only pass the tests but produce outputs that match other code samples. On the HumanEval benchmark, CodeT achieved a pass@1 score of 65.8%, indicating it can generate a valid solution and set of tests on the first attempt nearly two-thirds of the time. But this is brute force. Researchers began to wonder if they could emulate how humans solve problems.


Parsel: Think in an intermediate language Large language models (LLMs) are complex algorithms that predict the sequence of words most likely to follow a given prompt. At their core, they are sophisticated text completion engines. True reasoning, on the other hand, usually requires breaking down problems into steps. Researchers are finding ways to push LLMs beyond mere text completion and into simulacra of reasoning. For example, scientists at Google and the University of Tokyo discovered that prompting LLMs to "think in steps" can enhance their performance on certain reasoning tasks. In their paper "Large Language Models are Zero-Shot Reasoners," they showed that adding the phrase "think in steps" to prompts improved models' reasoning abilities. The chain-of-thought prompting technique builds on this by giving models examples of step-by-step thinking. Stanford researchers Eric Zelikman and colleagues leveraged these insights to create Parsel, a framework for training LLMs to decompose complex problems into a series of steps. Given a task, an LLM generates a "Parsel program" representing the steps to solve it. The program is translated into code and tested against constraints to find the correct solution. Using Parsel, the pass@1 accuracy rate increased to 85%.


Reflexion: Thinking about thinking Humans have a powerful ability to reason by reflecting on their own thinking, known as metacognition. This skill allows people to learn and create more efficiently. What if we could teach AI systems this same ability to self-reflect? Recent studies have explored this possibility. The paper "Self-Refine: Iterative Refinement with Self-Feedback" trained language models to review and improve their initial responses. The model was given its own output and asked to provide feedback on how to enhance it. This feedback was then incorporated into the next iteration, where the model refined its response based on the feedback. Remarkably, the models improved without any additional data or training. A similar framework called "Reflexion: Language Agents with Verbal Reinforcement Learning" enabled AI agents to self-reflect and evaluate their performance. Reflexion agents reviewed task feedback, recorded their reflections in memory, and used these to make better decisions in the future. Reflexion incorporated various types of feedback, from simple ratings to complex language responses. Reflexion+GPT-4 has a pass@1 of 91%.


Kluges That Work: The Serendipity of AI Evolution We have come a long way since 2021, when GPT-3 could not generate a single correct program (pass@1 score of 0). Today, improved models and prompting techniques have enabled pass@1 scores of over 90% on benchmark tasks. Yet LLMs remain, at their core, simply probabilistic engines completing tokens based on patterns, lacking internal knowledge representations or mechanisms for logical reasoning. This progress has been driven not by elegant, rational design but by the inexhaustible enthusiasm of researchers for tinkering, experimenting, and making incremental improvements to systems at hand - just as evolution slowly shapes and selects for changes that work. Most attempts end in dead ends, but a rare few point the way forward. It is a winding, haphazard path, but one that continues moving in a direction of greater capability, complexity and competence over time. In the end, the reasoning systems built on LLMS might be inelegant - a kluge - and yet if it works, that might be all that matters.


Heteroscedasticity and Homoscedasticity in Regression Learning

1. Introduction In data science and statistical analysis, several challenges can appear during the modeling process, making it difficult to get high-performance models. One of those challenges is the instability or high variability of residuals or errors, which is known as heteroscedasticity. In this article, we will explore exactly what heteroscedasticity is and how it can negatively affect the performance of data-driven models. In addition, we will introduce techniques commonly used to identify heteroscedasticity and strategies that are part of the arsenal that statisticians and data scientists have to tackle this problem. Join me through this article on heteroscedasticity so that you can include it in your data science and statistical terms and gain insights for future projects.


2. What Heteroscedasticity and Homoscedasticity are? A data science practitioner or statistician uses the term heteroscedasticity to refer to situations during modeling or statistical analysis in which the variability or dispersion of the error or residual in a data-driven model is not constant across the range of predictor variables. In contrast, homoscedasticity, or constant variance, implies that the variability of the errors remains consistent across the predictor domain. The presence of heteroscedasticity can lead to biased parameter estimates, either inflated or deflated standard errors, and incorrect hypothesis testing results. It can lead to erroneous inferences and impact the overall validity and interpretability of the model.


3. How to Detect Heteroscedasticity? Now, in this section, let's use Python to explore two techniques widely used to detect heteroscedasticity. One simple alternative is graphical, while the other is based on inferential statistics: Graphical technique: The graphical tool used to detect heteroscedasticity is the residual plot. The x-axis of the plot represents the predicted values or independent variables, while the y-axis represents the residuals or errors. A well-behaved residual plot for homoscedasticity typically exhibits no outliers, a zero mean (i.e., a cluster around zero), no clear pattern or trend (i.e., a random pattern), and is relatively consistent across the range of predicted values (i.e., a constant spread).Inferential technique: Statisticians have developed different inferential techniques to draw conclusions about heteroscedasticity. In this article, we will use the BreuschPagan test to determine whether the variance of the residuals depends on the predictor variable. In this test, the null hypothesis is homoscedasticity, while the alternative (or research) hypothesis states heteroscedasticity (i.e., the variance of residuals is dependent on the predictor variables).


3.1. Data Generation Now, to start with the example in Python, let's import the libraries required numpy, matplotlib, statsmodels, and scipy (for later). Let's generate two datasets, each with 100 examples. One of the datasets will suffer from heteroscedasticity, while the other satisfies the homoscedasticity assumption.


3.2. Base Model Fitting The code snippet presented below is a function that trains an ordinary least squares (OLS) regression based on a dataset and returns the fitted model. Thus, with the above function, let's train different models using the OLS algorithm. The first model is trained on the dataset with heteroscedasticity (model_het), while the second one is trained on the dataset with homoscedasticity (model_hom).


3.2. Residual Plot Now, we can create a function that receives the trained model as input so that it can plot the residuals or errors (y-axis) against the fitted or predicted values (x-axis). The code snippet below presents the resulting Python function to generate the residual plot. Using the function for the residual plot generation and running the following code line, let's generate the residual plot for the dataset with heteroscedasticity: Similarly, let's do the same for the dataset with homoscedasticity by running the below code snippet: As can be seen in Figure 2, the residuals for the dataset with predicted homoscedasticity are normally distributed around the zero line. The consistency of the error over the range of projected values can also be established. Under the homoscedasticity assumption, the ideal behavior of the residual plot is characterized by a random distribution with no outliers, a constant spread, and no apparent trend. Figure 1, however, shows that the error is essentially non-zero for predicted values below 3. The same holds true for numbers above 10. This demonstrates heteroscedasticity (which is to be expected given our case), as seen above.


3.3. Breusch-Pagan Test The residual plot is a useful method, but it requires a manual approach in which the practitioner must carefully examine the patterns displayed on the plot. For this reason, it is helpful to have a method that, when incorporated into an automated experiment, allows a Python program to automatically infer results based on testing rules. As mentioned earlier, the BreuschPagan test will aim at statistical inferential-based analysis. The below figure shows the Python implementation for the hypothesis test. alpha is the level of significance, which by default is 0.05. Let's apply the aforementioned function to the heteroscedastic dataset. To see the results of the tests on your screen, run the following line: Similarly, let's execute this code to get the outcomes for the homoscedastic dataset: The p-value for the dataset is, as expected, lower than the level of significance, being less than 0.05 for the heteroscedastic dataset. That is, there is statistical proof that this dataset is subject to heteroscedasticity. In contrast, the alternative hypothesis is rejected for the homoscedastic dataset since there is no statistical evidence to support the idea that the data is heteroscedastic rather than homoscedastic.


4. How to Handle Heteroscedasticity? The aforementioned methods and findings are both theoretically and practically intriguing. Even if you've established heteroscedasticity using one of the above approaches or another, you may still be wondering what to do next. Well, depending on the peculiarities of your case and analysis, a variety of several methods may be useful additions to your toolkit. The following are some common methods for handling heteroscedasticity in regression, as well as some resources worth consulting for further details: Transformation: Weighted Least Squares (WLS) Regression: By   Robust Standard Errors: Generalized Least Squares (GLS) Regression: By   Data Stratification or Segmentation: When important variables for describing the problem are missing or misspecified, good variable selection and data collection may help reduce heteroscedasticity in addition to the aforementioned strategies.


4.1. Yeo-Johnson transformation Using transformations like the logarithmic one helps normalize skewed data in ML by minimizing the impact of extreme results. In order to generate a more linear relationship between variables, transformations are sometimes used. For curved or nonlinear relationships, transformation can aid with visualization and interpretation. In addition to the aforementioned benefits, transformations are frequently employed to deal with heteroscedasticity by reducing the variance of the dependent variable. Therefore, the Yeo-Johnson transformation, an alternative method for reducing heteroscedasticity, will be implemented in this article. This transformation allows for the processing of data with a wide variety of distributions, the transformation of both positive and negative values, and the mitigation of the effect of outliers (see link below for more info). Let's put this solution into action in Python and evaluate the transformed results. Yeo-Johnson transformation is included in the scipy package, and after applying it, the OLS can be fitted: Now, let's check the results, considering the graphical and statistical tests introduced previously: After applying the transformation to the heteroscedastic dataset, the error values are much closer to zero, as illustrated in Figure 3. The apparent shift of the error distribution to a zero or x-axis-normal distribution. But the graphical representation is not entirely obvious. The p-value for the Breusch-Pagan test is greater than 0.05; hence, the null hypothesis isn't rejected. Thus, following the Yeo-Johnson transformation, heteroscedasticity has been reduced.


Conclusion We use the idea of heteroscedasticity and its consequences, especially in homoscedasticity-assumptive models, to our advantage in this work. We use a graphical tool called a residual plot to investigate heteroscedasticity, and we introduce a statistical inference tool called a Breusch-Pagan test, both of which help us assess whether or not there is sufficient evidence to conclude that heteroscedasticity does, in fact, occur. Furthermore, we present methods for handling heteroscedasticity, and in particular, we employed the Yeo-Johnson transformation, which is adaptable to a wide range of data distributions and values. Breusch-Pagan test results showed that heteroscedasticity could be reduced by utilizing the transformation method. Despite its popularity in discussions of linear regression, heteroscedasticity can also be seen in the residuals or prediction errors of other machine-learning techniques. Such methods include regression based on the Gaussian process, time series analysis, artificial neural networks, support vector machines, and tree-based algorithms. If you enjoy my posts, follow me on Medium to stay tuned for more thought-provoking content, clap this publication , and share this material with your colleagues ...


Suggested Material W. Rutha and T. Loughin, The Effect of Heteroscedasticity on Regression Trees (2016), arXiv (Cornell University)Q. Le, A. Smola and S. Canu, Heteroscedastic Gaussian Process Regression (2020)H. Park and C. Hwang, Weighted Support Vector Machines for Heteroscedastic Regression (2006), Journal of the Korean Data and Information Science SocietyA. Stirn, Faithful Heteroscedastic Regression with Neural Networks (2022), arXiv (Cornell University)V. Cerqueira, How to Detect Heteroskedasticity in Time Series (2022), Towards Data Science


Unleash Data Insights: Mastering AI for Powerful Analysis

Why Data Pros Need To Learn To Use AI Tools A Rapidly Changing World In this fast-paced world, we're witnessing transformative changes. Revolutionary tools such as ChatGPT and Google Bard have emerged, enabling users to accomplish tasks within minutes that previously consumed hours of their time. Here are some compelling reasons why data professionals should consider using AI: Boost Performance and Efficiency: AI helps enhance your overall performance by streamlining tasks and processes, allowing you to work more efficiently.Automate Low-Value Tasks: AI enables you to automate mundane and repetitive tasks, freeing up your time for more valuable activities.Focus on High-Value Activities: By delegating routine tasks to AI, you can dedicate your efforts to more important and strategic aspects of your work.Verify Work with Ease: AI serves as a convenient tool to double-check your work, ensuring accuracy and reducing errors.Quick Learning and Question Resolution: Leveraging AI tools allow you to swiftly learn new concepts and find answers to your inquiries, saving time and effort.Stay Competitive and Innovative: Embracing AI keeps you at the forefront of your field, enabling you to remain competitive and up-to-date in a rapidly evolving landscape.


Will AI Tools Render Data Analyst and Data Scientist Jobs Obsolete?? The world of AI has seen remarkable advancements, but does this mean that AI tools will completely replace the need for data analysts and data scientists? Let's explore this question in simple terms. The potential impact of AI on the roles of data analysts and data scientists often sparks intense debates, especially among those currently working in or aspiring to join the field. It's understandable that this concept can be unsettling. However, concerns about AI replacing analytics professionals are largely exaggerated. Companies will always require the invaluable qualities that exceptional analysts bring to the table, including: Strategic Thinking and Problem-Solving: The ability to think strategically and solve complex problems is a distinct advantage offered by skilled analysts.Communication Skills: Effective communication is essential in translating analytical insights into actionable recommendations, which AI alone struggles to do.Technical Proficiency: While AI tools can address certain technical aspects, they lack the comprehensive skill set possessed by proficient analysts. For the foreseeable future, analysts who excel in strategic thinking, problem-solving, and communication skills are unlikely to be replaced by AI in their roles. However, it's worth noting that another analyst who effectively utilizes AI tools might outperform their peers. Consider the analogy of being an analyst without knowledge of spreadsheets or the internet in today's world - you would be significantly disadvantaged compared to your competitors. The same will soon apply to AI tools. To maintain a competitive edge in the data field, it's crucial to nurture your uniquely human skills, establish a strong technical foundation, and embrace cutting-edge technologies like AI. By doing so, you can become unstoppable in your career.


Cautionary Notes: Common Challenges When Using LLM Tools Before delving into specific analytics use cases for AI, it's essential to be aware of potential pitfalls that can arise while utilizing these tools. Here are some important points to keep in mind: 1. Protect Sensitive Company Data: Be cautious when sharing sensitive information with LLMs, as it may no longer remain private. Several companies have already prohibited the use of these tools due to data security concerns. Compromising sensitive information externally can lead to serious consequences, including termination. 2. Hallucination and Inaccurate Information: LLMs have a tendency to generate fictitious content, often sounding confident while doing so. It's crucial to exercise critical thinking and discern between accurate and hallucinated information provided by these tools. 3. Suboptimal Solutions: While LLMs may provide answers to your questions, the solutions offered might not always be the most optimal ones. It's important to assess the received response critically and consider alternative approaches if needed. 4. Limited Domain Expertise: Current LLM tools possess broad knowledge but may lack specific domain expertise or deep understanding in a particular area where you require their performance. 5. Absence of Common Sense and Human Judgment: LLMs, at least for now, cannot replicate human judgment or possess common sense. These models are trained on vast amounts of information available on the internet, which includes both reliable and unreliable data. Differentiating between them is a challenge for LLMs. It is crucial to exercise sound judgment and critical thinking when using these tools while being aware of their current limitations. When used appropriately, LLMs can be valuable in accelerating tasks and automating mundane aspects of the analytics workflow. Furthermore, it's worth noting that these tools are rapidly improving. Many of the limitations discussed here are being actively addressed, and solutions may emerge in the near future. While considering AI tools, it is important to remember that the landscape is continuously evolving.


Best Practices For Using AI Tools For Analytics One of the quickest ways to be more effective with these tools is to learn how to write better prompts. Here are some of our Prompt Engineering tips to help you get the most out of LLMs like ChatGPT and Google Bard: Clarity is Key: Enhancing AI Responses through Detailed Information To optimize the value of AI responses, it is crucial to provide clear and specific details. The more detailed information you provide to the AI, the higher the likelihood of receiving a valuable response. Being specific in your input enables the AI to understand your requirements accurately and generate more relevant insights. 2. Context is Crucial: Enhancing AI Understanding through Detailed Information When utilizing AI, it is important to provide sufficient context. The more information you can share about your specific situation and the problem you aim to solve, the better. Context empowers the AI to grasp the nuances of your scenario, enabling it to deliver more accurate and tailored insights to address your needs effectively. 3. Setting Roles: Shaping Relevant AI Responses through Clear Instructions Assigning roles to the AI tool can significantly impact the relevance of its response. Clearly indicating who the AI should impersonate and specifying the intended recipient of the response can greatly influence the generated output. By establishing roles, you can guide the AI in providing more tailored and fitting responses that align with your specific requirements. 4. Establishing the Tone: Guiding AI Responses with Preferences In order to shape AI responses according to your needs, it is beneficial to set the desired tone. You can prescribe factors such as the level of technicality, level of detail, formality, and length you prefer for the response. By providing these guidelines, you can influence the style and content of the AI-generated response, ensuring it aligns with your specific preferences and requirements. These are good rules of thumb but don't overthink them at the expense of speed. It's easy to scrap your conversation and start fresh if you don't like where things are headed. So aim for good progress here, and don't worry about perfection when it comes to prompt writing.