From 6168332864f24353714cc7ddbcbc5de660015c56 Mon Sep 17 00:00:00 2001 From: Dana Breseman Date: Mon, 1 Jun 2026 18:03:55 +0200 Subject: [PATCH 1/4] Add glossary --- .../marketplace/genai/concepts/glossary.md | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 content/en/docs/marketplace/genai/concepts/glossary.md diff --git a/content/en/docs/marketplace/genai/concepts/glossary.md b/content/en/docs/marketplace/genai/concepts/glossary.md new file mode 100644 index 00000000000..dd0aca11da4 --- /dev/null +++ b/content/en/docs/marketplace/genai/concepts/glossary.md @@ -0,0 +1,87 @@ +--- +title: "Glossary" +url: /appstore/modules/genai/glossary/ +linktitle: "Glossary" +weight: 5 +description: "Quick reference for key agentic and generative AI terms used in Mendix documentation." +--- + +## Introduction + +This glossary provides brief definitions of key agentic and generative AI terms used in the Mendix documentation. + +## Agent {#agent} + +An AI system that combines an LLM with a reasoning loop and can be extended with memory, tools, skills, and the ability to call and execute functions. It can plan, evaluate results, and iterate toward a goal. For more information, see [GenAI Agents](/appstore/modules/genai/agents/). + +## Agent Orchestration {#agent-orchestration} + +The coordination layer—often built within an app or workflow—that manages how agents work together: which agent takes responsibility, what context is shared, and how handoffs, retries, failures, and recovery are handled. + +## Agentic {#agentic} + +Describes a system, workflow, or behavior that operates with some degree of intelligence, autonomy, or adaptive decision-making, even when not built as a standalone agent. + +## Agentic Workflow {#agentic-workflow} + +A workflow pattern where specific steps are handled through agentic decision-making instead of fixed logic. The workflow keeps the overall structure and control; agentic components handle steps that require reasoning, interpretation, or adaptive action. + +## Embeddings {#embeddings} + +Mathematical representations of text as numeric vectors. Embeddings models convert strings into vectors of fixed dimension, where conceptually similar strings result in similar vectors. This enables semantic search based on meaning rather than exact character matches. Embeddings are typically stored in a [vector database](#vector-database) and are a core component of [RAG](#retrieval-augmented-generation). + +## Generative AI {#generative-ai} + +A category of artificial intelligence technology that can generate new content such as text, images, code, or other outputs based on learned patterns from training data. Generative AI can be used to accelerate business processes, provide user-friendly interactions, and enhance apps with features such as chatbots, content generation, text analysis, and language translation. + +## Hallucination {#hallucination} + +When an LLM generates incorrect, nonsensical, or fabricated information that is not grounded in its training data or the provided context. Hallucinations occur when models fill gaps in knowledge with plausible-sounding but inaccurate content. For example, an LLM might confidently state that a fictional person won an award that never existed, or cite nonexistent research papers. + +## Human in the Loop {#human-in-the-loop} + +A design pattern where an agent pauses at defined points to request human input—such as approval, correction, or a decision—before continuing. The human is an active part of the agent’s execution, not just a monitor of it. + +## Knowledge Base {#knowledge-base} + +A storage system for discrete pieces of information that can be retrieved and used to augment prompts. Combining a knowledge base with [embeddings](#embeddings) (vector representations of the data) creates a [vector database](#vector-database) that supports semantic similarity searches. Knowledge bases are essential for [RAG](#retrieval-augmented-generation) patterns. In Mendix, the [PgVector Knowledge Base](/appstore/modules/genai/pgvector/) module provides this functionality. + +## Large Language Model (LLM) {#large-language-model} + +An advanced neural network trained on large amounts of text that can understand input and generate responses. LLMs can perform tasks such as text generation, answering questions, summarization, and translation. Mendix connectors support LLMs from providers including OpenAI, Amazon Bedrock, and Mendix Cloud GenAI. For details on supported models, see [Available Models](/appstore/modules/genai#models). + +## Model Context Protocol (MCP) {#model-context-protocol} + +An open protocol that standardizes how large language models can autonomously connect to applications. MCP enables apps to expose tools and prompts to external clients, and consume tools and prompts from external servers. Mendix provides an MCP Server module to build an MCP server from a Mendix app, enabling developers to expose tools and prompts to external MCP clients, as well as an MCP Client module that enables your app to connect to MCP servers, allowing it to discover and use tools and prompts. For more information, see [Model Context Protocol](/appstore/modules/genai/mcp/). + +## Prompt Engineering {#prompt-engineering} + +The practice of structuring instructions to guide generative AI models in producing desired outcomes. Prompt engineering involves designing the input text sent to the LLM, typically through [system prompts](#system-prompt) and [user prompts](#user-prompt). This includes crafting instructions on what the model should do, providing context and information needed to follow those instructions, structuring input data, and specifying the requested output format. The quality of prompts directly influences the quality of AI responses. For more information, see [Prompt Engineering](/appstore/modules/genai/prompt-engineering/). + +## Retrieval Augmented Generation (RAG) {#retrieval-augmented-generation} + +A pattern that combines [embeddings](#embeddings)-based knowledge retrieval with text generation. RAG retrieves relevant information from a specified [knowledge base](#knowledge-base) (typically a [vector database](#vector-database)) based on the user's input, augments the prompt with this retrieved data, and then generates a response grounded in that specific information. This allows models to answer questions about private or domain-specific data. For example, when a user asks "What is our refund policy?", RAG retrieves relevant policy documents from the knowledge base, adds them to the prompt, and generates an accurate answer based on the actual policies. + +## System Prompt {#system-prompt} + +Instructions that define the model's behavior, role, and constraints. System prompts establish how the LLM should respond and what personality or expertise it should adopt. These are typically set by developers and stay the same across interactions. For example, "You are a helpful customer service assistant for an e-commerce platform. Always be polite, concise, and follow company policies when answering questions." + +## Token {#token} + +The basic unit of text that LLMs process. Models break down text into tokens, which can be words, parts of words, or individual characters depending on the model's tokenization method. For example, "agentic workflow" might be broken into tokens like `["agent", "ic", " work", "flow"]`. + +## Tool Calling {#tool-calling} + +A capability that allows LLMs to request execution of specific functions or tools to gather additional information or perform actions. The model returns a structured request indicating which function to call and with what parameters, which the app then executes and returns results to the model. Also known as tool use or function calling. Tool calling enables agent patterns like ReAct (Reasoning + Acting), where agents iteratively reason about what to do and then call tools to take action. For more information, see [Tool Calling](/appstore/modules/genai/function-calling/). + +## Trace {#trace} + +A trace is a structured record of execution across a system or workflow. In the context of an agent, it captures the sequence of inputs, reasoning steps, tool calls, intermediate actions, and outputs that led to a result. + +## User Prompt {#user-prompt} + +The input text provided by an end user or app to an LLM. User prompts contain the specific question, request, or data that the model should process. These vary with each interaction based on what the user needs. For example, "What is your refund policy?" or "Summarize this customer feedback: [feedback text]." User prompts work in combination with [system prompts](#system-prompt) to produce responses. + +## Vector Database {#vector-database} + +A specialized database designed to store and query [embeddings](#embeddings) vectors. Vector databases support similarity searches using mathematical techniques (such as measuring vector similarity) to find the most semantically similar items to a query. This capability is essential for [RAG](#retrieval-augmented-generation) patterns. In Mendix, PostgreSQL with the pgvector extension serves as a vector database. For more information, see [PgVector Knowledge Base](/appstore/modules/genai/pgvector/). From 5e7f2a9f7b3e987106989f0867ba65966b4eddcb Mon Sep 17 00:00:00 2001 From: Dana Breseman Date: Tue, 2 Jun 2026 09:39:27 +0200 Subject: [PATCH 2/4] Add more Mendix context to glossary --- .../marketplace/genai/concepts/glossary.md | 24 ++++++++++++++----- .../reference-guide/conversational-ui.md | 4 ++-- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/content/en/docs/marketplace/genai/concepts/glossary.md b/content/en/docs/marketplace/genai/concepts/glossary.md index dd0aca11da4..92845f08059 100644 --- a/content/en/docs/marketplace/genai/concepts/glossary.md +++ b/content/en/docs/marketplace/genai/concepts/glossary.md @@ -12,7 +12,9 @@ This glossary provides brief definitions of key agentic and generative AI terms ## Agent {#agent} -An AI system that combines an LLM with a reasoning loop and can be extended with memory, tools, skills, and the ability to call and execute functions. It can plan, evaluate results, and iterate toward a goal. For more information, see [GenAI Agents](/appstore/modules/genai/agents/). +An AI system that combines an LLM with a reasoning loop and can be extended with memory, tools, skills, and the ability to call and execute functions. It can plan, evaluate results, and iterate toward a goal. + +In Mendix, you can build agents using Agents Kit, a collection of starter apps, connectors, and modules that support implementations from simple text generation to complex multi-step agentic workflows. For more information, see [GenAI Agents](/appstore/modules/genai/agents/). ## Agent Orchestration {#agent-orchestration} @@ -36,23 +38,31 @@ A category of artificial intelligence technology that can generate new content s ## Hallucination {#hallucination} -When an LLM generates incorrect, nonsensical, or fabricated information that is not grounded in its training data or the provided context. Hallucinations occur when models fill gaps in knowledge with plausible-sounding but inaccurate content. For example, an LLM might confidently state that a fictional person won an award that never existed, or cite nonexistent research papers. +When an LLM generates incorrect, nonsensical, or fabricated information that is not grounded in its training data or the provided context. Hallucinations occur when models fill gaps in knowledge with plausible-sounding but inaccurate content. For example, an LLM might confidently state that a fictional person won an award that never existed, or cite nonexistent research papers. To reduce hallucinations, techniques like [RAG](#retrieval-augmented-generation) ground responses in verified data, and patterns like [human in the loop](#human-in-the-loop) add validation steps for critical decisions. ## Human in the Loop {#human-in-the-loop} A design pattern where an agent pauses at defined points to request human input—such as approval, correction, or a decision—before continuing. The human is an active part of the agent’s execution, not just a monitor of it. +In Mendix, this is implemented through user access approval settings on [tools](#tool-calling), which control when tools get executed and whether they are visible to the user. For example, a tool that deletes records might require explicit user confirmation before execution. The ConversationalUI module supports human-in-the-loop interactions out of the box. For implementation details, see [Human in the Loop](/appstore/modules/genai/conversational-ui/#human-in-the-loop). + ## Knowledge Base {#knowledge-base} -A storage system for discrete pieces of information that can be retrieved and used to augment prompts. Combining a knowledge base with [embeddings](#embeddings) (vector representations of the data) creates a [vector database](#vector-database) that supports semantic similarity searches. Knowledge bases are essential for [RAG](#retrieval-augmented-generation) patterns. In Mendix, the [PgVector Knowledge Base](/appstore/modules/genai/pgvector/) module provides this functionality. +A storage system for discrete pieces of information that can be retrieved and used to augment prompts. Combining a knowledge base with [embeddings](#embeddings) (vector representations of the data) creates a [vector database](#vector-database) that supports semantic similarity searches. Knowledge bases are essential for [RAG](#retrieval-augmented-generation) patterns. + +In Mendix, the [PgVector Knowledge Base](/appstore/modules/genai/pgvector/) module provides this functionality. ## Large Language Model (LLM) {#large-language-model} -An advanced neural network trained on large amounts of text that can understand input and generate responses. LLMs can perform tasks such as text generation, answering questions, summarization, and translation. Mendix connectors support LLMs from providers including OpenAI, Amazon Bedrock, and Mendix Cloud GenAI. For details on supported models, see [Available Models](/appstore/modules/genai#models). +An advanced neural network trained on large amounts of text that can understand input and generate responses. LLMs can perform tasks such as text generation, answering questions, summarization, and translation. + +Mendix connectors support LLMs from providers including OpenAI, Amazon Bedrock, and Mendix Cloud GenAI. For details on supported models, see [Available Models](/appstore/modules/genai#models). ## Model Context Protocol (MCP) {#model-context-protocol} -An open protocol that standardizes how large language models can autonomously connect to applications. MCP enables apps to expose tools and prompts to external clients, and consume tools and prompts from external servers. Mendix provides an MCP Server module to build an MCP server from a Mendix app, enabling developers to expose tools and prompts to external MCP clients, as well as an MCP Client module that enables your app to connect to MCP servers, allowing it to discover and use tools and prompts. For more information, see [Model Context Protocol](/appstore/modules/genai/mcp/). +An open protocol that standardizes how large language models can autonomously connect to applications. MCP enables apps to expose tools and prompts to external clients, and consume tools and prompts from external servers. + +Mendix provides an MCP Server module to build an MCP server from a Mendix app, enabling developers to expose tools and prompts to external MCP clients, as well as an MCP Client module that enables your app to connect to MCP servers, allowing it to discover and use tools and prompts. For more information, see [Model Context Protocol](/appstore/modules/genai/mcp/). ## Prompt Engineering {#prompt-engineering} @@ -84,4 +94,6 @@ The input text provided by an end user or app to an LLM. User prompts contain th ## Vector Database {#vector-database} -A specialized database designed to store and query [embeddings](#embeddings) vectors. Vector databases support similarity searches using mathematical techniques (such as measuring vector similarity) to find the most semantically similar items to a query. This capability is essential for [RAG](#retrieval-augmented-generation) patterns. In Mendix, PostgreSQL with the pgvector extension serves as a vector database. For more information, see [PgVector Knowledge Base](/appstore/modules/genai/pgvector/). +A specialized database designed to store and query [embeddings](#embeddings) vectors. Vector databases support similarity searches using mathematical techniques (such as measuring vector similarity) to find the most semantically similar items to a query. This capability is essential for [RAG](#retrieval-augmented-generation) patterns. + +In Mendix, PostgreSQL with the pgvector extension serves as a vector database. For more information, see [PgVector Knowledge Base](/appstore/modules/genai/pgvector/). diff --git a/content/en/docs/marketplace/genai/reference-guide/conversational-ui.md b/content/en/docs/marketplace/genai/reference-guide/conversational-ui.md index 7092fa51221..b78c12dc95d 100644 --- a/content/en/docs/marketplace/genai/reference-guide/conversational-ui.md +++ b/content/en/docs/marketplace/genai/reference-guide/conversational-ui.md @@ -221,9 +221,9 @@ This changes how action microflows are used, because they are called each time a If no [user-visibility](/appstore/modules/genai/genai-for-mx/commons/#enum-useraccessapproval) is configured for tools and you would like not to store tool messages (and therefore retain the behavior from versions before 6.0.0), you can change the boolean `SaveToolCallHistory` to *false* on the [Request](/appstore/modules/genai/genai-for-mx/commons/#request). Note that [knowledge base retrievals](/appstore/modules/genai/genai-for-mx/commons/#add-knowledge-base-to-request) are set to `HiddenForUser` by default. -### Human in the loop {#human-in-the-loop} +### Human in the Loop {#human-in-the-loop} -When using the [Function Calling](/appstore/modules/genai/function-calling/) pattern by adding tools to the request, you can control when those tools get executed and if they are visible to the user by setting [user access approval](/appstore/modules/genai/genai-for-mx/commons/#enum-useraccessapproval) per tool. Human in the loop describes a pattern where the AI can perform powerful tasks, but still requires humans to take certain decisions and oversee the agent's behavior. When using the ConversationalUI module, its basic action microflow pattern to execute requests with history and UI snippets to display the chat, human in the loop works out of the box. Note that action microflows are called until there is a final assistant's response as described in the [Using Tool or Knowledge Base Calling](#action-microflow-tool-calling) section above, even if all tools are executed without user interaction. +When using the [Function Calling](/appstore/modules/genai/function-calling/) pattern by adding tools to the request, you can control when those tools get executed and if they are visible to the user by setting [user access approval](/appstore/modules/genai/genai-for-mx/commons/#enum-useraccessapproval) per tool. [Human in the loop](/appstore/modules/genai/glossary/#human-in-the-loop) describes a pattern where the AI can perform powerful tasks, but still requires humans to take certain decisions and oversee the agent's behavior. When using the ConversationalUI module, its basic action microflow pattern to execute requests with history and UI snippets to display the chat, human in the loop works out of the box. Note that action microflows are called until there is a final assistant's response as described in the [Using Tool or Knowledge Base Calling](#action-microflow-tool-calling) section above, even if all tools are executed without user interaction. If you are not using the ConversationalUI module for [chat with history executions](/appstore/modules/genai/genai-for-mx/commons/#chat-completions-with-history) or your use case does not contain a chat history, but is [task-based (without history)](/appstore/modules/genai/genai-for-mx/commons/#chat-completions-without-history), you need to implement the following actions: From 998a71b144cfb6f40ae53ea8ac74113829755db4 Mon Sep 17 00:00:00 2001 From: Dana Breseman Date: Tue, 2 Jun 2026 09:44:38 +0200 Subject: [PATCH 3/4] Mention showcase app --- content/en/docs/marketplace/genai/concepts/glossary.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/marketplace/genai/concepts/glossary.md b/content/en/docs/marketplace/genai/concepts/glossary.md index 92845f08059..446c0030da8 100644 --- a/content/en/docs/marketplace/genai/concepts/glossary.md +++ b/content/en/docs/marketplace/genai/concepts/glossary.md @@ -8,7 +8,7 @@ description: "Quick reference for key agentic and generative AI terms used in Me ## Introduction -This glossary provides brief definitions of key agentic and generative AI terms used in the Mendix documentation. +This glossary provides brief definitions of key agentic and generative AI terms used in the Mendix documentation. To explore working implementations of these concepts, see the [GenAI Showcase App](https://marketplace.mendix.com/link/component/220475), which demonstrates multi-agent patterns, RAG, tool calling, MCP integration, and more. ## Agent {#agent} From 7b545181e68d560d3810c4d39692fbe6c9e0e2d1 Mon Sep 17 00:00:00 2001 From: Dana Breseman Date: Tue, 2 Jun 2026 14:44:02 +0200 Subject: [PATCH 4/4] Simplify --- .../marketplace/genai/concepts/glossary.md | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/content/en/docs/marketplace/genai/concepts/glossary.md b/content/en/docs/marketplace/genai/concepts/glossary.md index 446c0030da8..d04a0bca0d0 100644 --- a/content/en/docs/marketplace/genai/concepts/glossary.md +++ b/content/en/docs/marketplace/genai/concepts/glossary.md @@ -8,7 +8,7 @@ description: "Quick reference for key agentic and generative AI terms used in Me ## Introduction -This glossary provides brief definitions of key agentic and generative AI terms used in the Mendix documentation. To explore working implementations of these concepts, see the [GenAI Showcase App](https://marketplace.mendix.com/link/component/220475), which demonstrates multi-agent patterns, RAG, tool calling, MCP integration, and more. +This glossary provides brief definitions of key agentic and generative AI terms used in the Mendix documentation. To explore working implementations of these concepts, see the [GenAI Showcase App](https://marketplace.mendix.com/link/component/220475), which demonstrates RAG, tool calling, MCP integration, and more. ## Agent {#agent} @@ -30,47 +30,47 @@ A workflow pattern where specific steps are handled through agentic decision-mak ## Embeddings {#embeddings} -Mathematical representations of text as numeric vectors. Embeddings models convert strings into vectors of fixed dimension, where conceptually similar strings result in similar vectors. This enables semantic search based on meaning rather than exact character matches. Embeddings are typically stored in a [vector database](#vector-database) and are a core component of [RAG](#retrieval-augmented-generation). +Mathematical representations of text as numeric vectors, where conceptually similar text strings result in similar vectors. This enables semantic search based on meaning rather than exact character matches. Embeddings are typically stored in a [vector database](#vector-database) and are a core component of [RAG](#retrieval-augmented-generation). -## Generative AI {#generative-ai} +## Generative AI (GenAI) {#generative-ai} A category of artificial intelligence technology that can generate new content such as text, images, code, or other outputs based on learned patterns from training data. Generative AI can be used to accelerate business processes, provide user-friendly interactions, and enhance apps with features such as chatbots, content generation, text analysis, and language translation. ## Hallucination {#hallucination} -When an LLM generates incorrect, nonsensical, or fabricated information that is not grounded in its training data or the provided context. Hallucinations occur when models fill gaps in knowledge with plausible-sounding but inaccurate content. For example, an LLM might confidently state that a fictional person won an award that never existed, or cite nonexistent research papers. To reduce hallucinations, techniques like [RAG](#retrieval-augmented-generation) ground responses in verified data, and patterns like [human in the loop](#human-in-the-loop) add validation steps for critical decisions. +When an LLM generates incorrect, nonsensical, or fabricated information that is not grounded in its training data or the provided context. For example, an LLM might confidently state that a fictional person won an award that never existed, or cite nonexistent research papers. To reduce hallucinations, techniques like [RAG](#retrieval-augmented-generation) ground responses in verified data, and patterns like [human in the loop](#human-in-the-loop) add validation steps for critical decisions. ## Human in the Loop {#human-in-the-loop} -A design pattern where an agent pauses at defined points to request human input—such as approval, correction, or a decision—before continuing. The human is an active part of the agent’s execution, not just a monitor of it. +A design pattern where an agent pauses at defined points to request human input—such as approval, correction, or a decision—before continuing. The human actively participates in the agent’s execution rather than passively observing. In Mendix, this is implemented through user access approval settings on [tools](#tool-calling), which control when tools get executed and whether they are visible to the user. For example, a tool that deletes records might require explicit user confirmation before execution. The ConversationalUI module supports human-in-the-loop interactions out of the box. For implementation details, see [Human in the Loop](/appstore/modules/genai/conversational-ui/#human-in-the-loop). ## Knowledge Base {#knowledge-base} -A storage system for discrete pieces of information that can be retrieved and used to augment prompts. Combining a knowledge base with [embeddings](#embeddings) (vector representations of the data) creates a [vector database](#vector-database) that supports semantic similarity searches. Knowledge bases are essential for [RAG](#retrieval-augmented-generation) patterns. +A storage system for discrete pieces of information that can be retrieved and used to augment prompts. Combining a knowledge base with [embeddings](#embeddings) (vector representations of the data) creates a [vector database](#vector-database) that supports semantic similarity searches. Knowledge bases are essential for [RAG](#retrieval-augmented-generation) patterns and semantic search. -In Mendix, the [PgVector Knowledge Base](/appstore/modules/genai/pgvector/) module provides this functionality. +Mendix supports managed cloud knowledge base services such as [Mendix Cloud GenAI Knowledge Base Resource Packs](/appstore/modules/genai/mx-cloud-genai/resource-packs/) and self-managed implementations using the [PgVector Knowledge Base module](/appstore/modules/genai/pgvector/). ## Large Language Model (LLM) {#large-language-model} -An advanced neural network trained on large amounts of text that can understand input and generate responses. LLMs can perform tasks such as text generation, answering questions, summarization, and translation. +A neural network trained on large amounts of text that can understand input and generate responses. LLMs can perform tasks such as text generation, answering questions, summarization, and translation. Mendix connectors support LLMs from providers including OpenAI, Amazon Bedrock, and Mendix Cloud GenAI. For details on supported models, see [Available Models](/appstore/modules/genai#models). ## Model Context Protocol (MCP) {#model-context-protocol} -An open protocol that standardizes how large language models can autonomously connect to applications. MCP enables apps to expose tools and prompts to external clients, and consume tools and prompts from external servers. +An open protocol that standardizes how large language models can connect to applications. MCP enables apps to expose tools and prompts to external clients, and consume tools and prompts from external servers. -Mendix provides an MCP Server module to build an MCP server from a Mendix app, enabling developers to expose tools and prompts to external MCP clients, as well as an MCP Client module that enables your app to connect to MCP servers, allowing it to discover and use tools and prompts. For more information, see [Model Context Protocol](/appstore/modules/genai/mcp/). +Mendix provides an MCP Server module to build an MCP server from a Mendix app, enabling developers to expose tools and prompts to external MCP clients. Mendix also provides an MCP Client module that enables your app to connect to MCP servers and discover and use their tools and prompts. For more information, see [Model Context Protocol](/appstore/modules/genai/mcp/). ## Prompt Engineering {#prompt-engineering} -The practice of structuring instructions to guide generative AI models in producing desired outcomes. Prompt engineering involves designing the input text sent to the LLM, typically through [system prompts](#system-prompt) and [user prompts](#user-prompt). This includes crafting instructions on what the model should do, providing context and information needed to follow those instructions, structuring input data, and specifying the requested output format. The quality of prompts directly influences the quality of AI responses. For more information, see [Prompt Engineering](/appstore/modules/genai/prompt-engineering/). +The practice of structuring instructions to guide generative AI models to produce desired outcomes. Prompt engineering involves designing the input text sent to the LLM, typically through [system prompts](#system-prompt) and [user prompts](#user-prompt). This includes crafting instructions on what the model should do, providing context and information needed to follow those instructions, structuring input data, and specifying the requested output format. The quality of prompts directly influences the quality of AI responses. For more information, see [Prompt Engineering](/appstore/modules/genai/prompt-engineering/). ## Retrieval Augmented Generation (RAG) {#retrieval-augmented-generation} -A pattern that combines [embeddings](#embeddings)-based knowledge retrieval with text generation. RAG retrieves relevant information from a specified [knowledge base](#knowledge-base) (typically a [vector database](#vector-database)) based on the user's input, augments the prompt with this retrieved data, and then generates a response grounded in that specific information. This allows models to answer questions about private or domain-specific data. For example, when a user asks "What is our refund policy?", RAG retrieves relevant policy documents from the knowledge base, adds them to the prompt, and generates an accurate answer based on the actual policies. +A pattern that combines [embeddings](#embeddings)-based knowledge retrieval with text generation. RAG retrieves relevant information from a [knowledge base](#knowledge-base), augments the prompt with that information, and generates a response grounded in the retrieved data. This allows models to answer questions about private or domain-specific data. For example, when a user asks "What is our refund policy?", RAG retrieves relevant policy documents from the knowledge base, adds them to the prompt, and generates an accurate answer based on the actual policies. ## System Prompt {#system-prompt} @@ -82,18 +82,20 @@ The basic unit of text that LLMs process. Models break down text into tokens, wh ## Tool Calling {#tool-calling} -A capability that allows LLMs to request execution of specific functions or tools to gather additional information or perform actions. The model returns a structured request indicating which function to call and with what parameters, which the app then executes and returns results to the model. Also known as tool use or function calling. Tool calling enables agent patterns like ReAct (Reasoning + Acting), where agents iteratively reason about what to do and then call tools to take action. For more information, see [Tool Calling](/appstore/modules/genai/function-calling/). +Also known as tool use or function calling, a capability that allows LLMs to call specific functions or tools to gather additional information or perform actions. The model returns a structured request indicating which function to call and with what parameters, which the app then executes and returns results to the model. Tool calling enables agent patterns like ReAct (Reasoning + Acting), where agents iteratively reason about what to do and then call tools to take action. For more information, see [Tool Calling](/appstore/modules/genai/function-calling/). ## Trace {#trace} A trace is a structured record of execution across a system or workflow. In the context of an agent, it captures the sequence of inputs, reasoning steps, tool calls, intermediate actions, and outputs that led to a result. +In Mendix, tracing is supported by the [GenAI Commons](/appstore/modules/genai/genai-for-mx/commons/#traceability) module to help debug and monitor agent behavior. + ## User Prompt {#user-prompt} -The input text provided by an end user or app to an LLM. User prompts contain the specific question, request, or data that the model should process. These vary with each interaction based on what the user needs. For example, "What is your refund policy?" or "Summarize this customer feedback: [feedback text]." User prompts work in combination with [system prompts](#system-prompt) to produce responses. +The input text provided by an end user or app to an LLM. User prompts contain the specific question, request, or data that the model should process. These vary with each interaction based on what the user needs. For example, "What is your refund policy?" or "Summarize this customer feedback." User prompts work in combination with [system prompts](#system-prompt) to produce responses. ## Vector Database {#vector-database} -A specialized database designed to store and query [embeddings](#embeddings) vectors. Vector databases support similarity searches using mathematical techniques (such as measuring vector similarity) to find the most semantically similar items to a query. This capability is essential for [RAG](#retrieval-augmented-generation) patterns. +A specialized database designed to store and query [embeddings](#embeddings). Vector databases support similarity searches using mathematical techniques to find the most semantically similar items to a query. This capability is essential for [RAG](#retrieval-augmented-generation) patterns. In Mendix, PostgreSQL with the pgvector extension serves as a vector database. For more information, see [PgVector Knowledge Base](/appstore/modules/genai/pgvector/).