A system and method for a dynamic large language model (LLM) agent

The dynamic LLM system addresses the limitations of current LLMs by changing its properties to enhance contextual understanding and tool utilization, leading to improved response accuracy and reduced hallucinations in long conversations and complex tasks.

WO2025046584A1PCT designated stage expired Publication Date: 2025-03-06OPTOMECHANIC CUBE LTD

Patent Information

Application Number
PCT/IL2024/050872
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-01
Filing Date
2024-08-29
Publication Date
2025-03-06

AI Technical Summary

Technical Problem

Current Large Language Models (LLMs) face limitations in their ability to handle long conversations due to context window size constraints and struggle with accurate mathematical calculations and tool usage, leading to issues like hallucinations.

Method used

A dynamic Large Language Model (LLM) system that can change its properties, such as tool access and next-token sampling methods, based on user queries to enhance contextual understanding and tool utilization.

Benefits of technology

The dynamic LLM system improves the consistency and accuracy of responses in long conversations and complex tasks, reduces the risk of hallucinations, and enables more effective tool usage and mathematical calculations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure IMGF000030_0001
    Figure IMGF000030_0001
  • Figure IMGF000036_0001
    Figure IMGF000036_0001
  • Figure IMGF000036_0002
    Figure IMGF000036_0002
Patent Text Reader

Abstract

A dynamic Large Language Model (LLM) is disclosed, comprising an LLM having one or more properties, capable of: (a) receiving a query from a user; (b) changing, based on the query, at least one property of the properties; and (c) providing a response to the query utilizing the LLM with the at least one changed property. Further disclosures include a tool-informed Large Language Model, and a system and method thereof.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] A SYSTEM AND METHOD FOR A DYNAMIC LARGE LANGUAGE MODEL (LLM) AGENT

[0002] TECHNICAL FIELD

[0003] The invention relates to a system and method for a dynamic Large Language Model (LLM) agent.

[0004] BACKGROUND

[0005] Large Language Models (LLMs) are a type of artificial intelligence model that is capable of understanding and generating human language. They are trained on vast amounts of text data, which enables them to perform a wide range of natural language processing tasks. LLMs can leverage numerous deep learning architectures, the most significant ones being variations of the transformer architecture. The most famous transformer model is the known Generative Pre-trained Transformer (GPT) 3 model, which was introduced by OpenAI in May 2020, but it’s not the only one. Since then, many models and tools have been built on them, and they are flourishing in every industry. Almost immediately, these tools have gained immense popularity, transforming how we work, collaborate, and interact with technology.

[0006] One significant constraint of current LLM-based solutions is the limitation imposed by the context window size. The context window refers to the number of tokens (the base units of textual information) that are considered when generating responses. A larger context window allows the model to capture more information from the input, enhancing contextual understanding. However, if the interaction exceeds the context window, the model loses access to the earliest parts of the conversation, impacting its consistency in handling long conversations or complex tasks.

[0007] In addition, current LLM-based solutions face challenges in performing accurate mathematical calculations. As these models are primarily designed for language generation, they may struggle with mathematical problem-solving. LLMs often rely on pattern matching based on statistical patterns learned from their training data. The focus on language generation, coupled with the need for precise solutions in mathematics, poses difficulties for these models. It's important to understand that LLMs don't "perform" mathematical calculations in the conventional sense but rather match patterns, which leads to incorrect results more often than not.

[0008] The inability to perform accurate mathematical calculations is one side of a broader noteworthy aspect that is the phenomena of hallucinations in LLMs. Hallucinations occur when the model generates text that is incorrect, nonsensical, or not grounded in reality, while confidently presenting it as true. This can be attributed to the model's limited contextual understanding, reliance on statistical patterns from training data, and data compression during training.

[0009] Current LLMs lack the capability required to change themselves to dynamically adapt to these kinds of problems. Current LLM capabilities remained limited based on the capabilities of the model, the context window size, and attention capabilities. For example, the current state-of-the-art for LLM tool usage is GPT-4-0613, the most capable model of OpenAI that’s available for research and commercial use. Unlike other models that show the ability to use tools without specific training for it, like Llama-2, GPT-4- 0613 was trained to receive information about a function and to output a function call in a JSON format when and if it is required in the conversation with the user. Given that GPT-4 is the most capable model to begin with, outperforming other models in most benchmarks and, in some cases is even being used as a judge in model capabilities comparison, it is safe to deduce that GPT-4-0613 is the current state-of-the-art in the context of LLM tool usage capabilities. GPT-4-0613 shows the ability to successfully have no more than a few functions within its toolbox, and it is unable to use and chain successfully more than that. This limitation stands in the way of creating stronger, more capable, and versatile agents that require access, use, and chain larger amounts of tools. Other models like Gorilla solved this problem with information retrieval using embeddings, and a method that can also be built using environments like “Langchain”. However, as effective as a vector database might be in expanding the number of tools that an agent can have single-use access to, it does not provide a reliable and robust solution in cases where a long function chaining is required for complex operations. There is thus a need in the art for a new method and system for a dynamic LLM that can change itself by changing its own properties as needed.

[0010] Such a dynamic LLM can be used in the context of an LLM agent. An LLM agent can be described as a system that can use an LLM to reason through a problem, create a plan to solve the problem, utilize one or more tools, and execute the plan. Current LLM agents are limited in their ability of proper tool usage. The two chief limitations are: First, every additional tool directly reduces the possible length of the conversation with the user that the model can access. So, if the agent has a lot of tools, it has less and less room to engage in a conversation with the user and use these tools. More importantly, the model’s overall performance decreases as the context size increases, with information and instructions in the middle of the context tend to be lost as context size increases. So, not only does every additional tool reduce the length of the conversation with the user, but it also increases the probability of mistakes and misuse of the tools. One common approach to mitigate these issues is to use Retriever Augmented Generation (RAG) for the tools. In this approach, a retriever module is leveraged to retrieve the tools with the highest semantic similarity to the user request. The LLM agent then uses these tools according to the conversation. The RAG method for tool retrieval has been proven to be highly effective in enhancing the capabilities of agents. However, in the case of actions chaining, where the output of one tool is used as the input of another, RAG is not a sufficient method. Often, the tools that are required in the middle phases of the operation are not semantically close. In addition, current LLM agents cannot dynamically change their next-token sampling methods and / or their base model.

[0011] There is thus a need in the art for a new method and system for a dynamic LLM agent that can actively load and un-load tools as it prepares a response to the user’s query and / or dynamically change the next-token sampling methods and / or the base model.

[0012] GENERAL DESCRIPTION

[0013] In accordance with a first aspect of the presently disclosed subject matter, there is provided a system of a dynamic Large Language Model (LLM), comprising an LLM having one or more properties, capable of: (a) receiving a query from a user; (b) changing, based on the query, at least one property of the properties; and (c) providing a response to the query utilizing the LLM with the at least one changed property.

[0014] In some cases, a tool-informed Large Language Model (LLM), comprising the dynamic LLM, capable of receiving a query from a user and providing a response to the query, wherein the at least one property is associated with one or more tools available to the dynamic LLM and wherein: the dynamic LLM is: (a) informed of the one or more tools, (b) instructed to request a loading of a given tool of the tools when encountering a query the LLM can provide a first response to with the given tool, wherein the first response is better than a second response capable of being provided to the query by the LLM without the given tool, and (c) instructed to request an unloading of a given tool of the tools when encountering a query the LLM can provide the response to without the given tool, giving rise to the tool-informed LLM.

[0015] In some cases, the tool-informed LLM is informed of the one or more tools by providing the LLM with tool descriptions associated with the one or more tools.

[0016] In some cases, a system of a Large Language Model (LLM) agent with dynamic tools, the system comprising: (a) an LLM, capable of receiving a query from a user of the system and providing a response to the query, (b) a context window, comprising past queries provided by the user to the system and additional information available to the LLM, wherein the LLM provides the response based also on the context window, (c) one or more tools, each tool is associated with: (i) a tool description, describing a purpose of the tool, and (ii) a tool function information, enabling the LLM to solve a problem associated with the tool utilizing the tool function information, and (d) a processing circuitry configured to: (A) obtain the tool-informed LLM, utilized to be the LLM of the system wherein the tool-informed LLM is provided with the tool descriptions associated with the one or more tools; (B) receive a query from the user and provide the query to the tool-informed LLM; (C) upon the tool-informed LLM requesting the loading of an additional given tool of the tools in order to be able to provide the response to the query, add the tool function information associated with the additional given tool to the context window; (D) upon the tool-informed LLM requesting the unloading of an additional given tool of the tools, as the tool-informed LLM can provide the response to the query without the additional given tool, remove the tool function information associated with the additional given tool from the context window; (E) repeat (C)-(D) until the tool-informed LLM can provide the response to the query; and (F) deliver the response to the query provided by the tool-informed LLM to the user of the system.

[0017] In some cases, the tool function information can be associated with: (a) a predefined function that directly changes the LLM, or (b) predefined utility that performs actions that are external to the LLM.

[0018] In some cases, the tool-informed LLM can concurrently load up to a first threshold number of tools.

[0019] In some cases, the query is associated with optical design and wherein at least one tool of the one or more tools is an optical design tool. In some cases, the query is associated with search and wherein at least one tool of the one or more tools is a search tool.

[0020] In some cases, the query is associated with an optical search and wherein at least one tool of the one or more tools is an optical search tool.

[0021] In some cases, a system of a Large Language Model (LLM) agent with dynamic tools, the system comprising: (a) an LLM, capable of receiving a query from a user of the system and providing a response to the query, (b) a context window, comprising past queries provided by the user to the system and additional information available to the LLM, wherein the LLM provides the response based also on the context window (c) one or more tools, each tool is associated with: (i) a tool description, describing a purpose of the tool, and (ii) a tool function information, enabling the LLM to solve a problem associated with the tool utilizing the tool function information, (d) a curator model, capable of: (i) receiving a request for loading of a given tool of the one or more tools and providing a list of one or more correlated tools of the tools, being tools that are associated with the given tool, and (ii) receiving a request for unloading of a given tool of the one or more tools and providing a list of one or more correlated tools of the tools, being tools that are associated with the given tool, and (e) a processing circuitry configured to: (A) obtain the tool-informed LLM, utilized to be the LLM of the system wherein the tool- informed LLM is provided with the tool descriptions associated with the one or more tools; (B) receive a query from the user and provide the query to the tool-informed LLM; (C) upon the tool-informed LLM requesting the loading of an additional given tool of the tools in order to be able to provide a response to the query, utilize the curator model to receive the list of one or more correlated tools, correlated to the additional given tool, and add the one or more tool function information associated with the one or more correlated tools to the context window; (D) upon the tool-informed LLM requesting the unloading of an additional given tool of the tools, as the tool-informed LLM can provide the response to the query without the additional given tool, utilize the curator model to receive the list of one or more correlated tools, correlated to the additional given tool, and remove the one or more tool function information associated with the one or more correlated tools from the context window; (E) repeat (C)-(D) until the tool-informed LLM can provide the response to the query; and (F) deliver the response to the query provided by the tool- informed LLM to the user of the system. In some cases, the tool function information can be associated with: (a) a predefined function that directly changes the LLM, or (b) predefined utility that performs actions that are external to the LLM.

[0022] In some cases, the tool-informed LLM can concurrently load up to a first threshold number of tools.

[0023] In some cases, the query is associated with optical design and wherein at least one tool of the one or more tools is an optical design tool.

[0024] In some cases, the query is associated with search and wherein at least one tool of the one or more tools is a search tool.

[0025] In some cases, the query is associated with an optical search and wherein at least one tool of the one or more tools is an optical search tool.

[0026] In some cases, a system of a Large Language Model (LLM) agent with dynamic tools, the system comprising: (a) an LLM, capable of receiving a query from a user of the system and providing a response to the query, (b) a context window, comprising past queries provided by the user to the system and additional information available to the LLM, wherein the LLM provides the response based also on the context window (c) one or more tools, each tool is associated with: (i) a tool description, describing a purpose of the tool, and (ii) a tool function information, enabling the LLM to solve a problem associated with the tool utilizing the tool function information, (d) a curator model, capable of: (i) receiving a request for loading of a given tool of the one or more tools and providing a list of one or more correlated tools, being tools of the tools that are associated with the given tool and a specification of one or more new correlated tools, being tools that are associated with the given tool and are not part of the one or more tools, and (ii) receiving a request for unloading of a given tool of the one or more tools and providing a list of one or more correlated tools of the tools, being tools that are associated with the given tool, (e) a tool generating model, capable of receiving a specification of one or more new tools that are not part of the one or more tools and generating the one or more new tools, and (f) a processing circuitry configured to: (A) obtain the tool-informed LLM, utilized to be the LLM of the system wherein the tool-informed LLM is provided with the tool descriptions associated with the one or more tools; (B) receive a query from the user and provide the query to the tool-informed LLM; (C) upon the tool-informed LLM requesting the loading of an additional given tool of the tools in order to be able to provide a response to the query, utilize the curator model to receive the list of the one or more correlated tools and the specification of the list of one or more new correlated tools, correlated to the additional given tool, generate one or more new tools, utilizing the tool generating model and the specification of the list of one or more new correlated tools and add the one or more tool function information associated with the one or more correlated tools and with the one or more new correlated tools to the context window; (D) upon the tool-informed LLM requesting the unloading of an additional given tool of the tools, as the tool-informed LLM can provide the response to the query without the additional given tool, utilize the curator model to receive the list of one or more correlated tools, correlated to the additional given tool, and remove the one or more tool function information associated with the one or more correlated tools from the context window; (E) repeat (C)- (D) until the tool-informed LLM can provide the response to the query; and (F) deliver the response to the query provided by the tool-informed LLM to the user of the system.

[0027] In some cases, the tool function information can be associated with: (a) a predefined function that directly changes the LLM, or (b) predefined utility that performs actions that are external to the LLM.

[0028] In some cases, the tool-informed LLM can concurrently load up to a first threshold number of tools.

[0029] In some cases, the query is associated with optical design and wherein at least one tool of the one or more tools is an optical design tool.

[0030] In some cases, the query is associated with search and wherein at least one tool of the one or more tools is a search tool.

[0031] In some cases, the query is associated with an optical search and wherein at least one tool of the one or more tools is an optical search tool.

[0032] In some cases, a Large Language Model (LLM) agent with dynamic tools, the system comprising: (a) an LLM, capable of receiving a query from a user of the system and providing a response to the query, (b) a context window, comprising past queries provided by the user to the system and additional information available to the LLM, wherein the LLM provides the response based also on the context window (c) one or more tools, each tool is associated with: (i) a tool description, describing a purpose of the tool, and (ii) a tool function information, enabling the LLM to solve a problem associated with the tool utilizing the tool function information, (d) a tool generating model, capable of receiving a specification of one or more new tools that are not part of the one or more tools and generating the one or more new tools, and (f) a processing circuitry configured to: (A) obtain the tool-informed LLM, utilized to be the LLM of the system wherein the tool-informed LLM is provided with the tool descriptions associated with the one or more tools and wherein the tool-informed LLM is further capable of requesting a specification of one or more new tools, being tools that are required to provide a response to the query and are not part of the one or more tools; (B) receive a query from the user and provide the query to the tool-informed LLM; (C) upon the tool-informed LLM requesting the loading of an additional given tool of the tools in order to be able to provide the response to the query, add the tool function information associated with the additional given tool to the context window; (D) upon the tool-informed LLM requesting the unloading of an additional given tool of the tools, as the tool-informed LLM can provide the response to the query without the additional given tool, remove the tool function information associated with the additional given tool from the context window; (E) upon the tool- informed LLM requesting a given specification of one or more new tools, generate the one or more new tools, utilizing the tool generating model and the specification and add the one or more tool function information associated with the one or more new tools to the context window; (F) repeat (C)-(E) until the tool-informed LLM can provide the response to the query; and (G) deliver the response to the query provided by the tool- informed LLM to the user of the system.

[0033] In some cases, the tool function information can be associated with: (a) a predefined function that directly changes the LLM, or (b) predefined utility that performs actions that are external to the LLM.

[0034] In some case, the tool-informed LLM can concurrently load up to a first threshold number of tools.

[0035] In some cases, the query is associated with optical design and wherein at least one tool of the one or more tools is an optical design tool.

[0036] In some cases, the query is associated with search and wherein at least one tool of the one or more tools is a search tool.

[0037] In some cases, the query is associated with an optical search and wherein at least one tool of the one or more tools is an optical search tool.

[0038] In accordance with a second aspect of the presently disclosed subject matter, there is provided a method for a dynamic Large Language Model (LLM), the method comprising: (a) receiving, by an LLM having one or more properties, a query from a user; (b) changing, by the LLM having one or more properties , based on the query, at least one property of the properties; and (c) providing, by the LLM having one or more properties, a response to the query utilizing the LLM with the at least one changed property.

[0039] In some cases, there is provided a method for a tool-informed Large Language Model (LLM), the method comprising: (a) informing the dynamic LLM, which is capable of receiving a query from a user and providing a response to the query, wherein the at least one property is associated with one or more tools available to the dynamic LLM, of the one or more tools, (b) instructing, the dynamic LLM, to request a loading of a given tool of the tools when encountering a query the LLM can provide a first response to with the given tool, wherein the first response is better than a second response capable of being provided to the query by the LLM without the given tool, and (c) instructing, the dynamic LLM, to request an unloading of a given tool of the tools when encountering a query the LLM can provide the response to without the given tool, giving rise to the tool-informed LLM.

[0040] In some cases, the LLM is informed of the one or more tools by providing the LLM with tool descriptions associated with the one or more tools.

