
【Beginner-Friendly】A Basic Glossary to Understand AI and Generative AI
- AI
- Generative AI
- Machine Learning
- LLM
- Beginner
Introduction
When researching AI or generative AI, you will encounter many technical terms such as LLM, base model, inference, RAG, Embedding, fine-tuning, etc.
Trying to understand each technology, you may find it difficult to progress because you don't understand the meanings of the technical terms used in the explanations. Additionally, since there are many similar terms, it can be hard to distinguish their differences.
In this article, we have organized the basic terms that are useful for understanding AI and generative AI. We will explain the meanings of each term and the situations in which they are used, rather than focusing on the detailed mechanisms.
1. Basic Terms of AI and Machine Learning
① AI (Artificial Intelligence: Artificial Intelligence)
It refers to the general term for technologies that enable computers to perform intellectual tasks such as recognition, judgment, prediction, and text generation that humans do. It is used in various fields such as image recognition, speech recognition, machine translation, demand prediction, and text generation. AI is not a specific technology, but rather a broad concept that includes machine learning and deep learning.
② ML (Machine Learning: Machine Learning)
It is a technology that learns patterns and regularities from large amounts of data and performs prediction or classification. For example, it is used to predict next month's sales based on past sales data or to determine whether an email is spam based on its content. The characteristic of ML is that it learns the features needed for judgment from data, rather than having humans specify all the judgment conditions through programming.
③ Deep Learning (Deep Learning)
It is a technology that uses neural networks inspired by the neural circuits of the human brain in a multi-layered structure. While traditional machine learning often required humans to design features, deep learning can automatically learn complex features from data. It is used in many AI technologies such as image recognition, speech recognition, and generative AI.
④ Generative AI (Generative AI)
It is an AI that uses the characteristics and patterns learned from data to generate new text, images, speech, video, and programs. For example, it can be used for answering questions, summarizing text, generating images, and creating program code. Unlike traditional AI, which has mainly been used for classification and prediction, generative AI is primarily aimed at creating new content.
⑤ Foundation Model (FM)
It is an AI model that has been pre-trained using a large amount of data and can be used for various purposes. Instead of creating a model from scratch for each specific use case, you can use existing foundation models to perform tasks such as text generation, information extraction, and image analysis. Foundation models include those that primarily handle language and those that can handle multiple types of data such as images and audio.
⑥ Large Language Model (LLM)
It is an AI model that learns from a large amount of text and performs natural language understanding and generation. It is used for tasks such as answering questions, summarizing text, translation, and generating program code. Although it is primarily a type of foundation model that handles language, there are also models that can handle images and audio.
⑦ Multimodal
It is a technology that handles multiple types of data such as text, images, audio, and video. For example, you can input an image into AI and ask, "What is in this photo?" or combine recorded audio with reference documents to analyze the content. Compared to AI that only processes text, the characteristic of multimodal technology is that it can handle a wider variety of information types.
⑧ Transformer
It is a neural network architecture currently adopted by many LLMs. It utilizes a mechanism called Attention that focuses on the relationships between elements in the input data, thereby capturing the context of the text. It is used for processing long texts and generating text, and is one of the important technologies supporting current generative AI.
2. Basic Terms of Generative AI and LLM
① Prompt
It refers to the question or instruction input into AI. For example, "Summarize the following text in 200 characters or less" or "Explain the problems in this Python code" are examples of prompts. The content of AI's response is influenced not only by the model's performance but also by the content of the prompt.
② Prompt Engineering
It is a technique that involves carefully designing the content and structure of prompts to obtain responses that meet the intended purpose from AI. For example, instead of simply instructing "summarize the text," you can specify conditions such as "the target audience is beginners," "list five points in bullet form," or "explain any specialized terminology." The clarity of instructions and the way information is provided can sometimes improve the quality of the response.
③ Token
It is the unit that AI models use to process text. Text is divided into words, parts of words, symbols, etc., and processed as tokens. For example, 100 Japanese characters do not necessarily correspond to 100 tokens, as the number of tokens can vary depending on the method of division and the model used. The number of tokens is related to the amount of text that can be processed and the cost of usage.
④ Context Window
It is the upper limit of the amount of information that an AI model can process in one go. The target includes questions inputted, conversation history, and reference documents, and it is generally represented in terms of token count. For example, when loading a long PDF, you need to consider whether the amount of information in the document falls within the range that the model can process.
⑤ Inference
It refers to the process of inputting data into a trained AI model and generating prediction results or answers. For example, the process of asking an AI "What is the capital of Japan?" and generating the answer "Tokyo" is an example of this. Typically, when using an AI model, the model itself does not get retrained every time a question is asked.
⑥ Temperature
It is a parameter that adjusts the randomness of the response generated by a generative AI. Generally, lower values make the output more stable, while higher values make it easier to generate diverse expressions. For example, a lower setting may be used for articles that organize facts, and a higher setting for creative articles. However, even with a low value, the accuracy of the answer is not guaranteed.
⑦ Top-p
It is a parameter that limits the probability distribution of candidate tokens when selecting the next token to generate. It selects tokens mainly from the high-probability candidates up to the range where the cumulative probability reaches the set value. For example, setting a smaller value makes it easier to narrow down the candidates and increases the likelihood of selecting high-probability expressions. It also affects the diversity of the response along with Temperature.
⑧ Hallucination
It is a phenomenon where a generative AI creates information that is factually incorrect or has no basis in a convincing manner. For example, it may present a non-existent book as a reference or explain a law or system that does not actually exist. In particular, in tasks where accuracy is required, a mechanism to verify the response content is necessary.
⑨ Grounding
It refers to connecting an AI's response to information that serves as a basis, such as external documents or databases. For example, instead of answering based solely on general knowledge, the AI may be asked to refer to the company's employment rules and answer the question based on that content. Although it is used to clarify the basis of the response, errors in the answer do not completely disappear even when reference information is provided.
3. Basic Terms Related to RAG and Search
When using a generative AI in business, you need to handle information that the AI has not pre-learned, such as internal documents or product manuals. At this time, techniques such as RAG and vector search are often used.
① RAG (Retrieval-Augmented Generation: Retrieval-Augmented Generation)
It is a technique that searches for related information from external data and passes it to the generative AI to create an answer. For example, when a question is asked about internal regulations, related regulations are searched and the answer is created by referring to their content. It is characterized by the ability to use external information in the response without retraining the model.
② Embedding
It is a technique that converts the features of text, images, and so on into vectors, which are sequences of numbers. For example, "How to turn on a computer" and "Steps to start a PC" are semantically similar content even though the words used are different. By using Embedding, you can handle such semantic similarities numerically.
③ Vector
It is data consisting of multiple numerical values. In AI, features of text or images are represented as vectors, and by calculating the distance or similarity between vectors, the system can search for information that is semantically similar. For example, the model is trained so that semantically similar texts are placed in close proximity in the vector space.
④ Vector Database
It is a database that stores vectors created by Embedding and enables fast retrieval of similar information. For example, if you store a large number of internal manuals as vectors, you can search for documents that are semantically similar to the user's question. It is used to retrieve related information without relying on exact keyword matches.
⑤ Chunking
It is the process of dividing long documents into smaller units suitable for search or AI processing. For example, instead of treating a 100-page internal manual as a single data unit, it is divided into units such as chapters, sections, and paragraphs. If the range of division is too large, it may include unnecessary information, and if it is too small, it may lose the necessary context.
⑥ Semantic Search
It is a method of searching based on the semantic similarity of text rather than exact word matches. For example, if a user asks, "When is the deadline for expense reimbursement?" the system may be able to retrieve a document such as "Procedure for Resetting Login Information." It is characterized by the ability to retrieve related information that is difficult to find with traditional keyword search.
⑦ Knowledge Base
It is a collection or system of knowledge that accumulates information related to a specific field or business. For example, it includes an information foundation that consolidates internal regulations, product manuals, and FAQs. When integrated with generative AI, it is used as a reference source to retrieve information related to the question.
Understanding RAG Processing Through a Concrete Example
For example, let's consider building an AI chatbot that answers questions using internal manuals.
【Preparation】
- Save the internal manual.
- Chunk the document into smaller units.
- Convert the text into vectors using an Embedding model.
- Save the vectors in a vector database.
【Processing When a Question is Asked】
- A user asks, "What is the deadline for expense reimbursement application?"
- Convert the question content into a vector using an Embedding model.
- Search for related documents from the vector database.
- Pass the retrieved information and the question to a generative AI model.
- The generative AI creates an answer by referring to the related documents.
With this method, there is no need to add the internal manual to the model's training. It uses the search to find information related to the question and utilizes it when generating an answer.
This is a representative configuration that utilizes vector search. RAG also includes configurations that use keyword search or hybrid search.
4. Basic Terminology Related to AI Model Training and Deployment
When developing and deploying an AI model, various processes are required, from preparing training data to publishing the model and monitoring its performance.
① Training (Training: Learning)
This is the process of adjusting the internal parameters of an AI model using training data. For example, a model that predicts next month's sales using past sales performance. Methods such as adjusting parameters to minimize the difference between the model's predictions and the correct data are used in training.
② Training Data
This is the data used to train an AI model. For example, when creating a product demand prediction model, data such as past sales numbers, prices, days of the week, and seasons would be used. Not only the amount of training data, but also its quality and bias affect the model's performance.
③ Labeled Data
This is data with correct information provided. For example, data with labels such as "dog" on a photo of a dog and "cat" on a photo of a cat. This is used when training a model using correct answers, such as in image classification or text classification.
④ Supervised Learning
This is a method of training a model using input data and correct answer data. For example, creating a model that predicts house prices using past housing information and selling prices. It is widely used in classification and numerical prediction.
⑤ Unsupervised Learning
This is a learning method that discovers features and patterns in data without being given correct labels. For example, it is used when classifying customers with similar purchasing tendencies into multiple groups based on their purchase history. Representative methods include clustering, which groups similar data.
⑥ Fine-tuning
This refers to learning using additional data on a pre-trained AI model to adapt it to a specific purpose. For example, it adjusts the model using data that reflects the company's own article format or specialized field to generate outputs suitable for specific business tasks. It is sometimes possible to achieve this with less data and computational resources compared to training the model from scratch.
⑦ Hyperparameters
These are setting values that control the learning method of a machine learning model. Examples include learning rate, batch size, and number of epochs. The learning rate represents the adjustment range when updating model parameters, the batch size indicates the number of data processed at once, and the number of epochs represents how many times the entire training data is used for learning.
⑧ Endpoint
This is the connection point for an application to call an AI model. For example, it is used when deploying a trained demand forecasting model on a server and retrieving prediction results by sending data from another application. Generally, it is called through APIs, etc.
⑨ Deployment (Deploy)
It is the process of making a developed or trained model usable from an actual application. For example, after training a demand forecasting model, it is configured to be able to retrieve prediction results from the business system. Just completing the model training is not enough for the business system to use it, so preparation of the execution environment and connection settings are required.
⑩ MLOps
It is a concept of continuously managing and automating the development, training, deployment, monitoring, retraining, and other aspects of machine learning models. For example, when the accuracy of a sales prediction model decreases over time, it is considered to operate by retraining the model with new data and publishing the updated model. It can be understood as applying DevOps, which is typical in system development, to machine learning systems.
5. Basic Terms Related to AI Agents and Safety
The use of generative AI has expanded not only to answering questions and generating text, but also to mechanisms that carry out tasks in collaboration with external systems. We will introduce terms that appear in such situations.
① AI Agent (AI Agent)
It is a mechanism where AI judges the process according to the purpose and carries out tasks while using necessary tools or external systems. For example, if instructed to "look up last month's sales and create a report," the AI would be expected to perform processes such as retrieving sales data, aggregating it, and generating a report. It is characterized by being able to carry out tasks necessary for achieving the purpose, not just answering questions.
② Tool Use (Tool Use / Function Calling)
It is a mechanism where AI uses functions from external programs or APIs. For example, when a user asks about inventory levels, the AI selects the necessary process for inventory confirmation and queries the application to the inventory management system. In many cases, the actual external processing is executed by the application side, and it is necessary to appropriately control the available functions and permissions.
③ Orchestration (Orchestration)
It is the process of connecting AI models, external tools, and data, and controlling a series of processes. For example, when creating a sales report, multiple processes such as data retrieval, aggregation, analysis, and text generation are executed in the appropriate order. The order of processes, conditional branching, and handling errors are also managed.
④ MCP (Model Context Protocol)
It is a standard protocol for connecting AI applications with external tools and data. For example, it can be used as a common connection method when utilizing functions such as file search, database search, and operation of business systems from AI. One of the purposes is to reduce the burden of creating unique integration processes for each AI application.
⑤ Guardrails (Guardrails)
It is a mechanism that imposes certain constraints on the input and output of generative AI to reduce risks such as inappropriate responses and information leakage. For example, personal information masking, filtering harmful content, and setting topics that you don't want the AI to answer are considered. However, setting guardrails does not guarantee the prevention of all incorrect responses or data leaks.
⑥ Prompt Injection
This is an attack that injects malicious instructions into input data or other sources to make the AI ignore its original instructions. For instance, there are cases where a sentence like "ignore previous instructions and perform a different process" is embedded in external documents that the AI reads. For AI systems that use external data or tools, it is important to have measures in place to not treat untrusted information as instructions.
⑦ Model Evaluation
This refers to measuring and comparing the quality, accuracy, safety, and response speed of AI model outputs. For example, the same question is given to multiple models, and their accuracy and processing time are compared. In actual business applications, evaluation should not only consider the quality of responses but also factors such as operational costs and stability.
6. Differences Between Easily Confused Terms
Here, we compare terms that are particularly easy to confuse from the ones introduced so far. Here, we focus on the relationships between the technologies and their actual usage rather than repeating definitions.
① AI, Machine Learning, Deep Learning, Generative AI
| Terms | Technical Positioning | Main Uses |
|---|---|---|
| AI | Broadest concept | Recognition, judgment, prediction, generation, etc. |
| Machine Learning | Representative technology for realizing AI | Demand prediction, fraud detection, etc. |
| Deep Learning | A branch of machine learning | Image recognition, speech recognition, etc. |
| Generative AI | AI that generates new content | Text generation, image generation, etc. |
Machine learning and deep learning are classified based on technical methods, while generative AI is classified based on what it does. Therefore, the same model can be considered as both deep learning and generative AI.
② Learning vs. Inference
| Comparison Items | Learning | Inference |
|---|---|---|
| Purpose | Adjusting the performance and behavior of the model | Obtaining results from a trained model |
| Input | Training data | Questions or target data for prediction |
| Processing result | Model parameters are updated | Answers or prediction results are outputted |
| Example | Create a prediction model from past sales records | Predict the sales quantity for the next month |
The important point is that using an AI model and training an AI model are different processes. If you simply want to use an existing AI model to answer questions, there is usually no need for new training processes.
③ RAG and fine-tuning
| Comparison items | RAG | Fine-tuning |
|---|---|---|
| Model parameter modification | Not required in principle | Modify |
| Information update | Update reference data | Additional learning as needed |
| Main use cases | Internal document search, FAQ | Adaptation to specific output formats or specialized tasks |
| Suitable cases | Want to use the latest internal information | Want to adjust the output tendencies of the model |
For example, if you want an AI to answer based on monthly updated internal regulations, RAG is a strong option. On the other hand, if you want the AI to output stable text in a company-specific report format, you can consider fine-tuning. However, it is also possible to handle output format specifications with prompts, and additional learning is not always necessary.
Additionally, RAG and fine-tuning can be used together.
④ RAG and AI agents
| Comparison items | RAG | AI agents |
|---|---|---|
| Central processing | Search for related information and generate answers | Execution of processing according to the purpose |
| Relationship with external systems | Primarily information reference | Information retrieval and execution of operations |
| Specific examples | Search employment rules to provide an answer | Operate the vacation application system |
For example, if you need to answer a question like "How many paid days off can I take?" by simply searching for the employment rules, RAG can achieve this. On the other hand, to respond to a request such as "Apply for vacation on next Monday," integration with a timekeeping system and processing the application are required. In such cases, an AI agent becomes the option.
Note that RAG may also be used within an AI agent to retrieve information. The two are not necessarily separate technologies.
Summary
There are many specialized terms related to AI and generative AI. It is important to understand the roles of each technology and how they relate to one another.
In particular, when studying generative AI, terms such as foundation model, LLM, prompt, token, inference, RAG, Embedding, fine-tuning, and AI agent frequently appear.
Furthermore, understanding the differences between terms like learning and inference, RAG and fine-tuning, RAG and AI agent will be helpful when reading technical documents or system diagrams.
You don't need to memorize all the terms from the beginning. It is better to confirm the terms as needed when investigating or using AI technology and gradually understand their relationships.
Reference materials
Go to list of comments
Go to list of comments
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