[0041] In some cases, a method for a Large Language Model (LLM) agent with dynamic tools, the method comprising: (A) obtaining, by a processing circuitry, the tool-informed LLM of claim 30, utilized to be an LLM capable of receiving a query from a user of the system and providing a response to the query, wherein the tool-informed LLM is provided with descriptions associated with the one or more tools, each tool is associated with: (i) a tool description, describing a purpose of the tool, and (ii) a tool function information, enabling the LLM to solve a problem associated with the tool utilizing the tool function information; (B) receiving, by the processing circuitry, a query from the user and provide the query to the tool-informed LLM; (C) upon the tool-informed LLM requesting the loading of an additional given tool of the tools in order to be able to provide the response to the query, adding, by the processing circuitry, the tool function information associated with the additional given tool to a context window comprising past queries provided by the user to the system and additional information available to the tool-informed LLM, wherein the tool-informed LLM provides the response based also on the context window; (D) upon the tool-informed LLM requesting the unloading of an additional given tool of the tools, as the tool-informed LLM can provide the response to the query without the additional given tool, removing, by the processing circuitry, the tool function information associated with the additional given tool from the context window; (E) repeating (C)-(D), by the processing circuitry, until the tool-informed LLM can provide the response to the query; and (F) delivering, by the processing circuitry, the response to the query provided by the tool-informed LLM to the user of the system.

[0042] In some cases, the tool function information can be associated with: (a) a predefined function that directly changes the LLM, or (b) predefined utility that performs actions that are external to the LLM.

[0043] In some cases, the tool-informed LLM can concurrently load up to a first threshold number of tools.

[0044] In some cases, the query is associated with optical design and wherein at least one tool of the one or more tools is an optical design tool.

[0045] In some cases, the query is associated with search and wherein at least one tool of the one or more tools is a search tool.

[0046] In some cases, the query is associated with an optical search and wherein at least one tool of the one or more tools is an optical search tool.

[0047] In some cases, a method for a Large Language Model (LLM) agent with dynamic tools, the method comprising: (A) obtaining, by a processing circuitry, the tool-informed LLM, capable of receiving a query from a user of the system and providing a response to the query, wherein the tool-informed LLM is provided with tool descriptions associated with the one or more tools, each tool is associated with: (i) a tool description, describing a purpose of the tool, and (ii) a tool function information, enabling the LLM to solve a problem associated with the tool utilizing the tool function information; (B) receiving, by the processing circuitry, a query from the user and provide the query to the tool-informed LLM; (C) upon the tool-informed LLM requesting the loading of an additional given tool of the tools in order to be able to provide a response to the query, utilizing, by the processing circuitry, a curator model, capable of: (i) receiving a request for loading of a given tool of the one or more tools and providing a list of one or more correlated tools of the tools, being tools that are associated with the given tool, and (ii) receiving a request for unloading of a given tool of the one or more tools and providing a list of one or more correlated tools of the tools, being tools that are associated with the given tool, to receive the list of one or more correlated tools, correlated to the additional given tool, and add the one or more tool function information associated with the one or more correlated tools to the context window; (D) upon the tool-informed LLM requesting the unloading of an additional given tool of the tools, as the tool-informed LLM can provide the response to the query without the additional given tool, utilizing, by the processing circuitry, the curator model to receive the list of one or more correlated tools, correlated to the additional given tool, and remove the one or more tool function information associated with the one or more correlated tools from the context window; (E) repeating (C)-(D), by the processing circuitry, until the tool-informed LLM can provide the response to the query; and (F) delivering, by the processing circuitry, the response to the query provided by the tool-informed LLM to the user of the system.

[0048] In some cases, the tool function information can be associated with: (a) a predefined function that directly changes the LLM, or (b) predefined utility that performs actions that are external to the LLM.

[0049] In some cases, the tool-informed LLM can concurrently load up to a first threshold number of tools.

[0050] In some cases, the query is associated with optical design and wherein at least one tool of the one or more tools is an optical design tool.

[0051] In some cases, the query is associated with search and wherein at least one tool of the one or more tools is a search tool.

[0052] In some cases, the query is associated with an optical search and wherein at least one tool of the one or more tools is an optical search tool.

[0053] In some cases, a method for a Large Language Model (LLM) agent with dynamic tools, the method comprising: (A) obtaining, by a processing circuitry, the tool-informed LLM, capable of receiving a query from a user of the system and providing a response to the query, wherein the tool-informed LLM is provided with tool descriptions associated with the one or more tools, each tool is associated with: (i) a tool description, describing a purpose of the tool, and (ii) a tool function information, enabling the LLM to solve a problem associated with the tool utilizing the tool function information; (B) receiving, by the processing circuitry, a query from the user and provide the query to the tool-informed LLM; (C) upon the tool-informed LLM requesting the loading of an additional given tool of the tools in order to be able to provide a response to the query, utilizing, by the processing circuitry, a curator model, capable of: (i) receiving a request for loading of a given tool of the one or more tools and providing a list of one or more correlated tools, being tools of the tools that are associated with the given tool and a specification of one or more new correlated tools, being tools that are associated with the given tool and are not part of the one or more tools, and (ii) receiving a request for unloading of a given tool of the one or more tools and providing a list of one or more correlated tools of the tools, being tools that are associated with the given tool, to receive the list of the one or more correlated tools and the specification of the list of one or more new correlated tools, correlated to the additional given tool, and generating, by the processing circuitry, one or more new tools, utilizing a tool generating model, capable of receiving a specification of one or more new tools that are not part of the one or more tools and generating the one or more new tools, and the specification of the list of one or more new correlated tools and add the one or more tool function information associated with the one or more correlated tools and with the one or more new correlated tools to the context window; (D) upon the tool-informed LLM requesting the unloading of an additional given tool of the tools, as the tool-informed LLM can provide the response to the query without the additional given tool, utilizing, by the processing circuitry, the curator model to receive the list of one or more correlated tools, correlated to the additional given tool, and remove the one or more tool function information associated with the one or more correlated tools from the context window; (E) repeating (C)-(D), by the processing circuitry, until the tool- informed LLM can provide the response to the query; and (F) delivering, by the processing circuitry, the response to the query provided by the tool-informed LLM to the user of the system.

[0054] In some cases, the tool function information can be associated with: (a) a predefined function that directly changes the LLM, or (b) predefined utility that performs actions that are external to the LLM.

[0055] In some cases, the tool-informed LLM can concurrently load up to a first threshold number of tools.

[0056] In some cases, the query is associated with optical design and wherein at least one tool of the one or more tools is an optical design tool.

[0057] In some cases, the query is associated with search and wherein at least one tool of the one or more tools is a search tool.

[0058] In some cases, the query is associated with an optical search and wherein at least one tool of the one or more tools is an optical search tool.

[0059] In some cases, a method for a Large Language Model (LLM) agent with dynamic tools, the method comprising: (A) obtaining, by a processing circuitry, the tool-informed LLM, capable of receiving a query from a user of the system and providing a response to the query, wherein the tool-informed LLM is provided with tool descriptions associated with the one or more tools, each tool is associated with: (i) a tool description, describing a purpose of the tool, and (ii) a tool function information, enabling the LLM to solve a problem associated with the tool utilizing the tool function information, and wherein the tool-informed LLM is further capable of requesting a specification of one or more new tools, being tools that are required to provide a response to the query and are not part of the one or more tools; (B) receiving, by the processing circuitry, a query from the user and provide the query to the tool-informed LLM; (C) upon the tool-informed LLM requesting the loading of an additional given tool of the tools in order to be able to provide the response to the query, adding, by the processing circuitry, the tool function information associated with the additional given tool to a context window comprising past queries provided by the user to the system and additional information available to the tool-informed LLM, wherein the tool-informed LLM provides the response based also on the context window; (D) upon the tool-informed LLM requesting the unloading of an additional given tool of the tools, as the tool-informed LLM can provide the response to the query without the additional given tool, removing, by the processing circuitry, the tool function information associated with the additional given tool from the context window; (E) upon the tool-informed LLM requesting a given specification of one or more new tools, generating, by the processing circuitry, the one or more new tools, utilizing a tool generating model, capable of receiving a specification of one or more new tools that are not part of the one or more tools and generating the one or more new tools, and the specification and add the one or more tool function information associated with the one or more new tools to the context window; (F) repeating (C)-(E), by the processing circuitry, until the tool-informed LLM can provide the response to the query; and (G) delivering, by the processing circuitry, the response to the query provided by the tool- informed LLM to the user of the system.

[0060] In some cases, the tool function information can be associated with: (a) a predefined function that directly changes the LLM, or (b) predefined utility that performs actions that are external to the LLM.

[0061] In some cases, the tool-informed LLM can concurrently load up to a first threshold number of tools.

[0062] In some cases, the query is associated with optical design and wherein at least one tool of the one or more tools is an optical design tool. In some cases, the query is associated with search and wherein at least one tool of the one or more tools is a search tool.

[0063] In some cases, the query is associated with an optical search and wherein at least one tool of the one or more tools is an optical search tool.

[0064] In accordance with a third aspect of the presently disclosed subject matter, there is provided a non-transitory computer readable storage medium having computer readable program code embodied therewith, the computer readable program code, executable by at least one processing circuitry of a computer to perform a method for determining a risk score associated with a transaction, the method comprising: (A) obtaining, by a processing circuitry, the tool-informed LLM, utilized to be an LLM capable of receiving a query from a user of the system and providing a response to the query, wherein the tool- informed LLM is provided with descriptions associated with the one or more tools, each tool is associated with: (i) a tool description, describing a purpose of the tool, and (ii) a tool function information, enabling the LLM to solve a problem associated with the tool utilizing the tool function information; (B) receiving, by the processing circuitry, a query from the user and provide the query to the tool-informed LLM; (C) upon the tool- informed LLM requesting the loading of an additional given tool of the tools in order to be able to provide the response to the query, adding, by the processing circuitry, the tool function information associated with the additional given tool to a context window comprising past queries provided by the user to the system and additional information available to the tool-informed LLM, wherein the tool-informed LLM provides the response based also on the context window; (D) upon the tool-informed LLM requesting the unloading of an additional given tool of the tools, as the tool-informed LLM can provide the response to the query without the additional given tool, removing, by the processing circuitry, the tool function information associated with the additional given tool from the context window; (E) repeating (C)-(D), by the processing circuitry, until the tool-informed LLM can provide the response to the query; and (F) delivering, by the processing circuitry, the response to the query provided by the tool-informed LLM to the user of the system.

[0065] In some cases, a non-transitory computer readable storage medium having computer readable program code embodied therewith, the computer readable program code, executable by at least one processing circuitry of a computer to perform a method for determining a risk score associated with a transaction, the method comprising: (A) obtaining, by a processing circuitry, the tool-informed LLM, capable of receiving a query from a user of the system and providing a response to the query, wherein the tool- informed LLM is provided with tool descriptions associated with the one or more tools, each tool is associated with: (i) a tool description, describing a purpose of the tool, and (ii) a tool function information, enabling the LLM to solve a problem associated with the tool utilizing the tool function information; (B) receiving, by the processing circuitry, a query from the user and provide the query to the tool-informed LLM; (C) upon the tool- informed LLM requesting the loading of an additional given tool of the tools in order to be able to provide a response to the query, utilizing, by the processing circuitry, a curator model, capable of: (i) receiving a request for loading of a given tool of the one or more tools and providing a list of one or more correlated tools of the tools, being tools that are associated with the given tool, and (ii) receiving a request for unloading of a given tool of the one or more tools and providing a list of one or more correlated tools of the tools, being tools that are associated with the given tool, to receive the list of one or more correlated tools, correlated to the additional given tool, and add the one or more tool function information associated with the one or more correlated tools to the context window; (D) upon the tool-informed LLM requesting the unloading of an additional given tool of the tools, as the tool-informed LLM can provide the response to the query without the additional given tool, utilizing, by the processing circuitry, the curator model to receive the list of one or more correlated tools, correlated to the additional given tool, and remove the one or more tool function information associated with the one or more correlated tools from the context window; (E) repeating (C)-(D), by the processing circuitry, until the tool-informed LLM can provide the response to the query; and (F) delivering, by the processing circuitry, the response to the query provided by the tool- informed LLM to the user of the system.

[0066] In some cases, a non-transitory computer readable storage medium having computer readable program code embodied therewith, the computer readable program code, executable by at least one processing circuitry of a computer to perform a method for determining a risk score associated with a transaction, the method comprising: (A) obtaining, by a processing circuitry, the tool-informed LLM, capable of receiving a query from a user of the system and providing a response to the query, wherein the tool- informed LLM is provided with tool descriptions associated with the one or more tools, each tool is associated with: (i) a tool description, describing a purpose of the tool, and (ii) a tool function information, enabling the LLM to solve a problem associated with the tool utilizing the tool function information; (B) receiving, by the processing circuitry, a query from the user and provide the query to the tool-informed LLM; (C) upon the tool- informed LLM requesting the loading of an additional given tool of the tools in order to be able to provide a response to the query, utilizing, by the processing circuitry, a curator model, capable of: (i) receiving a request for loading of a given tool of the one or more tools and providing a list of one or more correlated tools, being tools of the tools that are associated with the given tool and a specification of one or more new correlated tools, being tools that are associated with the given tool and are not part of the one or more tools, and (ii) receiving a request for unloading of a given tool of the one or more tools and providing a list of one or more correlated tools of the tools, being tools that are associated with the given tool, to receive the list of the one or more correlated tools and the specification of the list of one or more new correlated tools, correlated to the additional given tool, and generating, by the processing circuitry, one or more new tools, utilizing a tool generating model, capable of receiving a specification of one or more new tools that are not part of the one or more tools and generating the one or more new tools, and the specification of the list of one or more new correlated tools and add the one or more tool function information associated with the one or more correlated tools and with the one or more new correlated tools to the context window; (D) upon the tool-informed LLM requesting the unloading of an additional given tool of the tools, as the tool- informed LLM can provide the response to the query without the additional given tool, utilizing, by the processing circuitry, the curator model to receive the list of one or more correlated tools, correlated to the additional given tool, and remove the one or more tool function information associated with the one or more correlated tools from the context window; (E) repeating (C)-(D), by the processing circuitry, until the tool-informed LLM can provide the response to the query; and (F) delivering, by the processing circuitry, the response to the query provided by the tool-informed LLM to the user of the system.

[0067] In some cases, a non-transitory computer readable storage medium having computer readable program code embodied therewith, the computer readable program code, executable by at least one processing circuitry of a computer to perform a method for determining a risk score associated with a transaction, the method comprising: (A) obtaining, by a processing circuitry, the tool-informed LLM, capable of receiving a query from a user of the system and providing a response to the query, wherein the tool- informed LLM is provided with tool descriptions associated with the one or more tools, each tool is associated with: (i) a tool description, describing a purpose of the tool, and (ii) a tool function information, enabling the LLM to solve a problem associated with the tool utilizing the tool function information, and wherein the tool-informed LLM is further capable of requesting a specification of one or more new tools, being tools that are required to provide a response to the query and are not part of the one or more tools; (B) receiving, by the processing circuitry, a query from the user and provide the query to the tool-informed LLM; (C) upon the tool-informed LLM requesting the loading of an additional given tool of the tools in order to be able to provide the response to the query, adding, by the processing circuitry, the tool function information associated with the additional given tool to a context window comprising past queries provided by the user to the system and additional information available to the tool-informed LLM, wherein the tool-informed LLM provides the response based also on the context window; (D) upon the tool-informed LLM requesting the unloading of an additional given tool of the tools, as the tool-informed LLM can provide the response to the query without the additional given tool, removing, by the processing circuitry, the tool function information associated with the additional given tool from the context window; (E) upon the tool-informed LLM requesting a given specification of one or more new tools, generating, by the processing circuitry, the one or more new tools, utilizing a tool generating model, capable of receiving a specification of one or more new tools that are not part of the one or more tools and generating the one or more new tools, and the specification and add the one or more tool function information associated with the one or more new tools to the context window; (F) repeating (C)-(E), by the processing circuitry, until the tool-informed LLM can provide the response to the query; and (G) delivering, by the processing circuitry, the response to the query provided by the tool-informed LLM to the user of the system.

[0068] In accordance with a fourth aspect of the presently disclosed subject matter, there is provided a system of a Large Language Model (LLM) agent with dynamic next-token sampling methods, the system comprising: (a) the dynamic LLM, capable of receiving a query from a user of the system and providing a response to the query, the dynamic LLM is associated with one or more next-token sampling methods, being methods that control the next-token selection of the dynamic LLM, wherein the at least one property is associated with the one or more next-token sampling methods available to the dynamic LLM, and (b) a processing circuitry configured to: (A) obtain the dynamic LLM, that has been: (a) informed of the one or more next-token sampling methods, and (b) instructed, based on the one or more next-token sampling methods and the query, to select a given next-token sampling method of the next-token sampling methods when providing a response to the query, giving rise to a sampling-informed LLM; (B) receive a query from the user and provide the query to the sampling-informed LLM; (C) upon the sampling- informed LLM selecting a given next-token sampling method, utilize the sampling- informed LLM with the given next-token sampling method to provide a response to the query; and (D) deliver the response to the query provided by the sampling-informed LLM to the user of the system.

[0069] In some cases, the next-token sampling methods include one or more of: top-k, top-p, or temperature.

[0070] In accordance with a fifth aspect of the presently disclosed subject matter, there is provided a method for a Large Language Model (LLM) agent with dynamic next-token sampling methods, the method comprising: (A) obtaining, by a processing circuitry, the dynamic LLM, capable of receiving a query from a user of the system and providing a response to the query, the dynamic LLM is associated with one or more next-token sampling methods, being methods that control the next-token selection of the dynamic LLM, wherein the at least one property is associated with the one or more next-token sampling methods available to the dynamic LLM, that has been: (a) informed of the one or more next-token sampling methods, and (b) instructed, based on the one or more nexttoken sampling methods and the query, to select a given next-token sampling method of the next-token sampling methods when providing a response to the query, giving rise to a sampling-informed LLM; (B) receiving, by the processing circuitry, a query from the user and provide the query to the sampling-informed LLM; (C) upon the sampling- informed LLM selecting a given next-token sampling method, utilizing, by the processing circuitry, the sampling-informed LLM with the given next-token sampling method to provide a response to the query; and (D)delivering, by the processing circuitry, the response to the query provided by the sampling-informed LLM to the user of the system.

[0071] In some cases, the next-token sampling methods include one or more of: top-k, top-p, or temperature.

[0072] In accordance with a sixth aspect of the presently disclosed subject matter, there is provided a non-transitory computer readable storage medium having computer readable program code embodied therewith, the computer readable program code, executable by at least one processing circuitry of a computer to perform a method for determining a risk score associated with a transaction, the method comprising: (A) obtaining, by a processing circuitry, the dynamic LLM, capable of receiving a query from a user of the system and providing a response to the query, the dynamic LLM is associated with one or more next-token sampling methods, being methods that control the next-token selection of the dynamic LLM, wherein the at least one property is associated with the one or more next-token sampling methods available to the dynamic LLM, that has been: (a) informed of the one or more next-token sampling methods, and (b) instructed, based on the one or more next-token sampling methods and the query, to select a given nexttoken sampling method of the next-token sampling methods when providing a response to the query, giving rise to a sampling-informed LLM; (B) receiving, by the processing circuitry, a query from the user and provide the query to the sampling-informed LLM; (C) upon the sampling-informed LLM selecting a given next-token sampling method, utilizing, by the processing circuitry, the sampling-informed LLM with the given nexttoken sampling method to provide a response to the query; and (D) delivering, by the processing circuitry, the response to the query provided by the sampling-informed LLM to the user of the system.

[0073] In accordance with a seventh aspect of the presently disclosed subject matter, there is provided a system of a Large Language Model (LLM) agent with dynamic architecture, the system comprising: (a) the dynamic LLM, capable of receiving a query from a user of the system and providing a response to the query, the dynamic LLM is associated with one or more base models utilized by the dynamic LLM to generate the response wherein the at least one property is associated with the one or more base models, and (b) a processing circuitry configured to: (A) obtain the dynamic LLM of claim 1, that has been: (a) informed of the one or more base models, and (b) instructed, based on the one or more base model and the query, to select a given base model of the base models when providing a response to the query, giving rise to a model-informed LLM; (B) receive a query from the user and provide the query to the model-informed LLM; (C) upon the model-informed LLM selecting a given base model, utilize the model-informed LLM with the given base model to provide a response to the query; and (D) deliver the response to the query provided by the model-informed LLM to the user of the system.

[0074] In accordance with a eighth aspect of the presently disclosed subject matter, there is provided a method of a Large Language Model (LLM) agent with dynamic architecture, the method comprising: (A) obtaining, by a processing circuitry, the dynamic LLM, capable of receiving a query from a user of the system and providing a response to the query, the dynamic LLM is associated with one or more base models utilized by the dynamic LLM to generate the response wherein the at least one property is associated with the one or more base models, that has been: (a) informed of the one or more base models, and (b) instructed, based on the one or more base model and the query, to select a given base model of the base models when providing a response to the query, giving rise to a model-informed LLM; (B) receiving, by the processing circuitry, a query from the user and provide the query to the model-informed LLM; (C) upon the model-informed LLM selecting a given base model, utilizing, by the processing circuitry, the model- informed LLM with the given base model to provide a response to the query; and (D) delivering, by the processing circuitry, the response to the query provided by the model- informed LLM to the user of the system.

[0075] In accordance with a ninth aspect of the presently disclosed subject matter, there is provided a non-transitory computer readable storage medium having computer readable program code embodied therewith, the computer readable program code, executable by at least one processing circuitry of a computer to perform a method for determining a risk score associated with a transaction, the method comprising: (A) obtaining, by a processing circuitry, the dynamic LLM, capable of receiving a query from a user of the system and providing a response to the query, the dynamic LLM is associated with one or more base models utilized by the dynamic LLM to generate the response wherein the at least one property is associated with the one or more base models, that has been: (a) informed of the one or more base models, and (b) instructed, based on the one or more base model and the query, to select a given base model of the base models when providing a response to the query, giving rise to a model-informed LLM; (B) receiving, by the processing circuitry, a query from the user and provide the query to the model-informed LLM; (C) upon the model-informed LLM selecting a given base model, utilizing, by the processing circuitry, the model-informed LLM with the given base model to provide a response to the query; and (D) delivering, by the processing circuitry, the response to the query provided by the model-informed LLM to the user of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] In order to understand the presently disclosed subject matter and to see how it may be carried out in practice, the subject matter will now be described, by way of non-limiting examples only, with reference to the accompanying drawings, in which:

[0077] Fig. 1A is a schematic illustration of a first possible embodiment of an architecture for a Large Language Model (LLM) agent with dynamic tools, in accordance with the presently disclosed subject matter;

[0078] Fig. IB is a schematic illustration of a second possible embodiment of an architecture for an LLM agent with dynamic tools, in accordance with the presently disclosed subject matter;

[0079] Fig. 1C is a schematic illustration of a third possible embodiment of an architecture for an LLM agent with dynamic tools, in accordance with the presently disclosed subject matter;

[0080] Fig. ID is a schematic illustration of a fourth possible embodiment of an architecture for an LLM agent with dynamic tools, in accordance with the presently disclosed subject matter;

[0081] Fig. 2 is an exemplary block diagram schematically illustrating one example of a dynamic LLM agent system, in accordance with the presently disclosed subject matter;

[0082] Fig. 3 is an exemplary flowchart illustrating one example of a sequence of operations carried out for an LLM agent with dynamic tools, in accordance with the presently disclosed subject matter;

[0083] Fig. 4 is an exemplary flowchart illustrating one example of a sequence of operations carried out for an LLM agent with dynamic next-token sampling methods, in accordance with the presently disclosed subject matter;

[0084] Fig. 5 is an exemplary flowchart illustrating one example of a sequence of operations carried out for an LLM agent with dynamic architecture, in accordance with the presently disclosed subject matter;

[0085] Fig. 6 is an example of complex operations that LLM agents perform to check what happen in a simulation if a certain change is made and a chain of functions has to be called without further input by the LLM agent wherein the distances between the embedding vectors of the tools and the user prompt is measured and the required tools to use are marked in lighter color; and Fig. 7 is an example of naive and LLM agent supported ways of finding a spherical lens with a target EFL at a certain wavelength, wherein an Optical Chat supports performing the right chain of actions by loading the required tools.

[0086] DETAILED DESCRIPTION

[0087] In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the presently disclosed subject matter. However, it will be understood by those skilled in the art that the presently disclosed subject matter may be practiced without these specific details. In other instances, well- known methods, procedures, and components have not been described in detail so as not to obscure the presently disclosed subject matter.

[0088] In the drawings and descriptions set forth, identical reference numerals indicate those components that are common to different embodiments or configurations.

[0089] Unless specifically stated otherwise, as apparent from the following discussions, it is appreciated that throughout the specification discussions utilizing terms such as "generating", "delivering", "formatting", "adding", "removing", "repeating", "determining", "capturing", "performing", "updating", "transmitting", "obtaining", "executing", "receiving" or the like, include action and / or processes of a computer that manipulate and / or transform data into other data, said data represented as physical quantities, e.g., such as electronic quantities, and / or said data representing the physical objects. The terms “computer”, “processor”, “processing resource”, “processing circuitry” and “controller” should be expansively construed to cover any kind of electronic device with data processing capabilities, including, by way of non-limiting example, a personal desktop / laptop computer, a server, a computing system, a communication device, a smartphone, a tablet computer, a smart television, a processor (e.g. digital signal processor (DSP), a microcontroller, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), etc.), a group of multiple physical machines sharing performance of various tasks, virtual servers co-residing on a single physical machine, any other electronic computing device, and / or any combination thereof.

[0090] The operations in accordance with the teachings herein may be performed by a computer specially constructed for the desired purposes or by a general-purpose computer specially configured for the desired purpose by a computer program stored in a non- transitory computer readable storage medium. The term "non-transitory" is used herein to exclude transitory, propagating signals, but to otherwise include any volatile or nonvolatile computer memory technology suitable to the application.

[0091] As used herein, the phrase "for example," "such as", "for instance" and variants thereof describe non-limiting embodiments of the presently disclosed subject matter. Reference in the specification to "one case", "some cases", "other cases" or variants thereof means that a particular feature, structure or characteristic described in connection with the embodiment(s) is included in at least one embodiment of the presently disclosed subject matter. Thus, the appearance of the phrase "one case", "some cases", "other cases" or variants thereof does not necessarily refer to the same embodiment(s).

[0092] It is appreciated that, unless specifically stated otherwise, certain features of the presently disclosed subject matter, which are, for clarity, described in the context of separate embodiments, may also be provided in combination in a single embodiment. Conversely, various features of the presently disclosed subject matter, which are, for brevity, described in the context of a single embodiment, may also be provided separately or in any suitable sub-combination.

[0093] In embodiments of the presently disclosed subject matter, fewer, more and / or different stages than those shown in Figs. 3-5 may be executed. In embodiments of the presently disclosed subject matter one or more stages illustrated in Figs. 3-5 may be executed in a different order and / or one or more groups of stages may be executed simultaneously. Figs. 1A, IB, 1C, ID and 2 illustrate a general schematic of the system architecture in accordance with an embodiment of the presently disclosed subject matter. Each module in Figs. 1A, IB, 1C, ID and 2 can be made up of any combination of software, hardware and / or firmware that performs the functions as defined and explained herein. The modules in Figs. 1A, IB, 1C, ID and 2 may be centralized in one location or dispersed over more than one location. In other embodiments of the presently disclosed subject matter, the system may comprise fewer, more, and / or different modules than those shown in Figs. 1A, IB, 1C, ID and 2.

[0094] Any reference in the specification to a method should be applied mutatis mutandis to a system capable of executing the method and should be applied mutatis mutandis to a non-transitory computer readable medium that stores instructions that once executed by a computer result in the execution of the method. Any reference in the specification to a system should be applied mutatis mutandis to a method that may be executed by the system and should be applied mutatis mutandis to a non-transitory computer readable medium that stores instructions that may be executed by the system.

[0095] Any reference in the specification to a non-transitory computer readable medium should be applied mutatis mutandis to a system capable of executing the instructions stored in the non-transitory computer readable medium and should be applied mutatis mutandis to method that may be executed by a computer that reads the instructions stored in the non-transitory computer readable medium.

[0096] A dynamic Large Language Model (LLM), is an LLM that has the capability to change itself. An LLM has one or more properties associated with its behavior. Changes in these properties will change the behavior of the LLM when encountering a query from a user. Non-limiting examples of these properties can be associated with one or more tools available to the LLM and / or associated with one or more next-token sampling methods available to the LLM and / or associated with one or more base models utilized by the LLM and / or any other property that changes the behavior of the LLM.

[0097] A dynamic LLM is capable of changing one or more of the properties. These changes can be in the context of a query the LLM receives from a user. The dynamic LLM receives the query, makes the changes to its own properties and then provides a response to the query with the changed properties.

[0098] A non-limiting example of a dynamic LLM is a tool-informed LLM. This is an LLM that can dynamically change itself and the access it has to one or more tools. These tools can be used in accordance with tool information and usage instructions associated with each of the tools. The tool information and usage instructions of a given tools can be placed in a context window of the dynamic LLM, thereby allowing it to utilize the given tool when providing a response to a query. The tool-informed LLM can dynamically request to load a given tool to its context window and / or to unload a given tool from its context window. The request to load and / or unload the given tool is done by the tool-informed LLM in accordance with its needs to response to the query. These tools present an infinite number of possibilities that can be available to the tool-informed LLM. With tools, the tool-informed LLM can search the web, do math, run code, and more. A tool-informed LLM is instructed to request the tools it need to respond to the user’s query. These tools are used according to the tool information and usage instructions that are placed in the model context window. The tool-informed LLM can be optionally further instructed to unload a tool that it does not need anymore. This unneeded tool can be removed from the context window of the tool-informed LLM.

[0099] A tool-informed LLM is a dynamic LLM that is capable of receiving a query from a user and providing a response to the query. At least one property of the tool-informed LLM is associated with one or more tools available to the tool-informed LLM. The tool- informed LLM is informed of the one or more tools. The tool-informed LLM can be informed of the one or more tools by providing the LLM with tool descriptions associated with the one or more tools, for example: by providing the tool-informed LLM with the names and / or purpose of the tools. The tool-informed LLM can be instructed to request a loading of a given tool of the tools when encountering a query for which the LLM cannot provide a response to without one or more tools. In other cases, the tool-informed LLM can be instructed to request a loading of a given tool of the tools when encountering a query for which the LLM can provide a better response to with the given tool. A better response is a first response to the query given by the tool-informed LLM with the given tool, which is better than a second response capable of being provided to the query by the tool-informed LLM without the given tool. The tool-informed LLM can be optionally instructed to request an unloading of a given tool of the tools when encountering a query, the LLM can provide the response to without the given tool. It is to be noted that the loading of tools by the tool-informed LLM can be an iterative process - where the tool- informed LLM is provided with a query it can request the loading of a first tool into its context window. After tackling the query with the first tool, the tool-informed LLM can understand it requires a second tool and request it. These tools can be used by the tool- informed LLM as a chain of tools and / or in parallel. The chain of requested tools can continue repeatedly until the tool-informed LLM has the ability to provide a response to the query and / or a better response than responding without the chain of requested tools. It is to be noted that the advantage of utilizing the chain of tools by the tool-informed LLM can come from one or more tools in the chain of tools or from a combination thereof.

[0100] The tool-informed LLM described above can be utilized as part of an LLM agent. An LLM agent can be described as a system that can use an LLM to reason through a problem, create a plan to solve the problem and execute the plan with the help of a set of tools. An LLM agent comprises an LLM with the ability to use tools. These tools are used according to the tool information and usage instructions that are placed in the model context window. The LLM outputs a defined structure that is used to identify and execute the function that is represented by the tool. The description of the available tools and the instructions to use the function that is represented by the tool is inserted into the context window of the tool-informed LLM model. It allows the tool-informed LLM to decide which tools to use and when to assist the user better. The tool-informed LLM ‘activates’ the tool by outputting text in the predefined structure. Then, the tool with the chosen parameters is called, and the response is injected into the context window of the tool- informed LLM. Non-limiting examples of tools leveraged by LLMs are web search, code execution and optical design.

[0101] These LLM agents are essentially systems that transform natural language into chains of actions, and the possibilities are endless. Every action we can implement in code and define properly in natural language can be a building block of a conversational LLM agent that assists in doing that task, especially when considering action chaining, where the LLM agent executes several actions in chain or parallel. Proper utilization of the tools can help mitigate some of the traditional LLM limitations. For instance, access to calculators can allow the agent to perform actual calculations, and the ability to get information from external sources helps reduce the risk of hallucinations.

[0102] This allows an LLM agent that utilizes a tool-informed LLM that was equipped, for example, with a tool to calculate lens measurements and search a wide catalog of optical elements, to perform the calculation correctly and achieve the right lens, as part of the ongoing conversation. An LLM agent with dynamic tools can have many more capabilities when trying to provide a response to a query, such as: running a simulation engine, changing parts, and accessing multiple types of calculations, as needed. The LLM agent with dynamic tools is a conversational agent which is an agent that uses tools during an ongoing conversation with the user, according to the interaction and the defined tools.

[0103] The LLM agent with dynamic tools is based on the emerging notions of the “sense of self’, “Theory of Mind”, and “self-awareness” of LLMs. The “sense of self’ refers to an individual's perception of their unique characteristics, encompassing personality traits, abilities, preferences, moral values, and motivational drivers. “Theory of Mind” is the capacity to attribute mental states to oneself and others, recognizing that others hold beliefs, desires, intentions, and perspectives that may differ from one's own. In artificial intelligence, “self-awareness” denotes a machine's ability to acknowledge its existence and consciousness as a distinct entity within its environment. Even the most advanced LLMs exhibit only rudimentary levels of these attributes. If at all, they are often comparable to the levels observed in young children. These emerging capabilities refer to capabilities that become present in larger LLMs but are not present in smaller ones. These capabilities are not directly predictable by scaling laws or consistent performance improvements from smaller-scale models. Instead, they exhibit a distinct pattern where performance remains relatively random until a critical threshold of LLM scale is reached, at which point performance significantly improves, akin to a phase transition, all without being explicitly trained for it. The capability to use tools has been shown to emerge in LLMs even when the model wasn’t specifically trained for it, with few-shot learning and even one or zero-shot learning. The dynamic LLM agent utilizes these emerging identitylike attributes and provides an approach, framework, and tools that steer these qualities and enable the creation of a wide range of LLM agents with new capabilities. By harnessing these concepts, the capabilities of LLM agents can be enhanced. This is done by allowing the LLM agent to intelligently modify its own properties and / or attributes during an ongoing conversation, depending on the user's needs. The claimed subject matter relates to the use of tools by conversational LLM agents, and to a framework that expands the LLM agent capabilities and creates LLM agents with new capabilities.

[0104] The dynamic LLM approach, and specifically the dynamic LLM agent approach, described herein has far-reaching implications across numerous scientific and technical disciplines (beyond the examples below for complex optical calculations and complex financial calculations). This dynamic LLM methodology, which effectively manages interdependent equations, can be readily adapted to solve complex problems in various fields, such as: economics, physics, chemistry, mathematics, engineering, biology, climate science, computer science, and other fields.

[0105] In economics, for instance, this dynamic LLM approach could revolutionize the modeling of complex financial systems, market dynamics, and macroeconomic forecasting. In physics, it could enhance our ability to simulate quantum systems, model particle interactions, or analyze astrophysical phenomena. The method's applicability extends to chemistry for molecular dynamics simulations and reaction kinetics modeling; to mathematics for solving systems of differential equations and optimizing algorithms; to engineering for structural analysis and fluid dynamics; to biology for protein folding simulations and genetic network analysis; to climate science for atmospheric and oceanic modeling; and to computer science for enhancing machine learning algorithms and optimizing network architectures. The versatility of this approach in handling coupled, dependent equations makes it a powerful tool across the spectrum of scientific and technological endeavors, potentially accelerating research and innovation in diverse fields. Thus, the dynamic LLM agent introduces a novel approach to enhancing the capabilities of LLM based agents, enabling them to effectively utilize tools and perform complex operations within various domains. Traditional limitations imposed by context window size, attention capacity, and tool utilization, as well as others, are addressed through a dynamic framework that optimizes the LLM agent properties and / or attributes. The dynamic LLM agent has dynamic access to tools that change and affect the LLM agent itself. This dynamic LLM agent is built based also on the emergence of a sense of self in LLMs and their recently discovered capability of semi-understanding the effects of actions on themselves, as well as the concepts of mental state within themselves and others. A non-limiting example of an LLM agent that can change its own properties is an LLM agent with dynamic tools. This dynamic LLM agent includes a tool warehouse. Conversely, the tool warehouse contains all potential tools that are not within the context window, essentially making it a limitless resource. Based on the current conversation, this LLM agent has a dynamic approach to tool access that empowers the LLM agent to intelligently load and unload tools. This facilitates focused operations without the LLM agent being overwhelmed by excessive data while potentially providing access to an immense range of tools. A specific non-limiting example of such an LLM agent with dynamic tools can be an Optical Chat that is based on an LLM agent with dynamic tools. This Optical Chat is a highly capable optical design assistant. This assistant can perform various calculations, search for relevant optical elements in the database, conduct searches on the web, and execute major parts of the GUI commands in the simulation software - all through natural language. More importantly, this optics assistant can chain actions seamlessly. This enables the user to easily carry out complex operations, such as autonomously completing every step, from calculating required lens parameters to searching for it and running a simulation with it iteratively to perform a scan. Traditional workflow of optics design in simulation software requires an adjustment period to the software capabilities and limitations, and learning how to use it correctly. It requires manual search and calculations to find the right components, as well as a-priori knowledge or extensive research to understand the right order of actions. The Optical Chat allows a very steep learning curve and simplifies processes that require deeper understandmg. With Optical Chat, these more complicated processes can now be done by using simple, natural language, lowering the barriers to better optical design by utilizing the benefits of an LLM agent with dynamic tools wherein at least one of these tools is associated with optical search and / or with optical design. Table 1 below depicts A real- life example of complex operations that an Optical Chat LLM agent has to perform. In this non-limiting example, the user wants to check what will happen in their simulation if a certain change will be made. A chain of six functions has to be called by the Optical Chat without further input (or, at least, the LLM agent needs to request the missing information actively) in order to successfully accomplish the task. Fig. 6 depicts exemplary distances between the embedding vectors of the tools used by the LLM agent in this example and the user’s prompt. The required tools to use are marked using a brighter color. Fig. 7 depicts naive and correct ways of finding a spherical lens with a target EFL at a certain wavelength utilizing the Optical Chat. While beginners simply search for lenses with the target EFL and get slightly wrong results because of wavelength differences, experienced designers will calculate the lens measurements that will create the target EFL at their wavelength. The Optical Chat LLM agent allows even complete beginners to perform the right chain of actions. A non-limiting example of using an LLM agent with dynamic tools can be a Variable-Rate Mortgage (VRM) Chat. VRM presents a complex calculation structure due to its reliance on fluctuating interest rates. Unlike a fixed-rate mortgage, where the interest rate remains constant throughout the loan term, a VRM adjusts periodically based on market conditions. This adjustment is typically tied to an external benchmark or index, such as the prime rate though some lenders may set the rate based on their discretion. The complexity arises from the need to anticipate and calculate future payments, which vary as the interest rate fluctuates. Borrowers must be prepared for changes in their monthly payments, which can increase or decrease depending on the direction of interest rates.

[0106] The calculation of a VRM involves several factors, including the initial interest rate, the adjustment frequency, the margin added to the index, and any caps on rate increases. The initial rate is often lower than that of a fixed-rate mortgage, making it an attractive option for borrowers expecting a decline in interest rates. However, the risk comes when rates rise, potentially leading to higher payments than initially anticipated. The adjustment frequency, which could be monthly, annually, or at another interval, dictates how often the interest rate and, consequently, the monthly payment will change. The margin is a fixed percentage added to the index rate to determine the actual mortgage rate. Additionally, caps are often included to limit how much the interest rate or payment can increase during each adjustment period or over the loan's lifetime, adding another layer of complexity to the calculations.

[0107] For borrowers, understanding the intricacies of VRM calculations is crucial, as they impact financial planning and the overall cost of the mortgage. The potential for both lower and higher payments means that borrowers must carefully consider their ability to handle fluctuating payments. While the opportunity to benefit from falling rates without refinancing is a significant advantage, the unpredictability of future rate movements requires a thorough analysis and understanding of the terms and conditions of the mortgage. This complexity underscores the importance of evaluating one's financial situation and risk tolerance before opting for a variable-rate mortgage.

[0108] The equation for a VRM can be expressed as follows:

[0109] Rt= It+ M wherein:

[0110] Rtis the interest rate at time t;

[0111] Itis the value of the index rate at time t; and M is the fixed margin.

[0112] The monthly payment for a VRM can be calculated using the following formula:

[0113] Rm(l + Rm~)nP~L(1 + Rm)n~ 1 wherein:

[0114] P is the monthly payment;

[0115] L is the loan amount;

[0116] Rmis the monthly interest rate;

[0117] Rtdivided by 12 or Rm= (1 + Rt)i?; and n is the total number of monthly payments.

[0118] It's important to note that Rt(and consequently Rm) will change periodically, typically annually or semi-annually, based on changes in the index rate. This means the monthly payment P will also change over time.

[0119] Additionally, most VRMs include rate caps that limit how much the rate can change:

[0120] 1. Initial adjustment cap: Limits the rate increase at the first adjustment;

[0121] 2. Periodic adjustment cap: Limits the rate increase at each adjustment; and

[0122] 3. Lifetime cap: Limits the total rate increase over the life of the loan.

[0123] These caps can be represented as:

[0124] Rt< min(Jt+ M, Ro+ Q , Rt— 1 + Cp, Ro+ C() wherein:

[0125] Rois the initial interest rate;

[0126] Ci is the initial adjustment cap;

[0127] Cpis the periodic adjustment cap; and

[0128] Ci is the lifetime cap.

[0129] This equation ensures that the new rate doesn't exceed any of the cap limits.

[0130] The above-described equations are tools for the VRM Chat. When a user enters a query that requires usage of these tools, the VRM Chat knows to request the loading of one or more of these tools in order to provide a response to the user’s query. The request of these tools can be done by the VRM Chat in a sequential order. Requesting the loading of one of the tools and only after revisiting the query with this new knowledge, requesting the loading of an additional tool. This process can be iterative, until the VRM Chat can provide the response to the user’s query.

[0131] Another specific non-limiting example of such an LLM agent with dynamic tools can be a Real-estate Chat that assists users in deciding either to lease or buy a specific asset. Such a real-estate decision requires a number of tools - for example: an asset value appraisal tool, an interest rate estimation tool, upfront costs tools and maintenance and repair tool.

[0132] The Real-estate Chat has been informed of the asset value appraisal tool, the interest rate estimation tool, upfront costs tools and maintenance and repair tool by interdiction of their names. A user enters a query into the Real-estate Chat providing information about his own financial situation and providing information about the asset.

[0133] The Real-estate Chat know to request loading of the asset value appraisal tool and utilizes it to appraise a value of the asset for the next decade. Now the Real-estate Chat understands it requires to estimate the interest rate for the next decade. It requests loading of the interest rate estimation tool and utilizes it after its in his context window to estimate the interest rates in the coming decade.

[0134] The chain of required tools can continue until the Real-estate Chat can provide a response to the user’s query and provide a decision if to lease or buy the specific asset.

[0135] Moreover, the properties and / or attributes that define an LLM agent can extend beyond its toolbox. The dynamic approach can apply to each of these properties and / or attributes. The dynamic LLM agent utilizes the emerging sense of self and leverages sophisticated models’ capacity to comprehend, at least to some extent, the consequences of external actions, and their own, on their capabilities and characteristics. The dynamic LLM agent system empowers agents with a diverse range of novel and enhanced capabilities: enabling agents to use tools that directly influence their behavior, attributes, and functionality, enabling agents to choose their own token-selection methods and change the base model if needed. This dynamic approach to LLM agent design offers ways to overcome the limitations of static agents which have predetermined capabilities that were defined for them upon creation, limited by their context window, size, predefined tools, etc. Dynamic LLM agent capabilities go beyond what has been defined upon creation, not limited by context window, size, or predefined properties and / or attributes, such as: token-selection and / or base model selection. For example, most LLMs have a token-selection attribute that controls how the system chooses the next token from the model output. Some of these methods are associated with creativity, others with the response being precise. Although these two concepts are not accurately defined and measured, allowing the agent to dynamically control its token selection could significantly affect its ability to handle versatile tasks. Another attribute that can be changed dynamically is the base model of the agent. LLMs is a rapidly evolving field with new models coming out every week. These models vary in their capabilities, strengths and weaknesses. Allowing the agent to change its base model can allow it to dynamically adjust itself to the topic at hand, responding better to language, code, reasoning and domain-specific tasks. The dynamic agent opens up new horizons in developing expert assistants, making them more adaptable, versatile, and capable.

[0136] The architecture of a dynamic LLM agent is based on a conversational LLM agent that utilizes a dynamic LLM that can change its own properties and / or attributes. There are various possibilities of establishing this architecture, of which non-limiting dynamic LLM agent examples are depicted below. These dynamic LLM agent non-limiting exemplary architectures include: A first possible embodiment of an architecture for an LLM agent with dynamic tools which includes a tool-informed LLM, as further detailed herein, inter alia with reference to Fig. 1A. A second possible embodiment of an architecture for an LLM agent with a dynamic tool which includes a tool-informed LLM and a curator model, as further detailed herein, inter alia with reference to Fig. IB. A third possible embodiment of an architecture for an LLM agent with dynamic tools which includes a tool-informed LLM, a curator model and a tool generating model, as further detailed herein, inter alia with reference to Fig. 1C. A fourth possible embodiment of an architecture for an LLM agent with dynamic tools which includes a tool-informed LLM and a tool generating model, as further detailed herein, inter alia with reference to Fig. ID.

[0137] Bearing this in mind, attention is drawn to Fig. 1A, which is an exemplary is a schematic illustration of a first possible embodiment of an architecture for an LLM agent with dynamic tools, in accordance with the presently disclosed subject matter.

[0138] LLM agent with dynamic tools 110 is a conversational LLM agent that can receive one or more queries from user 100 and provide one or more responses to these queries as part of a conversational exchange between the user 100 and the LLM agent with dynamic tools 110. The LLM agent with dynamic tools 110 comprises a tool-informed LLM 120. Tools 130 is associated with one or more tools that can become available to the tool- informed LLM 120. At least one tool of the tools 130 is associated with a tool description, describing a purpose of the tool, and a tool function information. The tool description can be for example a name of the tool. The tool function information can be for example the instructions required to use the function. These instructions can enable the tool-informed LLM 120 to solve a problem associated with the tool utilizing the tool function information. The tool-informed LLM 120 can be informed of at least one tool of the tools 130, for example: by providing the tool-informed LLM 120 with tool descriptions associated with the at least one tool of the tools 130. The tool-informed LLM 120 can be instructed to request a loading of a given tool of the tools when encountering a query the tool-informed LLM 120 can provide a first response to with the given tool, wherein the first response is better than a second response capable of being provided to the query by the tool-informed LLM 120 without the given tool. The tool-informed LLM 120 can be instructed to request an unloading of a given tool of the tools when encountering a query the tool-informed LLM 120 can provide the response to without the given tool.

[0139] Context window 140, comprises past queries provided by the user 100 to the LLM agent with dynamic tools 110 and additional information available to the LLM, wherein the LLM provides the response based also on the content of the context window 140. This additional information can include tool function information of one or more tools of the tools 130. The tool-informed LLM 120 can dynamically request to load a given tool of tools 130 into context window 140, for example: by copying the tool function information associated with the given tool into the context window 140. The tool- informed LLM 120 can optionally request to dynamically unload a given tool of tools 130, for example: by removing the tool function information associated with the given tool from the context window 140. The request to load and / or unload the given tool is done by the tool-informed LLM 120 in accordance with its needs to response to the one or more queries provided during the conversation of the user 100 with the LLM agent with dynamic tools 110. The loading of one or more tools from tools 130 into context window 140 can repeat one or more times during the process of LLM agent with dynamic tools 110 providing a response to the query of user 100. The tool-informed LLM 120 can request a new given tool of tools 130 after already using one or more tools to try and provide the response to the query. Similarly, the unloading of tools can repeat one or more times during the process of LLM agent with dynamic tools 110 providing the response to the query of user 100 as tool-informed LLM 120 recognizes during the process that one or more tools are not required in order for it to provide a response to the query.

[0140] It is to be noted that the above described first possible embodiment of an architecture for an LLM agent with dynamic tools 110 can be a distributed solution, wherein the user 100 is using a computerized device, such as: a laptop, a smartphone, a tablet, etc. to engage with the LLM agent with dynamic tools 110 which is executing in a remote server, for example: on a Cloud platform. At least one of the tool-informed LLM 120, the tools 130 and the context window 140 can be running on different servers and communicating through a communication network, for example: communicating over the Internet. In other cases,, one or more of the above components can be deployed onpremise - on servers that are part of an organization. In other cases, one or more of the above components can be deployed on the same device as user 100.

[0141] A non-limiting formal representation of the first possible embodiment of the architecture for an LLM agent with dynamic tools 110 is provided below. It is to be noted that this is an exemplary representation and other representations can be used to describe the architecture as well.

[0142] Let A be an LLM agent with dynamic tools 110 characterized by:

[0143] A Set of tools that can be used by the LLM agent with dynamic tools 110, fi-, di, Pi} represents a tool that’s affecting the internal state of the LLM agent with dynamic tools 110. Each U contains:

[0144] A predefined function that directly changes the agent itself, A ;

[0145] Parameters and purpose description, P, and

[0146] Function pointer, and represents a tool that’s performing an external action. Each ft contains:

[0147] A predefined function that performs actions that are external to the agent, ft;

[0148] Parameters and purpose description, P, and

[0149] Function pointer, ft.

[0150] An Internal state, £ — {P P &r, IP M, P . O, ...} wherein:

[0151] The LLM agent with dynamic tools 110’s prompt instructions, I ;

[0152] The set of tools, 7’; The tool usage instructions, c-'ft;

[0153] The conversation history, H ;

[0154] The next token sampling method, A;

[0155] The base model, M ;

[0156] Supporting oracles, 0;

[0157] And any other attribute that affects the LLM agent with dynamic tools 110 or is utilized by it.

[0158] Let 'T be an operation that affects the LLM agent with dynamic tools 110 's internal state: wherein: the function A of the tool ft , is called by the LLM agent with dynamic tools 110 itself.

[0159] The <& represents the LLM agent with dynamic tools 110's application of the predefined function ft associated with a Type 1 tool ft, to its previous internal state S, resulting in the updated internal state of the LLM agent with dynamic tools 110 Si pdaled . This operation showcases how the LLM agent with dynamic tools 110 employs tools to influence its internal state, enabling it to adapt and respond dynamically to different situations. By modifying T, S we can create a wide range of operations, <1>, that enable a wide range of new agents.

[0160] The dynamic agent approach enables the LLM agent with dynamic tools 110 to use tools that change and affect the LLM agent with dynamic tools 110 itself. It is to be noted that while they appear very different in implementation and suggested applications, it is important to remember that eventually, they are all the same, and are built upon different optional variations An agent that is built with a dynamic approach, such as the LLM agent with dynamic tools 110, can be given the ability to manage its own context window 140, by separating the tools 130 into “Hot” and “Cold” toolboxes. The “Hot Toolbox” contains the tools 130 and instructions that the tool-informed LLM has access to within its context window 140. The “Cold Toolbox” contains the tools 130 and instructions that exist externally to the LLM. The LLM agent with dynamic tools 110 can load and unload them according to the needs of the user in the conversation. This suggested application introduces a novel approach to enhancing the capabilities of LLM- based agents, enabling them to effectively utilize tools and perform complex operations within various domains. The described LLM agent with dynamic tools 110 utilizes a multi-step methodology designed to empower conversational agents with a dynamic and efficient tool utilization mechanism. The LLM agent with dynamic tools 110 establishes a "hot toolbox" containing tools directly accessible within the agent's context window 140 and a "cold toolbox" housing an extensive external tools 130 database. A dynamic approach to tool access allows the LLM agent with dynamic tools 110 to intelligently load and unload tools based on the ongoing conversation with user 100, facilitating focused operations without being overwhelmed by excessive data. This approach not only mitigates performance issues associated with information overload but also optimizes computational resources by managing the context window 140. By doing so, the LLM agent with dynamic tools 110 stays focused on the most relevant information to the current operation, bypassing excessive hallucinations and reduced performance often happening while dealing with larger amounts of data, while potentially saving computing resources thanks to the decreased size of the context window 140. The loading and unloading can occur by being aware of the existence of such tools 130 and how to get them, as well as different, more complicated systems.

[0161] Continuing our exemplary formal representation:

[0162] A is the LLM agent with dynamic tools 110 based on a model M with an internal state Si and a toolbox 71.

[0163] Let TcG Si be a cold toolbox that has different tools 130 then toolbox 7'i.

[0164] Unlike 7'i, the agent can’t access the tools 130 in Tc - They are not in its context window 140 and it does not receive information about them.

[0165] Let U G T> a tool that adds tools from 7b to ?i..

[0166] Let tn G Ti a tool that removes tools from 7i.

[0167] Let wj £ 7b, -h a tool or a set of tools that perform actions that are external to the LLM agent with dynamic tools 110 (for example: search, calculation, API request, etc.) or tools that affect the LLM agent with dynamic tools 110. is defined so that Sa =<I>z..] (S1, 7;jand ifschanging Ti so

[0168] Operation is now defined so that Sa = tv )and it’s changing T-i so that: a setof tools that perform actions that are external to the LLM agent with dynamic tools 110 (for example: search, calculation, API request, etc.) or tools that affect the LLM agent with dynamic tools 110.

[0169] Operations are defined similarly to^Li» ^u,i , but with «a.

[0170] «i, t(24 'l'i due to the requirements from the LLM agent with dynamic tools 110, that exceeds the capabilities of the base model, A / .

[0171] Unlike other agents, the LLM agent with dynamic tools 110 will be able to perform both operations in this order:

[0172] Since many models tend to perform better with information that’s provided to them later on in the conversation, sometimes this simpler operation might be sufficient:

[0173] It is important to note that while from the view point of the LLM agent with dynamic tools 110, different implementations 4>; / !for most cases, but not all, can be the same, they can be implemented very differently and have different properties such as: speed, cost, possible volume, etc. The first possible embodiment of an architecture for an LLM agent with dynamic tools 110 includes a basic access implementation:

[0174] Let tv G T be an unloading tool that contains the base purpose for any 0, € T but not the detailed information about how to use them (such as: attributes, data types, limitations, etc.). In order to load a tool and receive information on how to use it in its context window 140, the LLM agent with dynamic tools 110 passes the names of the tools 130 it wants to gain access to. The unloading tool doesn’t have any more information in it, since the agent can unload the tools from T to 7c just by their names. It is to be noted that the LLM agent with dynamic tools 110 resources management here resembles memory resource management between the hard disk and the RAM, for example. Continuing our exemplary formal representation:

[0175] Let

[0176] Let be a loading tool that contains the information about the names and the general purpose of every L A:c, but not the detailed information about how to use them (such as: attributes, data types, limitations, etc.).

[0177] Let be an unloading tool that can, any L, ’A € 7' but not the detailed information about how to use them (such as: attributes, data types, limitations, etc.).

[0178] Let f e tLbe the function that accepts a list of tool names as an argument and loads them to the calling agent. 71) be the operation that performs T' = w U T and T!G S 7 ) be the operation that performs 7 — 7 / '^ and T' e S

[0179] Tool-informed LLM 120 can than utilize (S'. 7 )torespectively load a given tool from tools 130 into its context window 140 and to unload a given tool from its context window 140 as depicted in Fig. 1A.

[0180] Attention is now drawn to Fig. IB, a schematic illustration of a second possible embodiment of an architecture for an LLM agent with dynamic tools, in accordance with the presently disclosed subject matter.

[0181] LLM agent with dynamic tools 110 is a conversational LLM agent that can receive one or more queries from user 100 and provide one or more responses to these queries as part of a conversational exchange between the user 100 and the LLM agent with dynamic tools 110, as described in Fig. 1A. In the second possible embodiment of an architecture for the LLM agent with dynamic tools 110, the LLM agent with dynamic tools 110 also includes a curator model 150. The curator model 150 is capable of capable of receiving a request for loading of a given tool of the one or more tools 130 and providing a list of one or more correlated tools of the tools 130, being tools that are associated with the given tool. The curator model 150 can also optionally receive a request for unloading of a given tool of the one or more tools 130 and providing a list of one or more correlated tools of the tools 130, being tools that are associated with the given tool. The curator model 150 can be used as an intermediate between the tool-informed LLM 120, the tools 130 and the context window 140 wherein the request for loading and unloading of tools by tool- informed LLM 120 is achieved utilizing the curator model 150. Usage of the curator model 150 reduces the usage of context and attention that is required for tool usage by the LLM agent with dynamic tools 110 without the curator model 150. Without the curator model 150, the LLM agent with dynamic tools 110 has to be aware of the existence of every tool in the tools 130 within the cold toolbox so it could pull relevant information from the tools 130 in the cold toolbox by name. Placing this information, even when redacted to bare tool description (such as: tool name) still anchors large amount of information to the context window 140 of M.

[0182] The curator model 150 is an oracle (for example: a non-conversational agent), that is dedicated to the purpose of understanding the right subset of tools to load into the context window 140. By doing so, the curator model 150 lowers the overall correlation between the context window 140 and the number and complexity of tools 130 that can be used by the LLM agent with dynamic tools 110, while keeping its ability to chain and run more complex operations. In some cases, depending on the exact implementation of the curator model 150, that can be compiled out of several oracles.

[0183] In continuation of the exemplary formal representation detailed in Fig. 1A above, following is an exemplary possible representation of the second possible embodiment of an architecture for an LLM agent with dynamic tools 110: M, ...} , where:

[0184] T^wratm is the toolbox tools 130 of the curator model 150.

[0185] E is the execution method in which the curator model 150 defines the required subset of tools and loads them to the LLM agent with dynamic tools 110’ s tools 130 toolbox.

[0186] M is the base model - tool-informed LLM 120.

[0187] Let tL- tu € Trurator be the loading and unloading of tools as described above so that the operations executed by the curator model 150 on the LLM agent with dynamic tools 110.

[0188] Let r be the LLM agent with dynamic tools 110’s request for a task that requires an unknown set of tools ’L and wr C Τ .

[0189] Let / ∈ it be the function that accepts a request from the LLM agent with dynamic tools 110 and loads the tools that were identified by the curator model 150 to the calling LLM agent with dynamic tools 110. Let ‘^L.r(S- LJ be the operation that is activated by the LLM agent with dynamic tools 110 and sends the request to the curator model 150 in order to identify the subset and perform be the operation that is used by the LLM agent with rder to send the history, H (for example), to the curator model 150, C, in order to perform

[0190] Curator model 150 can than utilize ^r..r(5', ti. ) and . (A CQ to respectively load one or more given tools from tools 130 into its context window 140 and to unload one or more given tools from context window 140 as depicted in Fig. IB.

[0191] Attention is drawn to Fig. 1C, a schematic illustration of a third possible embodiment of an architecture for an LLM agent with dynamic tools, in accordance with the presently disclosed subject matter.

[0192] LLM agent with dynamic tools 110 is a conversational LLM agent that can receive one or more queries from user 100 and provide one or more responses to these queries as part of a conversational exchange between the user 100 and the LLM agent with dynamic tools 110 utilizing a curator model 150, as described in Fig. IB. In the third possible embodiment of an architecture for the LLM agent with dynamic tools 110, the LLM agent with dynamic tools 110 also includes a tool generating model 160.

[0193] Tool generating model can be used by curator model 150 to generate a specific tool that is required by the tool-informed LLM 120 to response to the query of the user 100, but does not exist in tools 130. Tool generating model 160 is capable of receiving a specification of one or more new tools that are not part of the one or more tools 130 and generating the one or more new tools. Curator model 150 in this third possible embodiment of an architecture for an LLM agent with dynamic tools 110 is also capable of generating a specification of one or more new correlated tools, being tools that are associated with a given requested tool, but are not part of the one or more tools 130.

[0194] The need for a solution that includes a tool generating model 160 rises from the necessity to identify the right subset of tools to inject into the context window 140 without being dependent on the existing tools in the tools 130. The suggested architecture implements a dynamic tool-generation system, implementing a multi-agent collaboration approach. In this architectural embodiment the curator model 150 is also able to address the need by one of two things: either loading the required tools, if they exist, or using a tool generating model 160 in order to generate the required tool. It is to be noted that the tool generating model 160 can itself comprise one or more models working together as a multi-agent collaboration system. This allows the LLM agent with dynamic tools 110 to generate new tools on the fly - even if they are not part of tools 130. After a new tool is generated, it can be used instantly in the context window 140 and it can also optionally be sent to the tools 130 for later use, creating an ever-growing domain tool, in some cases with human examination.

[0195] In continuation of the exemplary formal representation detailed in Fig. IB above, the following is an exemplary possible representation of the third possible embodiment of an architecture for an LLM agent with dynamic tools 110:

[0196] Let a solution system G be a set that consists of multiple role-based agents:

[0197] Each o, € G is an LLM agent with dynamic tools 110 so that: wherein:

[0198] Al; is the base model of the LLM agent with dynamic tools 110;

[0199] R; is the role of the LLM agent with dynamic tools 110;

[0200] T; are the tools that the LLM agent with dynamic tools 110 has;

[0201] Let C be a curator model 150.

[0202] Let li. - irj e Tcuratorbe the loading and unloading tools described above in Fig. IB, so that the operations are executed by the curator model 150 on the LLM agent with dynamic tools 110.

[0203] Let r be an operation that requires the set of tools «•’].

[0204] The LLM agent with dynamic tools 110 uses in order to get the tools it needs. can be executed by the curator model , cannot be executed by the curator model 150, and they have to be generated first by G - tool generating model 160. The new tools generated by tool generating model 160 can be used in the context window 140, making the new tools immediately available for tool-informed LLM 120, and / or in the tools 130, making the new tools available for future needs of the LLM agent with dynamic tools 110. Fig. ID is a schematic illustration of a fourth possible embodiment of an architecture for an LLM agent with dynamic tools, in accordance with the presently disclosed subject matter.

[0205] LLM agent with dynamic tools 110 is a conversational LLM agent that can receive one or more queries from user 100 and provide one or more responses to these queries as part of a conversational exchange between the user 100 and the LLM agent with dynamic tools 110, as described in Fig. 1A. In the fourth possible embodiment of an architecture for the LLM agent with dynamic tools 110, the LLM agent with dynamic tools 110 also includes a, the LLM agent with dynamic tools 110 also includes a tool generating model 160.

[0206] Tool generating model can be used directly by the tool-informed LLM 120 to generate a specific tool that is required by the tool-informed LLM 120 to response to the query of the user 100, but does not exist in tools 130. Tool generating model 160 is capable of receiving a specification of one or more new tools that are not part of the one or more tools 130 and generating the one or more new tools. The tool-informed LLM 120 in this fourth possible embodiment of an architecture for an LLM agent with dynamic tools 110 is also capable of generating a specification of one or more new correlated tools, being tools that are associated with a given requested tool, but are not part of the one or more tools 130.

[0207] The need for a solution that includes a tool generating model 160 rises from the necessity to identify the right subset of tools to inject into the context window 140 without being dependent on the existing tools in the tools 130 and without using a mediating curator model 150. The suggested architecture implements a dynamic tool-generation system, implementing a multi-agent collaboration approach. In this architectural embodiment, the tool-informed LLM 120 is also able to address the need by one of two things: either loading the required tools, if they exist, or using a tool generating model 160 in order to generate the required tool. It is to be noted that the tool generating model 160 can itself comprise one or more model working together as a multi-agent collaboration system. This allows the LLM agent with dynamic tools 110 to generate new tools on the fly - even if they are not part of tools 130. After a new tool is generated, it can be used instantly in the context window 140 and it can also optionally be sent to the tools 130 for later use, creating an ever-growing domain tool, in some case with human examination. The new tools generated by tool generating model 160 can be used in the context window 140, making the new tools immediately available for tool-informed LLM 120, and / or in the tools 130, making the new tools available for future needs of the LLM agent with dynamic tools 110.

[0208] Attention is drawn to Fig. 2, which is an exemplary block diagram schematically illustrating one example of a dynamic LLM agent system, in accordance with the presently disclosed subject matter.

[0209] The dynamic LLM agent system 200, referred herein also as "system 200", can comprise or be otherwise associated with a data repository 210 (e.g., a database, a storage system, a memory including Read Only Memory - ROM, Random Access Memory - RAM, or any other type of memory, etc.) configured to store data, including, inter alia, one or more queries, one or more context windows, descriptions and function information associated with one or more tools, next-token sampling methods, base models, etc. In some cases, data repository 210 can be further configured to enable retrieval and / or update and / or deletion of the data stored thereon. It is to be noted that in some cases, data repository 210 can be local and in other cases it can be distributed. It is to be noted that in some cases, data repository 210 can be stored on a cloud-based storage.

[0210] Dynamic LLM agent system 200 can further comprise a network interface 220, enabling connecting the system 200 to the communication network and enabling it to send and receive data, such as: queries, context windows, descriptions and function information associated with one or more tools, next-token sampling methods, base models, etc. In some cases, the network interface 220 can be connected to a Local Area Network (LAN), to a Wide Area Network (WAN), or to the Internet. In some cases, the network interface 220 can connect to a wireless network.

[0211] System 200 further comprises processing circuitry 230. Processing circuitry 230 can be one or more processing circuitry units (e.g., central processing units), microprocessors, microcontrollers (e.g., microcontroller units (MCUs)) or any other computing devices or modules, including multiple and / or parallel and / or distributed processing circuitry units, which are adapted to independently or cooperatively process data for controlling relevant system 200 resources and for enabling operations related to system 200 resources.

[0212] The processing circuitry 230 comprises the following modules: query response determination using dynamic tools module 240, query response determination using dynamic next-token sampling methods module 250, and query response determination using dynamic architecture module 260.

[0213] Query response determination using dynamic tools module 240 can be configured to perform a query response determination using dynamic tools process, as further detailed herein, inter alia with reference to Fig. 3.

[0214] Query response determination using dynamic next-token sampling methods module 250 can be configured to perform a query response determination using dynamic next-token sampling methods process, as further detailed herein, inter alia with reference to Fig. 4.

[0215] Query response determination using dynamic architecture module 260 can be configured to perform a query response determination using dynamic architecture process, as further detailed herein, inter alia with reference to Fig. 5.

[0216] Fig. 3 is an exemplary flowchart illustrating one example of a sequence of operations carried out for an LLM agent with dynamic tools, in accordance with the presently disclosed subject matter.

[0217] According to certain examples of the presently disclosed subject matter, dynamic LLM agent system 200 can be configured to perform a query response determination using dynamic tools process 300, e.g., utilizing the query response determination using dynamic tools module 240. The dynamic LLM agent system 200 can comprise an LLM, capable of receiving a query from a user 100 of the system 200 and providing a response to the query. In some cases, the LLM is obtained by system 200 - either by system 200 generating the LLM or by system 200 obtaining the LLM from an external system. The LLM can be a tool-informed LLM 120. System 200 can further comprise a context window 140, comprising past queries provided by the user 100 to the system 200 and additional information available to the LLM, wherein the LLM provides the response based also on the context window 140. System 200 can further comprise one or more tools 130, each tool is associated with: (i) a tool description, describing a purpose of the tool, and (ii) a tool function information, enabling the LLM to solve a problem associated with the tool utilizing the tool function information. In some cases, system 200 further comprises a curator model 150, capable of: (i) receiving a request for loading of a given tool of one or more tools and providing a list of one or more correlated tools of the tools, being tools that are associated with the given tool, and (ii) receiving a request for unloading of a given tool of the one or more tools and providing a list of one or more correlated tools of the tools, being tools that are associated with the given tool. In some cases, the curator model 150 is capable of: (i) receiving a request for loading of a given tool of one or more tools and providing a list of one or more correlated tools, being tools of the tools that are associated with the given tool and a specification of one or more new correlated tools, being tools that are associated with the given tool and are not part of the one or more tools, and (ii) receiving a request for unloading of a given tool of the one or more tools and providing a list of one or more correlated tools of the tools, being tools that are associated with the given tool. In these cases, system 200 can further comprise a tool generating model 160, capable of receiving a specification of one or more new tools that are not part of the one or more tools and generating one or more new tools. It is to be noted that the tool function information can be associated with: (a) a predefined function that directly changes the LLM, and / or (b) a predefined utility that performs actions that are external to the LLM.

[0218] For this purpose, system 200 can be configured to obtain an LLM that has been: (a) informed of the one or more tools 130 by providing the LLM with the tool descriptions associated with the one or more tools, (b) instructed, based on the tool descriptions, to request loading of a given tool of the tools 130 when encountering a query the LLM can provide a first response to with the given tool, wherein the first response is better than a second response capable of being provided to the query by the LLM tool without the given tool, and (c) optionally instructed, based on the tool descriptions, to request unloading of a given tool of the tools when encountering a query the LLM can provide the response to without the given tool, giving rise to a tool- informed LLM 120 (block 310). The tool-informed LLM 120 can concurrently load up to a first threshold number of tools, for example: up to five tools concurrently. In this non-limiting example, a tool has to be unloaded from the context window 140 before loading a sixth tool. In some cases, the tool-informed LLM 120 is generated by system 200. In other cases, the tool- informed LLM 120 is generated by an external system, external to system 200.

[0219] After obtaining the tool-informed LLM 120, system 200 can be further configured to receive a query from the user 100 and provide the query to the tool-informed LLM 120 (block 320). In some cases, a conversation that includes one or more queries and one or more responses develops between user 100 and system 200. In some cases, the query can be associated with optical design and wherein at least one tool of the one or more tools 130 is an optical design tool. In other cases, the query can be associated with search and, wherein at least one tool of the one or more tools 130 is a search tool. Yet in other cases, the query can be associated with an optical search and wherein at least one tool of the one or more tools 130 is an optical search tool.

[0220] After providing the query to the tool- informed LLM 120, system 200 can be further configured that upon the tool-informed LLM requesting the loading of an additional given tool of the tools in order to be able to provide the response to the query, add the tool function information associated with the additional given tool to the context window (block 330). In some cases, upon the tool-informed LLM 120 requesting the loading of an additional given tool of the tools 130 in order to be able to provide a response to the query, utilize the curator model 150 to receive the list of the one or more correlated tools and the specification of the list of one or more new correlated tools, correlated to the additional given tool. In addition, in some cases system 200 generates one or more new tools, utilizing the tool generating model 160 and the specification of the list of one or more new correlated tools and add the one or more tool function information associated with the one or more correlated tools and with the one or more new correlated tools to the context window 140. The tool generating model 160 can be in some embodiments called directly by the tool-informed LLM 120 and / or in some embodiments called by the curator model 150. It is to be noted that this step is optional. In some cases, this step is repetitive a number of times during the providing of the response.

[0221] After loading an additional tool, system 200 can be further configured that upon the tool-informed LLM requesting the unloading of an additional given tool of the tools, as the tool-informed LLM can provide the response to the query without the additional given tool, remove the tool function information associated with the additional given tool from the context window (block 340). In some cases, the tool-informed LLM 120 can provide the response to the query without the additional given tool, system 200 can utilize the curator model 150 to receive the list of one or more correlated tools, correlated to the additional given tool, and remove the one or more tool function information associated with the one or more correlated tools from the context window 140. It is to be noted that this step is optional. In some cases, this step is repetitive a number of times during the providing of the response.

[0222] After unloading an additional tool, system 200 can be further configured to repeat blocks 330 and 340, if needed, until the tool-informed LLM can provide the response to the query (block 350). In some cases, there is no need for repetition and the tool-informed LLM 120 can provide the response to the query without repetition. In other cases, a repetition of the loading and optionally unloading of a chain of given tools of tools 130 is required for tool-informed LLM 120 to be able to provide a response to the query.

[0223] After providing the response to the query, system 200 can be further configured to deliver the response to the query provided by the tool-informed LLM 120 to the user 100 of the system (block 360). The response can be a final response to the query and / or part of a longer conversation between user 100 and the system 200 that includes multiple queries.

[0224] A non-limiting example of the query response determination using dynamic tools process 300 is described herein: dynamic LLM agent system 200 non-limiting formal possible definition:

[0225] Base model, M: for example: OpenAI’s gpt-4-0613 and some supporting curator model 150 that are based on “OpenAI gpt-3.5-turbo” and “OpenAI gpt-4”.

[0226] Tools 130 in Cold Toolbox, Tc. Both tools and subsets of tools are used in this non-limiting example to describe the toolbox. A “tool” will be used to describe the actual tool that the dynamic LLM agent system 200 uses. A “subset of tools” will be used to describe an equation or purpose that can be used to create different tools, under different assumptions when different variables are given and missing. Since there is a way to show all of these tools as a subset, we show them in one equation or purpose. Each tool in the subset takes different arguments and uses different variations of the formula.

[0227] Exemplary tool: Calculate refractive index - Executes the formula: wherein: are the experimental coefficients for that material.

[0228] A is the wavelength.

[0229] Takes the arguments:

[0230] A, the wavelength; and rn, the material.

[0231] Then, m is used programmatically to query a database for bi- b2. b3, <q, &>, c3

[0232] Returns to the dynamic LLM agent system 200:

[0233] The refractive index of that material in that wavelength. A subset of tools: Lens Maker formula (5 tools)

[0234] All of the tools in this subset execute some form of the formula: wherein: is the focal length; n is the refractive index; d is the central thickness;

[0235] Ry is the radius of curvature (with an appropriate sign according to conventions) of the lens surface closer to the light source; and

[0236] R2- is the radius of curvature (with an appropriate sign according to conventions) of the lens surface further from the light source.

[0237] Returns to the dynamic LLM agent system 200:

[0238] The missing parameter - A subset of tools: Ball Lens measures (four tools), all of the tools in this subset execute some form of the wherein: f is the focal length; b is the back focal length; d is the diameter of the lens; n is the refractive index; a is the numerical aperture; and

[0239] I is the diameter of the input source.

[0240] Returns to the dynamic LLM agent system 200: The missing parameter - a subset of tools: Lens Magnification (two tools). m — —

[0241] All of the tools in this subset execute some form of the formula: u wherein: rn is the lens magnification; v is the distance of the object; u is the distance of the object;

[0242] Returns to the dynamic LLM agent system 200: The missing parameter - a subset of tools: Search (eight tools). The database contains different types of optical elements:

[0243] Lens;

[0244] Grating;

[0245] Filter;

[0246] Window;

[0247] Mirror;

[0248] Aperture;

[0249] Beam Splitter; and

[0250] Prism.

[0251] Each type has different search parameters and nuances. Each tool in this subset contains the ability to search for one optical element type.

[0252] Returns to the dynamic LLM agent system 200:

[0253] If the search was successful;

[0254] Number of results; and

[0255] The top three results.

[0256] A subset of tools: Gratings - all of the tools in this subset execute some form of the formulas: t? * A — rf * sin(3} wherein: n is the order;

[0257] A is the wavelength; d number of lines per unit length; and

[0258] 3 is the angle of emergence.

[0259] Returns to the dynamic LLM agent system 200: The missing parameter - A subset of tools: Information retrieval (N tools). This set of tools is in charge of retrieving missing information from the database in order to perform actions. The missing information can be:

[0260] Current simulation id; Current simulation parts;

[0261] Web search;

[0262] Retrieving simulation results; and etc.

[0263] A subset of tools: System actions (N tools) - this set of tools is in charge of executing actions within the system. The actions can be

[0264] Running simulation;

[0265] Add an element from the database;

[0266] Delete an element;

[0267] Move an element; and etc.

[0268] Tool: Web Search - this tool allows the dynamic LLM agent system 200 to search the web for information, definitions, and formulas.

[0269] Tool: Code Executer - this tool allows the agent to run a piece of code on an external and secured machine in order to perform accurate calculations, perform API calls that it found or use libraries.

[0270] Hot Toolbox, T (two tools) - the context window 140:

[0271] Loading tool, ti.: Contains information about the tool name and how to gain access to it, as well as more information.

[0272] Arguments:

[0273] Tc, a subset of tools to gain access to and get information on how to use them.

[0274] When is called by the dynamic LLM agent system 200, performs:

[0275] From u’-i c T to w C T

[0276] Returns to the agent:

[0277] The names of the successfully added tools; and

[0278] Operation is therefore defined by loading set w to T by mentioning the requested tool names to II.

[0279] Unloading tool, tui a subset of tools to lose access to and lose the information on how to use them.

[0280] When is called by the agent, performs: From w C T to C T

[0281] Returns to the agent:

[0282] The names of the successfully lost tools; and

[0283] Operation ’J’r-' is therefore defined by unloading set w from T by mentioning the requested tool names to tu.

[0284] As well as the rest of the defined dynamic LLM agent system 200 properties:

[0285] Instructions, 7;

[0286] Next token sampling method, N ;

[0287] Tools usage (?’) instructions, Ur, and

[0288] The rest of the defined properties.

[0289] Non-limiting chained operation prompts examples:

[0290] User: “What will be the EFL of a symmetrical convex-convex lens made from N-BK7 glass of Schott, a central thickness of 5 mm, for a wavelength of 400 nm?”.

[0291] User: “Find me a diffraction grating that creates a 3 degrees angle between wavelengths of 300 nm and 600 nm”.

[0292] User: “Replace the ball lens with a ball lens that has a BFL of 100 mm”.

[0293] User: “What will be the results if I will use a lens that has an EFL of 100 mm instead of 90?”.

[0294] Non-limiting chained operation breakdown examples:

[0295] Let h be the chained and nested functions operation that are needed to perform the request from the user 100’s prompt “What will be the results if I will use a lens that has an EFL of 100 mm instead of 90?”. u' C lc be the tools that are needed for operation h, so that >-. • ••, UT}, where: the simulation information retrieval tool. the refractive index calculator tool. the symmetrical lens radii calculation tool (part of the lens maker the lens search tool. u-j is the elements replacement tool.

[0296] «6 is the run simulation tool. is the results retrieval tool.

[0297] Therefore, the operation h for a theoretical all-capable agent is defined to be wherein: , in, returned by Uti.

[0298] The dynamic LLM agent system 200 handles the tools loading and unloading by itself, so the exact batches can change. For the sake of the example, let’s consider.

[0299] Therefore, each operation tv) corresponds to a where i t {1, 2. 3} while for a theoretical all-capable agent with a toolbox I A operation h is performed successfully where Vt E T : t E T& state-of-the-art models cannot handle that operation with a direct approach. In addition, the embedding approach, which is used to allow the dynamic LLM agent system 200 access to huge databases of tools, also fails to successfully load functions that are not semantically close to the prompt, but are still needed for the operation. However, for the dynamic LLM agent system 200, the operation h is executed as: and is executed successfully.

[0300] It is to be noted, with reference to Fig. 3, that some of the blocks can be integrated, mutatis mutandis, into a consolidated block or can be broken down to a few blocks and / or other blocks may be added. It is to be further noted that some of the blocks are optional (for example: block 340). It should be also noted that whilst the flow diagram is described also with reference to the system elements that realizes them, this is by no means binding, and the blocks can be performed by elements other than those described herein.

[0301] Fig. 4 is an exemplary flowchart illustrating one example of a sequence of operations carried out for an LLM agent with dynamic next-token sampling methods, in accordance with the presently disclosed subject matter.

[0302] According to certain examples of the presently disclosed subject matter, dynamic LLM agent system 200 can be configured to perform a query response determination using dynamic next-token sampling methods process 400, e.g., utilizing the query response determination using next-token sampling methods module 250.

[0303] LLMs understand input and output text as strings of “tokens,” which can be words but also punctuation marks and parts of words. An LLM has some token selection parameters which control the randomness of output during inference or runtime. The method of selecting output tokens, specifically called token sampling methods or decoding strategies, is key in text generation with LLMs, for example: when the LLM provides a response to a query provided by the user 100. At its core, the technical underpinnings of token sampling involve constantly generating a mathematical function called a probability distribution to decide the next token (e.g., word) to output, taking into account all previously outputted tokens. For generating text, LLMs perform sampling which involves randomly picking the next word according to its conditional probability distribution. For the next-token sampling, LLMs do not always select the most probable next token. There are several methods to do so, such as: top-k, top-p, and temperature. Temperature in the context of next-token sampling methods is an hyperparameter used to generate the token probability distribution which influences the randomness of predictions. The temperature impacts the process of token sampling and can be leveraged to “tweak” the probability distribution over tokens. When the LLM uses the most probable token each time, the results are more consistent, deterministic, predictable, and generally considered to be more accurate. When the LLM uses less probable next tokens and deviates from the most probable token - the results will be less consistent, more random, and considered to be more “creative”. The dynamic LLM agent system 200 can perform the query response determination using dynamic next-token sampling methods process 400, in order to dynamically change the token sampling method mid-session. This is achieved by the dynamic LLM agent system 200 utilizing a sampling-informed LLM. The sampling-informed LLM has been: (a) informed of the one or more next-token sampling methods, and (b) instructed, based on the one or more next-token sampling methods and the query, to select a given next-token sampling method of the next-token sampling methods when providing a response to the query. Utilizing the sampling- informed LLM allows system 200 to control its own sampling technique, according to the needs of the ongoing task to provide a response to the query and based on the dynamic LLM agent system 200’ s understanding of the effects of the sampling technique on itself, it is able to tune the right token sampling parameter on the go, or even change the method, if needed.

[0304] For this purpose, system 200 can be configured to obtain an LLM that has been: (a) informed of the one or more next-token sampling methods, and (b) instructed, based on the one or more next-token sampling methods and the query, to select a given nexttoken sampling method of the next-token sampling methods when providing a response to the query, giving rise to a sampling-informed LLM (block 410). The sampling- informed LLM can be a dynamic LLM described above that can change itself by changing its own properties as needed. In this case, changing the property of the next-token sampling method utilized by the sampling informed LLM while responding to the query.

[0305] After obtaining the LLM, system 200 can be further configured to receive a query from the user 100 and provide the query to the sampling-informed LLM (block 420).

[0306] After receiving the query and providing it to the sampling-informed LLM, system 200 is further configured that upon the sampling-informed LLM selecting a given nexttoken sampling method, utilize the sampling-informed LLM with the given next-token sampling method to provide a response to the query (block 430).

[0307] System 200 is further configured to deliver the response to the query provided by the sampling-informed LLM to the user 100 of the system 200 (block 440).

[0308] A non-limiting possible formal presentation of the query response determination using dynamic next-token sampling methods process 400 is described herein: Let A be the dynamic LLM agent system 200 based on a sampling-informed LLM M, an internal state S, and tools 130 in a toolbox T.

[0309] Let A'i g S be the dynamic LLM agent system 200’ s token sampling method.

[0310] A t ~ {m, F}, where m is the sampling method and P is the set of its parameters.

[0311] Let tc G T a tool that changes a parameter in A7:l.

[0312] Operation 'I’c is defined to be activated by the dynamic LLM agent system 200 A so that $0(3] . tc) changing A'r (either m or P ' > € F).

[0313] A non-limiting example of the query response determination using dynamic nexttoken sampling methods process 400 can be a use case of an article-generation task, that was given to the dynamic LLM agent system 200. Possible static tools 130 that the dynamic LLM agent system 200 might have are web searching tools for information retrieval, certain API request tools, or any other static tool. Let’s consider a dynamic tool that allows the dynamic LLM agent system 200 to tune its temperature between a range of 0 and 1 - where 0 is the least noise and 1 is the most noise. The dynamic LLM agent system 200 that was built with a dynamic approach, will be able to access this tool, understand its meaning, and calibrate its own temperature for different phases of the task. Let’s assume that the dynamic LLM agent system 200 started their session to respond to the query with a temperature of 0.6. When working on the headline, the task will require a higher level of creativity (and repetition is not valued), so that the dynamic LLM agent system 200 will set its temperature to 0.8, while information processing has to be as accurate as possible, so the agent will proceed on 0.1.

[0314] It is to be noted, with reference to Fig. 4, that some of the blocks can be integrated, mutatis mutandis, into a consolidated block or can be broken down to a few blocks and / or other blocks may be added. It is to be further noted that some of the blocks are optional. It should also be noted that whilst the flow diagram is described also with reference to the system elements that realize them, this is by no means binding, and the blocks can be performed by elements other than those described herein.

[0315] Fig. 5 is an exemplary flowchart illustrating one example of a sequence of operations carried out for an LLM agent with dynamic architecture, in accordance with the presently disclosed subject matter According to certain examples of the presently disclosed subject matter, dynamic LLM agent system 200 can be configured to perform a query response determination using dynamic architecture process 500, e.g., utilizing the query response determination using dynamic architecture module 260.

[0316] It is noted that LLM capabilities are advancing at a rapid rate when new and capable models are being released regularly. There is thus a need for upgrading infrastructure and agent design is constantly happening. Dynamic LLM agent system 200 can have varying tasks - spreading across various domains and tasks, a fact that might raise the need for fine-tuning on-the-go. The dynamic LLM agent system 200 can modify its own architecture and base model by utilizing a model-informed LLM. The model- informed LLM is a dynamic LLM that has been: (a) informed of the one or more base models, and (b) instructed, based on the one or more base model and the query, to select a given base model of the base models when providing a response to the query. The change of the base model by the model informed LLM can occur when and if a more capable version is released, leveraging its ability to understand how certain actions will affect itself. Moreover, in the case of a specific task, the dynamic LLM agent system 200 is able to generate synthetic data that suits the task and fine-tune itself, or create a duplicated, fine-tuned version of itself, with minimal friction.

[0317] A non-limiting possible formal presentation of the query response determination using dynamic architecture process 500 is described herein:

[0318] Let A be the dynamic LLM agent system 200 with an internal state S, and a toolbox tools 130 T.

[0319] Let € S be the dynamic LLM agent system 200’ s base model.

[0320] Let IM G T a tool of tools 130 that changes the base model M. tAi can be, of course, many things, such as a tool that changes -'A to M (Llama- 1 to Llama-2, for example) fine-tune data generation and training in order to generate and then replace it.

[0321] Operation ‘Ifw is defined to be activated by the dynamic LLM agent system 200 A For this purpose, system 200 can be configured to obtain an obtain an LLM that has been: (a) informed of the one or more base models, and (b) instructed, based on the one or more base model and the query, to select a given base model of the base models when providing a response to the query, giving rise to a model-informed LLM (block 510). The model-informed LLM can be a dynamic LLM described above that can change itself by changing its own properties as needed. In this case, changing the property of the base model utilized by the model-informed LLM while responding to the query.

[0322] After obtaining the LLM, system 200 can be further configured to receive a query from the user 100 and provide the query to the model-informed LLM (block 520).

[0323] After receiving the query and providing it to the model-informed LLM, system 200 is further configured that upon the model-informed LLM selecting a given base model, utilize the model-informed LLM with the given base model to provide a response to the query (block 530).

[0324] System 200 is further configured to deliver the response to the query provided by the sampling-informed LLM to the user 100 of the system 200 (block 540).

[0325] It is to be noted, with reference to Fig. 5, that some of the blocks can be integrated, mutatis mutandis, into a consolidated block or can be broken down to a few blocks and / or other blocks may be added. It is to be further noted that some of the blocks are optional. It should also be noted that whilst the flow diagram is described also with reference to the system elements that realize them, this is by no means binding, and the blocks can be performed by elements other than those described herein.

[0326] It is to be understood that the presently disclosed subject matter is not limited in its application to the details set forth in the description contained herein or illustrated in the drawings. The presently disclosed subject matter is capable of other embodiments and of being practiced and carried out in various ways. Hence, it is to be understood that the phraseology and terminology employed herein are for the purpose of description and should not be regarded as limiting. As such, those skilled in the art will appreciate that the conception upon which this disclosure is based may readily be utilized as a basis for designing other structures, methods, and systems for carrying out the several purposes of the present presently disclosed subject matter.

[0327] It will also be understood that the system, according to the presently disclosed subject matter, can be implemented, at least partly, as a suitably programmed computer. Likewise, the presently disclosed subject matter contemplates a computer program being readable by a computer for executing the disclosed method. The presently disclosed subject matter further contemplates a machine-readable memory tangibly embodying a program of instructions executable by the machine for executing the disclosed method.

Claims

CLAIMS:

1. A dynamic Large Language Model (LLM), comprising an LLM having one or more properties, capable of:(a) receiving a query from a user;(b) changing, based on the query, at least one property of the properties; and(c) providing a response to the query utilizing the LLM with the at least one changed property.

2. A tool-informed Large Language Model (LLM), comprising the dynamic LLM of claim 1, capable of receiving a query from a user and providing a response to the query, wherein the at least one property is associated with one or more tools available to the dynamic LLM and wherein: the dynamic LLM is: (a) informed of the one or more tools, (b) instructed to request a loading of a given tool of the tools when encountering a query the LLM can provide a first response to with the given tool, wherein the first response is better than a second response capable of being provided to the query by the LLM without the given tool, and (c) instructed to request an unloading of a given tool of the tools when encountering a query the LLM can provide the response to without the given tool, giving rise to the tool-informed LLM.

3. The tool-informed LLM of claim 2, wherein the LLM is informed of the one or more tools by providing the LLM with tool descriptions associated with the one or more tools.

4. A system of a Large Language Model (LLM) agent with dynamic tools, the system comprising: (a) an LLM, capable of receiving a query from a user of the system and providing a response to the query, (b) a context window,comprising past queries provided by the user to the system and additional information available to the LLM, wherein the LLM provides the response based also on the context window, (c) one or more tools, each tool is associated with: (i) a tool description, describing a purpose of the tool, and (ii) a tool function information, enabling the LLM to solve a problem associated with the tool utilizing the tool function information, and (d) a processing circuitry configured to:(A) obtain the tool-informed LLM of claim 2, utilized to be the LLM of the system wherein the tool-informed LLM is provided with the tool descriptions associated with the one or more tools;(B) receive a query from the user and provide the query to the tool- informed LLM;(C) upon the tool-informed LLM requesting the loading of an additional given tool of the tools in order to be able to provide the response to the query, add the tool function information associated with the additional given tool to the context window;(D)upon the tool-informed LLM requesting the unloading of an additional given tool of the tools, as the tool-informed LLM can provide the response to the query without the additional given tool, remove the tool function information associated with the additional given tool from the context window;(E) repeat (C)-(D) until the tool-informed LLM can provide the response to the query;(F) deliver the response to the query provided by the tool-informed LLM to the user of the system.

5. The system of claim 4, wherein the tool function information can be associated with: (a) a predefined function that directly changes the LLM, or (b) predefined utility that performs actions that are external to the LLM.

6. The system of claim 4, wherein the tool-informed LLM can concurrently load up to a first threshold number of tools.

7. The system of claim 4, wherein the query is associated with optical design and wherein at least one tool of the one or more tools is an optical design tool.

8. The system of claim 4, wherein the query is associated with search and wherein at least one tool of the one or more tools is a search tool.

9. The system of claim 4, wherein the query is associated with an optical search and wherein at least one tool of the one or more tools is an optical search tool.

10. A system of a Large Language Model (LLM) agent with dynamic tools, the system comprising: (a) an LLM, capable of receiving a query from a user of the system and providing a response to the query, (b) a context window, comprising past queries provided by the user to the system and additional information available to the LLM, wherein the LLM provides the response based also on the context window (c) one or more tools, each tool is associated with: (i) a tool description, describing a purpose of the tool, and (ii) a tool function information, enabling the LLM to solve a problem associated with the tool utilizing the tool function information, (d) a curator model, capable of: (i) receiving a request for loading of a given tool of the one or more tools and providing a list of one or more correlated tools of the tools, being tools that are associated with the given tool, and (ii) receiving a request for unloading of a given tool of the one or more tools and providing a list of one or more correlated tools of the tools, being tools that are associated with the given tool, and (e) a processing circuitry configured to:(A) obtain the tool-informed LLM of claim 2, utilized to be the LLM of the system wherein the tool-informed LLM is provided with the tool descriptions associated with the one or more tools;(B) receive a query from the user and provide the query to the tool- informed LLM;(C) upon the tool-informed LLM requesting the loading of an additional given tool of the tools in order to be able to provide a response to the query, utilize the curator model to receive the list of one or more correlated tools, correlated to the additional given tool, and add the oneor more tool function information associated with the one or more correlated tools to the context window;(D)upon the tool-informed LLM requesting the unloading of an additional given tool of the tools, as the tool-informed LLM can provide the response to the query without the additional given tool, utilize the curator model to receive the list of one or more correlated tools, correlated to the additional given tool, and remove the one or more tool function information associated with the one or more correlated tools from the context window;(E) repeat (C)-(D) until the tool-informed LLM can provide the response to the query;(F) deliver the response to the query provided by the tool-informed LLM to the user of the system.

11. The system of claim 10, wherein the tool function information can be associated with: (a) a predefined function that directly changes the LLM, or (b) predefined utility that performs actions that are external to the LLM.

12. The system of claim 10, wherein the tool-informed LLM can concurrently load up to a first threshold number of tools.

13. The system of claim 10, wherein the query is associated with optical design and wherein at least one tool of the one or more tools is an optical design tool.

14. The system of claim 10, wherein the query is associated with search and wherein at least one tool of the one or more tools is a search tool.

15. The system of claim 10, wherein the query is associated with an optical search and wherein at least one tool of the one or more tools is an optical search tool.

16. A system of a Large Language Model (LLM) agent with dynamic tools, the system comprising: (a) an LLM, capable of receiving a query from a user of the system and providing a response to the query, (b) a context window,comprising past queries provided by the user to the system and additional information available to the LLM, wherein the LLM provides the response based also on the context window (c) one or more tools, each tool is associated with: (i) a tool description, describing a purpose of the tool, and (ii) a tool function information, enabling the LLM to solve a problem associated with the tool utilizing the tool function information, (d) a curator model, capable of: (i) receiving a request for loading of a given tool of the one or more tools and providing a list of one or more correlated tools, being tools of the tools that are associated with the given tool and a specification of one or more new correlated tools, being tools that are associated with the given tool and are not part of the one or more tools, and (ii) receiving a request for unloading of a given tool of the one or more tools and providing a list of one or more correlated tools of the tools, being tools that are associated with the given tool, (e) a tool generating model, capable of receiving a specification of one or more new tools that are not part of the one or more tools and generating the one or more new tools, and (f) a processing circuitry configured to:(A) obtain the tool-informed LLM of claim 2, utilized to be the LLM of the system wherein the tool-informed LLM is provided with the tool descriptions associated with the one or more tools;(B) receive a query from the user and provide the query to the tool- informed LLM;(C) upon the tool-informed LLM requesting the loading of an additional given tool of the tools in order to be able to provide a response to the query, utilize the curator model to receive the list of the one or more correlated tools and the specification of the list of one or more new correlated tools, correlated to the additional given tool, generate one or more new tools, utilizing the tool generating model and the specification of the list of one or more new correlated tools and add the one or more tool function information associated with the one or more correlated tools and with the one or more new correlated tools to the context window;(D)upon the tool-informed LLM requesting the unloading of an additional given tool of the tools, as the tool-informed LLM can provide theresponse to the query without the additional given tool, utilize the curator model to receive the list of one or more correlated tools, correlated to the additional given tool, and remove the one or more tool function information associated with the one or more correlated tools from the context window;(E) repeat (C)-(D) until the tool-informed LLM can provide the response to the query;(F) deliver the response to the query provided by the tool-informed LLM to the user of the system.

17. The system of claim 16, wherein the tool function information can be associated with: (a) a predefined function that directly changes the LLM, or (b) predefined utility that performs actions that are external to the LLM.

18. The system of claim 16, wherein the tool -informed LLM can concurrently load up to a first threshold number of tools.

19. The system of claim 16, wherein the query is associated with optical design and wherein at least one tool of the one or more tools is an optical design tool.

20. The system of claim 16, wherein the query is associated with search and wherein at least one tool of the one or more tools is a search tool.

21. The system of claim 16, wherein the query is associated with an optical search and wherein at least one tool of the one or more tools is an optical search tool.

22. A system of a Large Language Model (LLM) agent with dynamic tools, the system comprising: (a) an LLM, capable of receiving a query from a user of the system and providing a response to the query, (b) a context window, comprising past queries provided by the user to the system and additional information available to the LLM, wherein the LLM provides the response based also on the context window (c) one or more tools, each tool is associated with: (i) a tool description, describing a purpose of the tool, and (ii) a toolfunction information, enabling the LLM to solve a problem associated with the tool utilizing the tool function information, (d) a tool generating model, capable of receiving a specification of one or more new tools that are not part of the one or more tools and generating the one or more new tools, and (f) a processing circuitry configured to:(A) obtain the tool-informed LLM of claim 2, utilized to be the LLM of the system wherein the tool-informed LLM is provided with the tool descriptions associated with the one or more tools and wherein the tool-informed LLM is further capable of requesting a specification of one or more new tools, being tools that are required to provide a response to the query and are not part of the one or more tools;(B) receive a query from the user and provide the query to the tool- informed LLM;(C) upon the tool-informed LLM requesting the loading of an additional given tool of the tools in order to be able to provide the response to the query, add the tool function information associated with the additional given tool to the context window;(D)upon the tool-informed LLM requesting the unloading of an additional given tool of the tools, as the tool-informed LLM can provide the response to the query without the additional given tool, remove the tool function information associated with the additional given tool from the context window;(E) upon the tool-informed LLM requesting a given specification of one or more new tools, generate the one or more new tools, utilizing the tool generating model and the specification and add the one or more tool function information associated with the one or more new tools to the context window;(F) repeat (C)-(E) until the tool-informed LLM can provide the response to the query;(G) deliver the response to the query provided by the tool -informed LLM to the user of the system.

23. The system of claim 22, wherein the tool function information can be associated with: (a) a predefined function that directly changes the LLM, or (b) predefined utility that performs actions that are external to the LLM.

24. The system of claim 22, wherein the tool-informed LLM can concurrently load up to a first threshold number of tools.

25. The system of claim 22, wherein the query is associated with optical design and wherein at least one tool of the one or more tools is an optical design tool.

26. The system of claim 22, wherein the query is associated with search and wherein at least one tool of the one or more tools is a search tool.

27. The system of claim 22, wherein the query is associated with an optical search and wherein at least one tool of the one or more tools is an optical search tool.

28. A method for a dynamic Large Language Model (LLM), the method comprising:(a) receiving, by an LLM having one or more properties, a query from a user;(b) changing, by the LLM having one or more properties , based on the query, at least one property of the properties; and(c) providing, by the LLM having one or more properties, a response to the query utilizing the LLM with the at least one changed property.

29. A method for a tool-informed Large Language Model (LLM), the method comprising:(a) informing the dynamic LLM of claim 28, which is capable of receiving a query from a user and providing a response to the query, wherein the at least one property is associated with one or more tools available to the dynamic LLM, of the one or more tools, (b) instructing, the dynamic LLM, to request a loading of a given tool of the tools when encountering a query the LLM can provide a first response to with thegiven tool, wherein the first response is better than a second response capable of being provided to the query by the LLM without the given tool, and (c) instructing, the dynamic LLM, to request an unloading of a given tool of the tools when encountering a query the LLM can provide the response to without the given tool, giving rise to the tool-informed LLM.

30. The method of claim 29, wherein the LLM is informed of the one or more tools by providing the LLM with tool descriptions associated with the one or more tools.

31. A method for a Large Language Model (LLM) agent with dynamic tools, the method comprising:(A) obtaining, by a processing circuitry, the tool-informed LLM of claim 30, utilized to be an LLM capable of receiving a query from a user of the system and providing a response to the query, wherein the tool- informed LLM is provided with descriptions associated with the one or more tools, each tool is associated with: (i) a tool description, describing a purpose of the tool, and (ii) a tool function information, enabling the LLM to solve a problem associated with the tool utilizing the tool function information;(B) receiving, by the processing circuitry, a query from the user and provide the query to the tool-informed LLM;(C) upon the tool-informed LLM requesting the loading of an additional given tool of the tools in order to be able to provide the response to the query, adding, by the processing circuitry, the tool function information associated with the additional given tool to a context window comprising past queries provided by the user to the system and additional information available to the tool-informed LLM, wherein the tool-informed LLM provides the response based also on the context window;(D)upon the tool-informed LLM requesting the unloading of an additional given tool of the tools, as the tool-informed LLM can provide theresponse to the query without the additional given tool, removing, by the processing circuitry, the tool function information associated with the additional given tool from the context window;(E) repeating (C)-(D), by the processing circuitry, until the tool-informed LLM can provide the response to the query;(F) delivering, by the processing circuitry, the response to the query provided by the tool-informed LLM to the user of the system.

32. The method of claim 31, wherein the tool function information can be associated with: (a) a predefined function that directly changes the LLM, or (b) predefined utility that performs actions that are external to the LLM.

33. The method of claim 31, wherein the tool-informed LLM can concurrently load up to a first threshold number of tools.

34. The method of claim 31, wherein the query is associated with optical design and wherein at least one tool of the one or more tools is an optical design tool.

35. The method of claim 31, wherein the query is associated with search and wherein at least one tool of the one or more tools is a search tool.

36. The method of claim 31, wherein the query is associated with an optical search and wherein at least one tool of the one or more tools is an optical search tool.

37. A method for a Large Language Model (LLM) agent with dynamic tools, the method comprising:(A) obtaining, by a processing circuitry, the tool-informed LLM of claim 30, capable of receiving a query from a user of the system and providing a response to the query, wherein the tool-informed LLM is provided with tool descriptions associated with the one or more tools, each tool is associated with: (i) a tool description, describing a purpose of the tool, and (ii) a tool function information, enabling the LLM tosolve a problem associated with the tool utilizing the tool function information;(B) receiving, by the processing circuitry, a query from the user and provide the query to the tool-informed LLM;(C) upon the tool-informed LLM requesting the loading of an additional given tool of the tools in order to be able to provide a response to the query, utilizing, by the processing circuitry, a curator model, capable of: (i) receiving a request for loading of a given tool of the one or more tools and providing a list of one or more correlated tools of the tools, being tools that are associated with the given tool, and (ii) receiving a request for unloading of a given tool of the one or more tools and providing a list of one or more correlated tools of the tools, being tools that are associated with the given tool, to receive the list of one or more correlated tools, correlated to the additional given tool, and add the one or more tool function information associated with the one or more correlated tools to the context window;(D)upon the tool-informed LLM requesting the unloading of an additional given tool of the tools, as the tool-informed LLM can provide the response to the query without the additional given tool, utilizing, by the processing circuitry, the curator model to receive the list of one or more correlated tools, correlated to the additional given tool, and remove the one or more tool function information associated with the one or more correlated tools from the context window;(E) repeating (C)-(D), by the processing circuitry, until the tool-informed LLM can provide the response to the query;(F) delivering, by the processing circuitry, the response to the query provided by the tool-informed LLM to the user of the system.

38. The method of claim 37, wherein the tool function information can be associated with: (a) a predefined function that directly changes the LLM, or (b) predefined utility that performs actions that are external to the LLM.

39. The method of claim 37, wherein the tool-informed LLM can concurrently load up to a first threshold number of tools.

40. The method of claim 37, wherein the query is associated with optical design and wherein at least one tool of the one or more tools is an optical design tool.

41. The method of claim 37, wherein the query is associated with search and wherein at least one tool of the one or more tools is a search tool.

42. The method of claim 37, wherein the query is associated with an optical search and wherein at least one tool of the one or more tools is an optical search tool.

43. A method for a Large Language Model (LLM) agent with dynamic tools, the method comprising:(A) obtaining, by a processing circuitry, the tool-informed LLM of claim 30, capable of receiving a query from a user of the system and providing a response to the query, wherein the tool-informed LLM is provided with tool descriptions associated with the one or more tools, each tool is associated with: (i) a tool description, describing a purpose of the tool, and (ii) a tool function information, enabling the LLM to solve a problem associated with the tool utilizing the tool function information;(B) receiving, by the processing circuitry, a query from the user and provide the query to the tool-informed LLM;(C) upon the tool-informed LLM requesting the loading of an additional given tool of the tools in order to be able to provide a response to the query, utilizing, by the processing circuitry, a curator model, capable of: (i) receiving a request for loading of a given tool of the one or more tools and providing a list of one or more correlated tools, being tools of the tools that are associated with the given tool and a specification of one or more new correlated tools, being tools that are associated with the given tool and are not part of the one or more tools, and (ii) receiving a request for unloading of a given tool of the one or moretools and providing a list of one or more correlated tools of the tools, being tools that are associated with the given tool, to receive the list of the one or more correlated tools and the specification of the list of one or more new correlated tools, correlated to the additional given tool, and generating, by the processing circuitry, one or more new tools, utilizing a tool generating model, capable of receiving a specification of one or more new tools that are not part of the one or more tools and generating the one or more new tools, and the specification of the list of one or more new correlated tools and add the one or more tool function information associated with the one or more correlated tools and with the one or more new correlated tools to the context window;(D)upon the tool-informed LLM requesting the unloading of an additional given tool of the tools, as the tool-informed LLM can provide the response to the query without the additional given tool, utilizing, by the processing circuitry, the curator model to receive the list of one or more correlated tools, correlated to the additional given tool, and remove the one or more tool function information associated with the one or more correlated tools from the context window;(E) repeating (C)-(D), by the processing circuitry, until the tool-informed LLM can provide the response to the query;(F) delivering, by the processing circuitry, the response to the query provided by the tool-informed LLM to the user of the system.

44. The method of claim 43, wherein the tool function information can be associated with: (a) a predefined function that directly changes the LLM, or (b) predefined utility that performs actions that are external to the LLM.

45. The method of claim 43, wherein the tool -informed LLM can concurrently load up to a first threshold number of tools.

46. The method of claim 43, wherein the query is associated with optical design and wherein at least one tool of the one or more tools is an optical design tool.

47. The method of claim 43, wherein the query is associated with search and wherein at least one tool of the one or more tools is a search tool.

48. The method of claim 43, wherein the query is associated with an optical search and wherein at least one tool of the one or more tools is an optical search tool.

49. A method for a Large Language Model (LLM) agent with dynamic tools, the method comprising:(A) obtaining, by a processing circuitry, the tool-informed LLM of claim 30, capable of receiving a query from a user of the system and providing a response to the query, wherein the tool-informed LLM is provided with tool descriptions associated with the one or more tools, each tool is associated with: (i) a tool description, describing a purpose of the tool, and (ii) a tool function information, enabling the LLM to solve a problem associated with the tool utilizing the tool function information, and wherein the tool-informed LLM is further capable of requesting a specification of one or more new tools, being tools that are required to provide a response to the query and are not part of the one or more tools;(B) receiving, by the processing circuitry, a query from the user and provide the query to the tool-informed LLM;(C) upon the tool-informed LLM requesting the loading of an additional given tool of the tools in order to be able to provide the response to the query, adding, by the processing circuitry, the tool function information associated with the additional given tool to a context window comprising past queries provided by the user to the system and additional information available to the tool-informed LLM, wherein the tool-informed LLM provides the response based also on the context window;(D)upon the tool-informed LLM requesting the unloading of an additional given tool of the tools, as the tool-informed LLM can provide the response to the query without the additional given tool, removing, bythe processing circuitry, the tool function information associated with the additional given tool from the context window;(E) upon the tool-informed LLM requesting a given specification of one or more new tools, generating, by the processing circuitry, the one or more new tools, utilizing a tool generating model, capable of receiving a specification of one or more new tools that are not part of the one or more tools and generating the one or more new tools, and the specification and add the one or more tool function information associated with the one or more new tools to the context window;(F) repeating (C)-(E), by the processing circuitry, until the tool-informed LLM can provide the response to the query;(G) delivering, by the processing circuitry, the response to the query provided by the tool-informed LLM to the user of the system.

50. The method of claim 49, wherein the tool function information can be associated with: (a) a predefined function that directly changes the LLM, or (b) predefined utility that performs actions that are external to the LLM.

51. The method of claim 49, wherein the tool -informed LLM can concurrently load up to a first threshold number of tools.

52. The method of claim 49, wherein the query is associated with optical design and wherein at least one tool of the one or more tools is an optical design tool.

53. The method of claim 49, wherein the query is associated with search and wherein at least one tool of the one or more tools is a search tool.

54. The method of claim 49, wherein the query is associated with an optical search and wherein at least one tool of the one or more tools is an optical search tool.

55. A non-transitory computer readable storage medium having computer readable program code embodied therewith, the computer readable program code, executable by at least one processing circuitry of a computer to performa method for determining a risk score associated with a transaction, the method comprising:(A) obtaining, by a processing circuitry, the tool-informed LLM of claim 30, utilized to be an LLM capable of receiving a query from a user of the system and providing a response to the query, wherein the tool- informed LLM is provided with descriptions associated with the one or more tools, each tool is associated with: (i) a tool description, describing a purpose of the tool, and (ii) a tool function information, enabling the LLM to solve a problem associated with the tool utilizing the tool function information;(B) receiving, by the processing circuitry, a query from the user and provide the query to the tool-informed LLM;(C) upon the tool-informed LLM requesting the loading of an additional given tool of the tools in order to be able to provide the response to the query, adding, by the processing circuitry, the tool function information associated with the additional given tool to a context window comprising past queries provided by the user to the system and additional information available to the tool-informed LLM, wherein the tool-informed LLM provides the response based also on the context window;(D)upon the tool-informed LLM requesting the unloading of an additional given tool of the tools, as the tool-informed LLM can provide the response to the query without the additional given tool, removing, by the processing circuitry, the tool function information associated with the additional given tool from the context window;(E) repeating (C)-(D), by the processing circuitry, until the tool-informed LLM can provide the response to the query;(F) delivering, by the processing circuitry, the response to the query provided by the tool-informed LLM to the user of the system.

56. A non-transitory computer readable storage medium having computer readable program code embodied therewith, the computer readable program code, executable by at least one processing circuitry of a computer to performa method for determining a risk score associated with a transaction, the method comprising:(A) obtaining, by a processing circuitry, the tool-informed LLM of claim 30, capable of receiving a query from a user of the system and providing a response to the query, wherein the tool-informed LLM is provided with tool descriptions associated with the one or more tools, each tool is associated with: (i) a tool description, describing a purpose of the tool, and (ii) a tool function information, enabling the LLM to solve a problem associated with the tool utilizing the tool function information;(B) receiving, by the processing circuitry, a query from the user and provide the query to the tool-informed LLM;(C) upon the tool-informed LLM requesting the loading of an additional given tool of the tools in order to be able to provide a response to the query, utilizing, by the processing circuitry, a curator model, capable of: (i) receiving a request for loading of a given tool of the one or more tools and providing a list of one or more correlated tools of the tools, being tools that are associated with the given tool, and (ii) receiving a request for unloading of a given tool of the one or more tools and providing a list of one or more correlated tools of the tools, being tools that are associated with the given tool, to receive the list of one or more correlated tools, correlated to the additional given tool, and add the one or more tool function information associated with the one or more correlated tools to the context window;(D)upon the tool-informed LLM requesting the unloading of an additional given tool of the tools, as the tool-informed LLM can provide the response to the query without the additional given tool, utilizing, by the processing circuitry, the curator model to receive the list of one or more correlated tools, correlated to the additional given tool, and remove the one or more tool function information associated with the one or more correlated tools from the context window;(E) repeating (C)-(D), by the processing circuitry, until the tool-informed LLM can provide the response to the query;delivering, by the processing circuitry, the response to the query provided by the tool-informed LLM to the user of the system.

57. A non-transitory computer readable storage medium having computer readable program code embodied therewith, the computer readable program code, executable by at least one processing circuitry of a computer to perform a method for determining a risk score associated with a transaction, the method comprising:(A) obtaining, by a processing circuitry, the tool-informed LLM of claim 30, capable of receiving a query from a user of the system and providing a response to the query, wherein the tool-informed LLM is provided with tool descriptions associated with the one or more tools, each tool is associated with: (i) a tool description, describing a purpose of the tool, and (ii) a tool function information, enabling the LLM to solve a problem associated with the tool utilizing the tool function information;(B) receiving, by the processing circuitry, a query from the user and provide the query to the tool-informed LLM;(C) upon the tool-informed LLM requesting the loading of an additional given tool of the tools in order to be able to provide a response to the query, utilizing, by the processing circuitry, a curator model, capable of: (i) receiving a request for loading of a given tool of the one or more tools and providing a list of one or more correlated tools, being tools of the tools that are associated with the given tool and a specification of one or more new correlated tools, being tools that are associated with the given tool and are not part of the one or more tools, and (ii) receiving a request for unloading of a given tool of the one or more tools and providing a list of one or more correlated tools of the tools, being tools that are associated with the given tool, to receive the list of the one or more correlated tools and the specification of the list of one or more new correlated tools, correlated to the additional given tool, and generating, by the processing circuitry, one or more new tools, utilizing a tool generating model, capable of receiving a specificationof one or more new tools that are not part of the one or more tools and generating the one or more new tools, and the specification of the list of one or more new correlated tools and add the one or more tool function information associated with the one or more correlated tools and with the one or more new correlated tools to the context window;(D)upon the tool-informed LLM requesting the unloading of an additional given tool of the tools, as the tool-informed LLM can provide the response to the query without the additional given tool, utilizing, by the processing circuitry, the curator model to receive the list of one or more correlated tools, correlated to the additional given tool, and remove the one or more tool function information associated with the one or more correlated tools from the context window;(E) repeating (C)-(D), by the processing circuitry, until the tool-informed LLM can provide the response to the query;(F) delivering, by the processing circuitry, the response to the query provided by the tool-informed LLM to the user of the system.

58. A non-transitory computer readable storage medium having computer readable program code embodied therewith, the computer readable program code, executable by at least one processing circuitry of a computer to perform a method for determining a risk score associated with a transaction, the method comprising:(A) obtaining, by a processing circuitry, the tool-informed LLM of claim 30, capable of receiving a query from a user of the system and providing a response to the query, wherein the tool-informed LLM is provided with tool descriptions associated with the one or more tools, each tool is associated with: (i) a tool description, describing a purpose of the tool, and (ii) a tool function information, enabling the LLM to solve a problem associated with the tool utilizing the tool function information, and wherein the tool-informed LLM is further capable of requesting a specification of one or more new tools, being tools that are required to provide a response to the query and are not part of the one or more tools;(B) receiving, by the processing circuitry, a query from the user and provide the query to the tool-informed LLM;(C) upon the tool-informed LLM requesting the loading of an additional given tool of the tools in order to be able to provide the response to the query, adding, by the processing circuitry, the tool function information associated with the additional given tool to a context window comprising past queries provided by the user to the system and additional information available to the tool-informed LLM, wherein the tool-informed LLM provides the response based also on the context window;(D)upon the tool-informed LLM requesting the unloading of an additional given tool of the tools, as the tool-informed LLM can provide the response to the query without the additional given tool, removing, by the processing circuitry, the tool function information associated with the additional given tool from the context window;(E) upon the tool-informed LLM requesting a given specification of one or more new tools, generating, by the processing circuitry, the one or more new tools, utilizing a tool generating model, capable of receiving a specification of one or more new tools that are not part of the one or more tools and generating the one or more new tools, and the specification and add the one or more tool function information associated with the one or more new tools to the context window;(F) repeating (C)-(E), by the processing circuitry, until the tool-informed LLM can provide the response to the query;(G) delivering, by the processing circuitry, the response to the query provided by the tool-informed LLM to the user of the system.

59. A system of a Large Language Model (LLM) agent with dynamic next-token sampling methods, the system comprising: (a) the dynamic LLM of claim 1, capable of receiving a query from a user of the system and providing a response to the query, the dynamic LLM is associated with one or more nexttoken sampling methods, being methods that control the next-token selection of the dynamic LLM, wherein the at least one property is associated with theone or more next-token sampling methods available to the dynamic LLM, and (b) a processing circuitry configured to:(A) obtain the dynamic LLM, that has been: (a) informed of the one or more next-token sampling methods, and (b) instructed, based on the one or more next-token sampling methods and the query, to select a given next-token sampling method of the next-token sampling methods when providing a response to the query, giving rise to a sampling-informed LLM;(B) receive a query from the user and provide the query to the sampling- informed LLM;(C)upon the sampling-informed LLM selecting a given next-token sampling method, utilize the sampling-informed LLM with the given next-token sampling method to provide a response to the query;(D) deliver the response to the query provided by the sampling-informed LLM to the user of the system.

60. The system of claim 59, wherein the next-token sampling methods include one or more of: top-k, top-p, or temperature.

61. A method for a Large Language Model (LLM) agent with dynamic next-token sampling methods, the method comprising:(A) obtaining, by a processing circuitry, the dynamic LLM of claim 28, capable of receiving a query from a user of the system and providing a response to the query, the dynamic LLM is associated with one or more next-token sampling methods, being methods that control the next-token selection of the dynamic LLM, wherein the at least one property is associated with the one or more next-token sampling methods available to the dynamic LLM, that has been: (a) informed of the one or more next-token sampling methods, and (b) instructed, based on the one or more next-token sampling methods and the query, to select a given next-token sampling method of the next-token sampling methods when providing a response to the query, giving rise to a sampling-informed LLM;(B) receiving, by the processing circuitry, a query from the user and provide the query to the sampling-informed LLM;(C)upon the sampling-informed LLM selecting a given next-token sampling method, utilizing, by the processing circuitry, the sampling- informed LLM with the given next-token sampling method to provide a response to the query;(D) delivering, by the processing circuitry, the response to the query provided by the sampling-informed LLM to the user of the system.

62. The method of claim 61, wherein the next-token sampling methods include one or more of: top-k, top-p, or temperature.

63. A non-transitory computer readable storage medium having computer readable program code embodied therewith, the computer readable program code, executable by at least one processing circuitry of a computer to perform a method for determining a risk score associated with a transaction, the method comprising:(A) obtaining, by a processing circuitry, the dynamic LLM of claim 28, capable of receiving a query from a user of the system and providing a response to the query, the dynamic LLM is associated with one or more next-token sampling methods, being methods that control the next-token selection of the dynamic LLM, wherein the at least one property is associated with the one or more next-token sampling methods available to the dynamic LLM, that has been: (a) informed of the one or more next-token sampling methods, and (b) instructed, based on the one or more next-token sampling methods and the query, to select a given next-token sampling method of the next-token sampling methods when providing a response to the query, giving rise to a sampling-informed LLM;(B) receiving, by the processing circuitry, a query from the user and provide the query to the sampling-informed LLM;(C)upon the sampling-informed LLM selecting a given next-token sampling method, utilizing, by the processing circuitry, the sampling-informed LLM with the given next-token sampling method to provide a response to the query;(D) delivering, by the processing circuitry, the response to the query provided by the sampling-informed LLM to the user of the system.

64. A system of a Large Language Model (LLM) agent with dynamic architecture, the system comprising: (a) the dynamic LLM, capable of receiving a query from a user of the system and providing a response to the query, the dynamic LLM is associated with one or more base models utilized by the dynamic LLM to generate the response wherein the at least one property is associated with the one or more base models, and (b) a processing circuitry configured to:(A) obtain the dynamic LLM of claim 1, that has been: (a) informed of the one or more base models, and (b) instructed, based on the one or more base model and the query, to select a given base model of the base models when providing a response to the query, giving rise to a model- informed LLM;(B) receive a query from the user and provide the query to the model- informed LLM;(C) upon the model-informed LLM selecting a given base model, utilize the model-informed LLM with the given base model to provide a response to the query;(D) deliver the response to the query provided by the model -informed LLM to the user of the system.

65. A method of a Large Language Model (LLM) agent with dynamic architecture, the method comprising:(A) obtaining, by a processing circuitry, the dynamic LLM of claim 28, capable of receiving a query from a user of the system and providing a response to the query, the dynamic LLM is associated with one or more base models utilized by the dynamic LLM to generate the response wherein the at least one property is associated with the one or more base models, that has been: (a) informed of the one or more base models, and (b) instructed, based on the one or more base modeland the query, to select a given base model of the base models when providing a response to the query, giving rise to a model-informed LLM;(B) receiving, by the processing circuitry, a query from the user and provide the query to the model-informed LLM;(C) upon the model-informed LLM selecting a given base model, utilizing, by the processing circuitry, the model-informed LLM with the given base model to provide a response to the query;(D) delivering, by the processing circuitry, the response to the query provided by the model-informed LLM to the user of the system.

66. A non-transitory computer readable storage medium having computer readable program code embodied therewith, the computer readable program code, executable by at least one processing circuitry of a computer to perform a method for determining a risk score associated with a transaction, the method comprising:(A) obtaining, by a processing circuitry, the dynamic LLM of claim 28, capable of receiving a query from a user of the system and providing a response to the query, the dynamic LLM is associated with one or more base models utilized by the dynamic LLM to generate the response wherein the at least one property is associated with the one or more base models, that has been: (a) informed of the one or more base models, and (b) instructed, based on the one or more base model and the query, to select a given base model of the base models when providing a response to the query, giving rise to a model-informed LLM;(B) receiving, by the processing circuitry, a query from the user and provide the query to the model-informed LLM;(C) upon the model-informed LLM selecting a given base model, utilizing, by the processing circuitry, the model-informed LLM with the given base model to provide a response to the query;(D) delivering, by the processing circuitry, the response to the query provided by the model-informed LLM to the user of the system.

Citation Information

Patent Citations

  • Language model for abstractive summarization

    US20220414319A1

  • Diffusion-based generative modeling for synthetic data generation systems and applications

    US20230109379A1

  • Pre-training techniques for entity extraction in low resource domains

    US20230153533A1

  • Generating topic-specific language models

    US20230197069A1

  • Using one or more neural networks to perform text translation

    US20230267285A1

Cited By

  • Method, medium, device and program product for calculating attention score based on CPU

    CN120297328A

  • A progressive disclosure method and system for uniformly and flexibly providing context for an AI agent

    CN122655783A