Self-debating framework for hallucination detection

The self-debating framework within a single LLM addresses the issue of hallucinations in LLM-generated SPL queries by generating contrasting explanations, enhancing accuracy and reliability in code generation.

US20260377495A1Pending Publication Date: 2026-11-26CISCO TECHNOLOGY INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
US19/553165
Authority / Receiving Office
US · United States
Patent Type
Applications(United States)
Current Assignee / Owner
Priority Date
2025-05-19
Filing Date
2026-02-27
Publication Date
2026-11-26

AI Technical Summary

Technical Problem

Large language models (LLMs) often produce syntactically valid but semantically incorrect outputs, known as hallucinations, particularly in domain-specific languages like Splunk Search Processing Language (SPL), undermining their reliability in generating programming code.

Method used

A self-debating framework within a single LLM is employed to generate contrasting explanations for generated queries, assessing consistency by considering both hallucinated and faithful interpretations before making a final judgment.

Benefits of technology

The self-debating framework significantly reduces hallucination errors in LLM-generated SPL queries, achieving up to 260% improvement in F1 scores and demonstrating strong generalization across different LLMs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure US20260377495A1-D00000_ABST
    Figure US20260377495A1-D00000_ABST
Patent Text Reader

Abstract

Implementations of the disclosure provide a computerized method including operations of receiving a generation prompt and an output query, wherein the output query is generated through the use of artificial intelligence (AI), prompting a query evaluation large language model (LLM) to produce two contrasting explanations as to whether the output query is hallucinated, wherein a first explanation of the two contrasting explanations is generated under an assumption that the output query is hallucinated, and wherein a second explanation is generated under an assumption that the output query is consistent with the generation prompt, prompting the query evaluation LLM to determine whether the output query is hallucinated based on the generation prompt, the query output, and the two contrasting explanations, and determining, by an evaluation logic, whether the output query was hallucinated based on the contrasting explanations.
Need to check novelty before this filing date? Find Prior Art

Description

CROSS-REFERENCE TO RELATED APPLICATIONS

[0001] This application claims the benefit of priority to U.S. Provisional Application No. 63 / 808,468, filed May 19, 2025, which is incorporated by reference in its entirety into this application.FIELD

[0002] Embodiments of the disclosure relate to artificial intelligence and machine-learning systems, and more particularly to systems and methods for evaluating whether machine-generated programming code includes hallucinated aspects. In one embodiment, the disclosure relates to a large language model-based architecture configured to perform a self-debating or adversarial analysis.BACKGROUND

[0003] Information technology (IT) environments can include diverse types of data systems that store large amounts of diverse data types generated by numerous devices. For example, a big data ecosystem may include databases such as MySQL and Oracle databases, cloud computing services such as Amazon web services (AWS), and other data systems that store passively or actively generated data, including machine-generated data (“machine data”). The machine data can include log data, performance data, diagnostic data, metrics, tracing data, or any other data that can be analyzed to diagnose equipment performance problems, monitor user interactions, and to derive other insights.

[0004] The large amount and diversity of data systems containing large amounts of structured, semi-structured, and unstructured data relevant to any search query can be massive, and continues to grow rapidly. This technological evolution can give rise to various challenges in relation to managing, understanding and effectively utilizing the data. To reduce the potentially vast amount of data that may be generated, some data systems pre-process data based on anticipated data analysis needs. In particular, specified data items may be extracted from the generated data and stored in a data system to facilitate efficient retrieval and analysis of those data items at a later time. At least some of the remainder of the generated data is typically discarded during preprocessing.

[0005] However, storing massive quantities of minimally processed or unprocessed data (collectively and individually referred to as “raw data”) for later retrieval and analysis is becoming increasingly more feasible as storage capacity becomes more inexpensive and plentiful. In general, storing raw data and performing analysis on that data later can provide greater flexibility because it enables an analyst to analyze all of the generated data instead of only a fraction of it. Although the availability of vastly greater amounts of diverse data on diverse data systems provides opportunities to derive new insights, it also gives rise to technical challenges to search and analyze the data in a performant way.

[0006] Large language models (LLMs) have shown remarkable success in generating structured queries and code from natural language inputs, particularly in well-resourced domains such as SQL and Python. These languages benefit from extensive public documentation, training corpora, and community support, enabling LLMs to learn them with high fidelity. However, many real-world applications involve domain-specific or semi-private languages that are less prevalent in public data, such as Splunk Search Processing Language (SPL), New Relic Query Language (NRQL), and Kusto Query Language (KQL). These languages are widely used in practice but lack large-scale open datasets and standardized benchmarks. This disparity creates unique challenges for LLM-based generation, particularly with respect to hallucination detection.

[0007] With the rapid advancement of LLMs, there is growing interest in using these models to assist users in generating search queries or, more generally, programming code from natural language inputs in programming languages of far less-resourced domains, mirroring successful applications in other domains, such as text-to-SQL and code generation. However, while LLMs demonstrate impressive fluency and generalization ability, they often suffer from hallucination. They can produce outputs that are syntactically valid but semantically incorrect or unsupported by the input. This undermines the reliability of LLM-generated search queries. Despite the critical nature of this problem, hallucination in search query generation remains an underexplored area.BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Illustrative examples are described in detail below with reference to the following figures:

[0009] FIG. 1 is a conceptual network diagram illustration of a log management, search, and observability platform communicatively coupled to an edge device in accordance with various embodiments of the disclosure;

[0010] FIG. 2 is a block diagram illustrating an embodiment of the components forming the anomaly detection subsystem deployed within the query system of FIG. 1 in accordance with various embodiments of the disclosure;

[0011] FIG. 3 is a conceptual flow of a prompt and code generated in response to the prompt through the query evaluation LLM of FIG. 2 resulting in a hallucination decision in accordance with various embodiments of the disclosure;

[0012] FIG. 4 is a flow diagram illustrating an example process of generating a hallucination decision with a query evaluation LLM in accordance with various embodiments of the disclosure;

[0013] FIG. 5 is a flow diagram illustrating a detailed example process of generating a hallucination decision with a query evaluation LLM in accordance with various embodiments of the disclosure;

[0014] FIG. 6 is a flow diagram illustrating an example detailed process of deploying the evaluation LLM in combination with a data intake and query system in accordance with various embodiments of the disclosure;

[0015] FIG. 7 is a conceptual block diagram of a device suitable for configuration with logic of data intake and query system of FIG. 1 in accordance with various embodiments of the disclosure;

[0016] FIG. 8 is a diagram depicting various subsets of artificial intelligence in accordance with various embodiments of the disclosure;

[0017] FIG. 9 depicts different methods of machine-based learning in accordance with various embodiments of the disclosure;

[0018] FIG. 10 depicts a machine learning lifecycle in accordance with various embodiments of the disclosure; and

[0019] FIG. 11 is an exemplary neural network for use in a fully controlled camera system in accordance with various embodiments of the disclosure.

[0020] FIG. 12 is a conceptual illustration of a variety of tokens for utilization within a large language model in accordance with various embodiments of the disclosure;

[0021] FIG. 13 is a conceptual illustration of an embedding matrix for a large language model, in accordance with various embodiments of the disclosure;

[0022] FIG. 14 is a conceptual illustration of an input prompt converted from a series of tokens into a series of tensors in accordance with various embodiments of the disclosure;

[0023] FIG. 15 is a conceptual illustration of an attention layer process within a large language model in accordance with various embodiments of the disclosure;

[0024] FIG. 16 is a conceptual illustration of a multi-layer perceptron within a large language model in accordance with various embodiments of the disclosure;

[0025] FIG. 17 is a conceptual illustration of an unembedding process within a large language model in accordance with various embodiments of the disclosure;

[0026] FIG. 18 is a block diagram illustrating an example computing environment that includes a data intake and query system in accordance with various embodiments of the disclosure;

[0027] FIG. 19 is a block diagram illustrating in greater detail an example of an indexing system of a data intake and query system, such as the data intake and query system of FIG. 18 in accordance with various embodiments of the disclosure;

[0028] FIG. 20 is a block diagram illustrating in greater detail an example of the search system of a data intake and query system, such as the data intake and query system of FIG. 18 in accordance with various embodiments of the disclosure; and

[0029] FIG. 21 illustrates an example of a self-managed network 2100 that includes a data intake and query system in accordance with various embodiments of the disclosure.

[0030] Corresponding reference characters indicate corresponding components throughout the several figures of the drawings. Elements in the several figures are illustrated for simplicity and clarity and have not necessarily been drawn to scale. For example, the dimensions of some of the elements in the figures might be emphasized relative to other elements for facilitating understanding of the various presently disclosed embodiments. In addition, common, but well-understood, elements that are useful or necessary in a commercially feasible embodiment are often not depicted in order to facilitate a less obstructed view of these various embodiments of the present disclosure.DETAILED DESCRIPTION

[0031] Aspects of the present disclosure may be embodied as an apparatus, system, method, or computer program product. Accordingly, aspects of the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, or the like) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “function,”“module,”“apparatus,” or “system.” Furthermore, aspects of the present disclosure may take the form of a computer program product embodied in one or more non-transitory computer-readable storage media storing computer-readable and / or executable program code. Many of the functional units described in this specification have been labeled as functions, in order to emphasize their implementation independence more particularly.

[0032] Functions may also be implemented at least partially in software for execution by various types of processors. An identified function of executable code may, for instance, comprise one or more physical or logical blocks of computer instructions that may, for instance, be organized as an object, procedure, or function. Nevertheless, the executables of an identified function need not be physically located together but may comprise disparate instructions stored in different locations which, when joined logically together, comprise the function and achieve the stated purpose for the function.

[0033] Indeed, a function of executable code may include a single instruction, or many instructions, and may even be distributed over several different code segments, among different programs, across several storage devices, or the like. Where a function or portions of a function are implemented in software, the software portions may be stored on one or more computer-readable and / or executable storage media. Any combination of one or more computer-readable storage media may be utilized. A computer-readable storage medium may include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing, but would not include propagating signals. In the context of this document, a computer readable and / or executable storage medium may be any tangible and / or non-transitory medium that may contain or store a program for use by or in connection with an instruction execution system, apparatus, processor, or device.

[0034] Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object-oriented programming language such as Python, Java, Smalltalk, C++, C#, Objective C, or the like, conventional procedural programming languages, such as the “C” programming language, scripting programming languages, and / or other similar programming languages. The program code may execute partly or entirely on one or more of a user's computer and / or on a remote computer or server over a data network or the like. A component, as used herein, may comprise a software module or a tangible, physical, non-transitory device. For example, a component may be implemented as a hardware logic circuit, programmable hardware devices, or one or more silicon integrated circuit device.

[0035] Reference throughout this specification to “one embodiment,”“an embodiment,” or similar language means that a feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present disclosure. Thus, appearances of the phrases “in one embodiment,”“in an embodiment,” and similar language throughout this specification may, but do not necessarily, all refer to the same embodiment, but mean “one or more but not all embodiments” unless expressly specified otherwise. The terms “including,”“comprising,”“having,” and variations thereof mean “including but not limited to”, unless expressly specified otherwise. An enumerated listing of items does not imply that any or all of the items are mutually exclusive and / or mutually inclusive, unless expressly specified otherwise. The terms “a,”“an,” and “the” also refer to “one or more” unless expressly specified otherwise.

[0036] Further, as used herein, reference to reading, writing, storing, buffering, and / or transferring data can include the entirety of the data, a portion of the data, a set of the data, and / or a subset of the data. Likewise, reference to reading, writing, storing, buffering, and / or transferring non-host data can include the entirety of the non-host data, a portion of the non-host data, a set of the non-host data, and / or a subset of the non-host data.

[0037] Lastly, the terms “or” and “and / or” as used herein are to be interpreted as inclusive or meaning any one or any combination. Therefore, “A, B or C” or “A, B and / or C” mean “any of the following: A; B; C; A and B; A and C; B and C; A, B and C.” An exception to this definition will occur only when a combination of elements, functions, steps, or acts are in some way inherently mutually exclusive.

[0038] Aspects of the present disclosure are described below with reference to schematic flowchart diagrams and / or schematic block diagrams of computerized methods (or computer-implemented methods), apparatuses, systems, and computer program products according to embodiments of the disclosure. It will be understood that each block of the schematic flowchart diagrams and / or schematic block diagrams, and combinations of blocks in the schematic flowchart diagrams and / or schematic block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a computer or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor or other programmable data processing apparatus, create means for implementing the functions and / or acts specified in the schematic flowchart diagrams and / or schematic block diagrams block or blocks.

[0039] It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. Other steps and methods may be conceived that are equivalent in function, logic, or effect to one or more blocks, or portions thereof, of the illustrated figures. Although various arrow types and line types may be employed in the flowchart and / or block diagrams, they are understood not to limit the scope of the corresponding embodiments. For instance, an arrow may indicate a waiting or monitoring period of unspecified duration between enumerated steps of the depicted embodiment.

[0040] In the following detailed description, reference is made to the accompanying drawings, which form a part thereof. The foregoing summary is illustrative only and is not intended to be in any way limiting. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features will become apparent by reference to the drawings and the following detailed description. The description of elements in each figure may refer to elements of proceeding figures. Like numbers may refer to like elements in the figures, including alternate embodiments of like elements.I. Summary Overview

[0041] Hallucination remains a key challenge in applying large language models (LLMs) to structured query generation, especially for semi-private or domain-specific languages underrepresented in public training data. This disclosure is directed to hallucination detection in these low-resource structured language scenarios, e.g., Splunk Search Processing Language (SPL) as a representative example. In particular, the disclosure provides a technological improvement to the field of hallucination detection by providing systems and methods that improve hallucination through a self-debating framework.

[0042] In the self-debating framework, a query evaluation LLM is prompted to generate contrastive explanations from opposing perspectives before rendering a final consistency judgment. We also construct a synthetic benchmark, SynSPL, to support systematic evaluation of hallucination detection in SPL generation. Experimental results show that self-debating consistently outperforms LLM-as-a-Judge baselines with zero-shot and chain-of-thought (CoT) prompts in SPL hallucination detection across different LLMs, yielding 5-10% relative gains in hallucination F1 scores on both real and synthetic datasets, and up to 260% improvement for LLaMA-3.1-8B. Besides hallucination detection on SPL, self-debating also achieves excellent performance on the FaithBench benchmark for summarization hallucination, demonstrating the strong generalization ability of self-debating, with OpenAI o1-mini achieving state-of-the-art performance. All these results consistently demonstrate the strong robustness and wide generalizability of the self-debating framework disclosed herein.

[0043] While SPL is merely a representative illustrative of a semi-private or domain-specific language, SPL should be understood as a domain-specific query language used to retrieve, filter, and analyze machine-generated log data within a platform, e.g., a data intake and query system. SPL features a rich and expressive syntax that supports complex search, aggregation, and transformation operations, drawing inspiration from both the UNIX pipeline and SQL. Despite its power and industrial adoption, authoring SPL queries remains challenging, both due to its steep learning curve and the scarcity of publicly available guidance or training data.

[0044] The disclosure defines “hallucination” in the context of SPL; however, such may be broadly applied to other programming languages. As used herein generated a query output is considered consistent if it meets both of the following criteria. First, all structural components of the output query must be explicitly supported by the information provided in the generation prompt. In some examples, these components include the index, which specifies the dataset to be searched; the sourcetype, which defines the format or classification of the data; the source, referring to the origin of the data (e.g., file path or data stream); and the fields, which represent the extracted attributes from the data. Second, the output query is free from syntax errors and adheres to the correct programming language syntax. If either of these conditions is violated, the output query is considered hallucinated.

[0045] The novel self-debating framework disclosed herein was tested on a set of collected data to determine the accuracy of the self-debating framework in detecting hallucination. The data collection process included two stages. In the first stage, 25 user queries representative of real-world scenarios were compiled and used to prompt eight large language models (LLMs): o1-mini, GPT-4o, LLaMA-3.1-8B, LLaMA-3.1-70B, Phi-4, Mistral 8x22B, DeepSeek-R1-Distill-Llama-8B, and DeepSeek-R1-Distill-Llama-70B. This resulted in a total of 200 (prompt, SPL) pairs for analysis. In the second stage, two annotators with expertise in SPL and hallucination detection independently annotated the generated data. During the first round, each annotator assigned a binary label indicating whether the SPL query contains hallucination. In the second round, each annotator classified the type of hallucination if one is present. Any disagreements were resolved through discussion, and if consensus could not be reached, a third annotator served as the adjudicator to make the final decision on the label and hallucination category.

[0046] As noted above, most hallucinations in LLM-generated code, and in particular, query languages such as SPL, can be categorized into five distinct types including fabrication, mixed information, misaligned information, syntax error, and misinterpretation. Using SPL as an example, an SPL query is considered a fabrication hallucination if the LLM introduced an index, sourcetype, source, field, or lookup table that is absent from the retrieved metadata and lacks any supporting evidence across the provided generation prompt. An SPL query is considered to contain a mixed information hallucination if it combines individual components, such as index, sourcetype, or fields, that are each supported by the provided generation prompt, but the combination itself is not supported. An SPL query is considered to contain a misaligned information hallucination if it includes field names and field values that are individually supported by the provided generation prompt, but the association between a field name and its assigned value is incorrect or unverifiable based on the provided generation prompt. In contrast to mixed information hallucinations, which result from combining valid components, such as index, sourcetype, fields, from different parts of the prompt in an unsupported way, misaligned information specifically refers to invalid pairings of field names and values, even when all elements are mentioned in the prompt. An SPL query is considered to contain a syntax error hallucination if it includes syntactic issues making the query invalid or not executable. This may involve invalid or misspelled commands, missing or mismatched quotation marks, incorrect field references, or improper command structure or ordering. An SPL query is considered to contain a misinterpretation hallucination if it introduces additional conditions, filters, or requirements that are not supported by or inferable from the user's request.

[0047] The results of the two-stage data collection process discussed above indicates that hallucination is a widespread issue in SPL generation. For example, of the 200 pairs (prompt, SPL) evaluated by two or more experts, 138 queries (69%) were identified as hallucinated, suggesting that the LLM-generated SPL queries are at high risk of producing ungrounded or inaccurate outputs in real-world settings. A breakdown of hallucination types reveals that fabrication is the most common category, accounting for 62.4% of all hallucination instances. This suggests that LLMs frequently make up unsupported SPL components that are not supported by the input prompt. The second most common type is mixed information, which constitutes 24.2% of the hallucinations. In these cases, the model selects components that are individually present in the prompt but combines them in an invalid manner, indicating difficulties in preserving logical coherence across supported elements. In contrast, misinterpretation of the user query is relatively rare, occupying only 0.7% of the hallucinated cases. This suggests that LLMs are generally able to adhere to the user's intent without introducing extraneous or ungrounded constraints.

[0048] Table 1 below illustrates hallucination rates of different models, where lower values indicate better performance:ModelHallucination RateMistral 8x22B84.0Phi-468.0LLaMa-3.1-8B64.0LLaMa-3.1-70B52.0Deepseek-R1-8B84.0Deepseek-R1-8B72.0GPT-4o56.0o1-mini68.0

[0049] To further understand model-level differences, the hallucination rate of each LLM on the collected SPL dataset was computed. As shown in Table 1, the hallucination rate varies significantly across models. LLaMA-3.1-70B achieves the lowest hallucination rate at 52.0%, followed closely by GPT-4o at 56.0%. In contrast, models such as Mistral and DeepSeek-R1-8B exhibit much higher hallucination rates of 84.0%, indicating a greater tendency to produce unsupported or inaccurate SPL components. These findings highlight that hallucination remains a critical and model-dependent challenge in SPL generation, reinforcing the strong need of introducing hallucination detection and mitigation in SPL generation problem.

[0050] It was also understood from the data collection process that different LLMs exhibit distinct hallucination tendencies in terms of the types of errors they are more prone to generate. For instance, Mistral 8×22B shows a disproportionate tendency to produce syntax errors compared to other models, indicating potential instability in adhering to SPL's structural constraints or lack of relevant knowledge. In contrast, DeepSeek-R1-8B and DeepSeek-R1-70B both exhibit more diverse hallucination patterns, with a higher likelihood of producing misaligned information or even rare misinterpretations, suggesting difficulty in consistently mapping prompt semantics to correct field values. LLaMA-3.1-8B and LLaMA-3.1-70B, while similar in architecture, diverge slightly in their hallucination behavior, with the 70B variant avoiding syntax and misinterpretation errors entirely, hinting at the stabilizing effect of scale. Meanwhile, GPT-4o and o1-mini demonstrate more focused tendencies, primarily producing fabrication and mixed information errors, suggesting generally strong syntactic control but limitations in faithfully grounding content. These model-specific patterns highlight that hallucination is not only a matter of frequency, but also of characteristic failure modes, which may reflect differences in training regimes, model alignment, or architectural choices.

[0051] To counter the hallucination in generated programming language, the disclosure introduces a self-debating framework for hallucination detection. While prior methods of hallucination detection typically involve multiple LLMs or agents engaging in back-and-forth discussion to reach a consensus, self-debating adopts a more lightweight and self-contained approach. The framework leverages contrastive reasoning within a single LLM, prompting it to generate explanations for both the consistent and hallucinated interpretations of a generated query before making a final judgment.

[0052] The disclosure provides a self-debating framework for hallucination detection, which enables large language models (LLMs) to assess the faithful consistency of generated content through structured contrastive reasoning. An overview of the self-debating framework is discussed in detail below. The self-debating framework can be generalized to other problems in which an LLM produces a response conditioned on an input prompt, such as structured queries, summaries, answers, or other generation tasks. The framework operates in two stages: explanation generation and final judgment. By prompting an LLM deployed as a component of the self-debating framework to explicitly consider and contrast both consistent and hallucinated interpretations of the output, the framework fosters deeper reasoning and leads to more accurate and interpretable consistency assessments.

[0053] As an overview to the self-debating framework, given an input pair consisting of a generation prompt and a corresponding LLM-generated output, the LLM deployed as a component of the self-debating framework is first prompted to produce two contrasting explanations. One explanation is generated under the assumption that the output is hallucinated, highlighting elements that are not supported or verifiable based on the prompt. The other explanation assumes the output is faithfully consistent, offering justification based on alignment with the input context. This contrastive explanation step forces the LLM to articulate both potential perspectives and prepares it for more nuanced decision-making in the subsequent phase.

[0054] In the second step, the LLM is required to determine whether the generated output is faithfully consistent with the prompt or hallucinated. It is provided with the generation prompt, the output, and both explanations from the previous step. The LLM is instructed to read and consider both explanations before making a final decision. To mitigate potential position bias, such as undue influence from the order in which explanations are presented, the process is executed twice, alternating the order in which the explanations are presented. If the LLM reaches the same conclusion in both runs, that label is accepted as the final prediction. Responsive to the decisions diverging, the LLM is prompted three additional times with an increased temperature (e.g., increase of 0.5 each pass) to encourage response diversity. The majority label across all runs is then selected as the final decision. As used herein, the term “temperature” refers to a scalar variable applied to the LLM's token probability distribution that controls randomness and diversity of generated outputs. The intent of increasing the temperature each pass is to product alternative reasoning paths.II. Architecture Overview

[0055] Referring now to FIG. 1, a block diagram illustrating an embodiment of a data processing environment 100 including a data intake and query system 102 and an AI assistant is shown in accordance with various embodiments of the disclosure. The data processing environment 100 features one or more data sources 105 (generically referred to as “data source(s)”) and client devices 110a, 110b, 110c (generically referred to as “client device(s) 110”) in communication with the data intake and query system 102 via networks 115 and 116, respectively. The networks 115, 116 may correspond to portions the same network or may correspond to different networks. Further, the networks 115, 116 may be implemented as private and / or public networks, one or more LANs, WANs, BLUETOOTH®, cellular networks, intranetworks, and / or internetworks using any of wired, wireless, terrestrial microwave, satellite links, etc., and may include the internet.

[0056] Each data source 105 broadly represents a distinct source of data that can be consumed by the data intake and query system 102. The data source(s) 105 may be positioned within the same geographic area or within different geographic areas such as different regions of a public cloud network. Examples of a data source 105 may include, without limitation or restriction, components or services that provide data files, directories of files, data sent over a network, event logs, registries, streaming data, etc. Herein, according to one embodiment of the disclosure, the data source(s) 105 provide streaming data (also referred to as a “data stream”) to an intake system 125 of an indexing system 120 via the network 115, where the data stream may be time-series data.

[0057] The client device(s) 110 can be implemented using one or more computing devices in communication with the data intake and query system 102 and represent some of the different ways in which computing devices can submit queries to the data intake and query system 102. For example, a first client device 110a may be configured to communicate with the data intake and query system 102 over the network 116 via an internet (web) portal. In contrast, a second client device 110b may be configured to communicate with the data intake and query system 102 via a command line interface while a third client device 110c may be configured to communicate with the data intake and query system 102 via a software developer kit (SDK). As illustrated, the client device(s) 110 can communicate with and submit queries to the data intake and query system 102 in accordance with a plurality of different communication schemes.

[0058] The data intake and query system 102 may be configured to process and store data received from the data source(s) 105 and execute queries on the data in response to requests received from the client device(s) 110, perhaps requests as to detecting data drift. In the illustrated embodiment, the data intake and query system 102 includes the indexing system 120 (including the intake system 125), a query system 130 (including an anomaly detection subsystem 140), a storage system 135 including one or more data stores 137, and an AI assistant 150. The data intake and query system 102 may include systems, subsystems, and components, other than the systems 120, 125, 130, 135, and 150 described herein.

[0059] As mentioned, the data intake and query system 102 may be configured to receive or subsequently consume (ingest) data from different sources 105. In some cases, various data sources 105 may be associated with one or more indexes, hosts, sources, sourcetypes, or users. The data intake and query system 102 may be configured to concurrently receive and process the data from data sources 105.

[0060] The intake system 125 may be configured to receive data from the data source(s) 105 in a variety of formats or structures. In some embodiments, the received data may correspond to streaming data as raw machine data, structured or unstructured data, correlation data, data files, directories of files, data sent over a network, event logs, sensor data, image and / or video data, etc. The intake system 125 can process the data based on the form in which it is received. In some cases, the intake system 125 can utilize one or more rules to process the data and to make the processed data available to downstream systems (e.g., the indexing system 120, query system 130, etc.).

[0061] Illustratively, the intake system 125 can enrich the received data. For example, the intake system 125 may add one or more fields to the data received from the data sources 105, such as fields denoting the host, source, sourcetype, or index associated with the incoming data. In certain embodiments, the intake system 125 can perform additional processing on the data, such as transforming structured data into unstructured data (or vice versa), identifying timestamps associated with the data, removing extraneous data, parsing data, indexing data, separating data, categorizing data, routing data based on criteria relating to the data being routed, and / or performing other data transformations, etc.

[0062] The intake system 125 may feature one or more streaming data processors (not shown) for processing, where the streaming data processor(s) can be configured in operate in accordance with one or more rules to transform data and republish the data. In particular, the intake system 125 can function to conduct preliminary processing of data ingested at the data intake and query system 102. As such, the intake system 125 includes a forwarder that obtains data from one of the data source(s) 105, parses the data in accordance with one or more rules (e.g., data extraction rule(s), TA(s), etc.), and transmits the data to a data retrieval subsystem, which is configured to convert or otherwise format data provided by the forwarder into an appropriate format for inclusion at an intake ingestion buffer and transmit the data to the intake ingestion buffer for further processing.

[0063] Thereafter, the streaming data processor(s) may obtain data from the intake ingestion buffer, process the data, and republish the data to either the intake ingestion buffer (e.g., for additional processing) or to the output ingestion buffer, such that the data is made available to downstream components or systems such as the indexing system 120, query system 130 or other systems 132. In this manner, the intake system 125 may repeatedly or iteratively process data according to one or more rules, such as extraction rules (e.g., regex rules that may involve parsing) for example, where the data is formatted for use on the data intake and query system 102 or any other system. As discussed below, the intake system 125 may be configured to conduct such processing rapidly (e.g., in “real-time” with little or no perceptible delay), while ensuring resiliency of the data.

[0064] In some embodiments, as will be discussed further, the data intake and query system 102, and specifically, the query system 130 may be configured to execute a set of logic statements, e.g., queries, and in some instances, pipeline search query, which may be understood to be a sequence of commands chain together via a pipe symbol ‘l’, with each command processing results of the previously command. The set of logic statements may be executed according to a particular framework referred to herein as a multi-layer anomaly detection pipeline. Individual logic statements forming the set of set logics referenced above may be executed against ingested data that has been stored in the storage system 135 at particular intervals and according to certain time windows of ingested data. Advantageously, the logic statements serve to breakdown a large data retrieval into features, and further into feature vectors associated with a single entity, such as a device or a user. The logic statements may then include detecting anomalies on a per entity basis through the use of machine learning.

[0065] Referring to now FIG. 2, a block diagram illustrating an embodiment of the components forming the anomaly detection subsystem 140, the AI assistant 150, and the hallucination detection logic 160 of FIG. 1 is shown in accordance with various embodiments of the disclosure. The anomaly detection subsystem 140, the AI assistant 150, and the hallucination detection logic 160 are shown in greater detail in FIG. 2 relative to FIG. 1. The anomaly detection subsystem 140 is shown to include a first set of logic modules configured to perform anomaly detection operations including the detection deployment logic 200 and a thresholding logic 204 with a remedial action component 206 configured to generate alerts and / or dashboards (e.g., graphical user interfaces or display portions thereof) (“alerts and dashboards 208”) and / or initiate automated actions such as by transmitting instructions to various networking components or other logic modules to take specified actions in response to a detected anomaly (“automated actions 210”). Additionally, the detection deployment logic 200 may access a data store of saved searches or detections that are to be run or executed as part of an anomaly detection operation, e.g., at set intervals with results routinely reviewed by administrators or analysts, e.g., via a dashboard or through automated alerts.

[0066] This first set of logic modules included in the anomaly detection subsystem 140, those configured to perform anomaly detection operations, upon execution by one or more processors, include initiating a detection—or more broadly and applicable outside of the anomaly detection filed, a saved search—that may be stored in the saved search and detections data store (“detections data store”) 202, performing threshold and anomaly detection logic on results of one or more query operations included in the detection or saved search, and initiating remedial action(s) as a result, if needed. As used herein, a detection may be understood as a specific type of saved search that is configured to identify suspicious or anomalous events. Anomaly detection may involve the execution of a saved search and analysis of the results of the saved search in view of certain thresholding logic and risk scoring. As detailed below, a saved search may comprise a predefined query configured to trigger an alert or report based on threshold or scoring logic. Certain remedial actions may be triggered automatically according to the detection.

[0067] Additionally, the data intake and query system 102 is shown to include an AI assistant 150 and a hallucination detection logic 160. Detail on example logic components that may comprise the AI assistant 150 and the hallucination detection logic 160 in some embodiments are illustrated in FIG. 2 and discussed therewith. However, briefly, the AI assistant 150 may be configured to receive user input, such as natural language text, where generating the requires the AI assistant 150 to generate or cause generation of programming code. In some examples, the AI assistant 150 includes a query generation LLM 212 that is configured to interpret the user input requesting or requiring generation of programming code (“a generation prompt”) or a workflow or sub-prompt generated in view of the generation prompt and generate programming code consistent with the generation prompt. In some examples, the programming code is represented in a search query language, and in some instances, the search query language represents a pipelined search query language (broadly, “query output” when referring to generated programming code represented in a search query language). In generating the query output, the query generation LLM 212 may call or one or more tools and integrations 214. The user interface (UI) logic (UI logic 216) may be configured to receive the generation prompt and display the query output. In some instances, generation prompt may prompt the query generation LLM 212 to generate a search query for a saved detection, e.g., either a new search query or an improvement or revision to an existing saved detection.

[0068] The hallucination detection logic 160 may be representative of the implementation of the self-debating framework discussed above. In particular, the hallucination detection logic 160 is configured to receive an input pair consisting of a generation prompt and a corresponding LLM-generated output. The generation prompt may have been provided to the AI assistant 150, e.g., directly from a user via the UI logic 216. In some instances, the AI assistant 150 may receive a prompt from a user, wherein generating a response requires generation and execution of a search query statement by the AI assistant 150, which may include the deployment of any of the tools and integrations 214. The LLM-generated output may be a search query statement, such as an SPL statement that is executable against data stored in the storage system 135 of the data intake and query system 102.

[0069] Upon receipt of the input pair, the query evaluation LLM 218 of the hallucination detection logic 160 is first prompted to produce two contrasting explanations. One explanation is generated under the assumption that the output is hallucinated, highlighting elements that are not supported or verifiable based on the prompt. The other explanation assumes the output is faithfully consistent, offering justification based on alignment with the input context. This contrastive explanation step forces the query evaluation LLM 218 to articulate both potential perspectives and prepares it for more nuanced decision-making in the subsequent phase.

[0070] In the second step, the query evaluation LLM 218 is prompted to determine whether the generated output is faithfully consistent with the generation prompt or hallucinated. The query evaluation LLM 218 is provided with the generation prompt, the output, and both explanations from the previous step. The query evaluation LLM 218 is instructed to read and consider both explanations before making a final decision. To mitigate potential position bias, such as undue influence from the order in which explanations are presented, the process is executed twice, alternating the order in which the explanations are presented. Subsequently, the evaluation logic module 220 determines whether the query evaluation LLM 218 reaches the same conclusion in both runs. If the conclusions are consistent, that label is accepted as the final prediction. However, if the decisions diverge, the query evaluation LLM 218 is prompted three additional times with an increased temperature (e.g., increase of 0.5 each pass) to encourage response diversity. The evaluation logic module 220 then selects the majority label across all runs as the final decision.III. Example Methodologies

[0071] Referring now to FIG. 3, a conceptual flow of a prompt and code generated in response to the prompt through the query evaluation LLM of FIG. 2 resulting in a hallucination decision is shown in accordance with various embodiments of the disclosure.

[0072] The conceptual flow 300 illustrates that the query evaluation LLM 218 of the hallucination detection logic 160 receives input that includes a prompt 302 and LLM-generated code 304. As discussed herein, the query evaluation LLM 218 is first prompted to produce two contrasting explanations. One explanation is generated under the assumption that the output is hallucinated, highlighting elements that are not supported or verifiable based on the prompt, which is represented by the explanation 306. The other explanation assumes the output is faithfully consistent, offering justification based on alignment with the input context, which is represented by the explanation 308.

[0073] In the second step, the query evaluation LLM 218 is prompted to determine whether the LLM-generated code 304 is faithfully consistent with the prompt 302 or hallucinated. The query evaluation LLM 218 again considers the prompt 302, the LLM-generated code 304, and both explanations (explanation 306 and explanation 308) before making a first hallucination prediction 310. As noted throughout the disclosure, to mitigate potential position bias, such as undue influence from the order in which explanations are presented, the process may be executed twice, alternating the order in which the explanations are considered, where the second pass results in a second hallucination prediction 312.

[0074] As noted above with respect to FIG. 2, an evaluation module 220 then determines whether the query evaluation LLM 218 reached the same conclusion in both runs, i.e., whether the first hallucination prediction 310 and the second hallucination prediction 312 are consistent. If the predictions are consistent, that label is accepted by the query evaluation module 220 as the final hallucination decision 314. However, if the predictions diverge, the query evaluation LLM 218 is prompted three additional times with an increased temperature (e.g., increase of 0.5 each pass) to encourage response diversity (collectively, additional prompting 316). The evaluation logic module 220 then selects the majority label across all runs as the final hallucination decision 314.

[0075] Referring now to FIG. 4, a flow diagram illustrating an example process of generating a hallucination decision with a query evaluation LLM is shown in accordance with various embodiments of the disclosure. FIG. 4 shows an example process 400 of determining whether a query output generated by an LLM was hallucinated by the hallucination detection logic 160 of FIGS. 1-2. The example process 400 may be implemented, for example, by a computing device that comprises one or more processors and non-transitory computer-readable medium and is specifically configured with the logic modules set forth in FIGS. 1-2. The non-transitory computer readable medium may store instructions that, when executed by the processor(s), cause the processor(s) to perform the operations of the illustrated process 400.

[0076] Each block illustrated in FIG. 4 represents an operation of the process 400. It should be understood that not every operation illustrated in FIG. 4 is required. In fact, certain operations may be optional to complete aspects of the process 400. The process 400 begins with an operation of receiving a generation prompt and an output query (block 402). As discussed above, the generation prompt may be provided to an AI assistant, such as the AI assistant 150, via a chat interface in which the AI assistant is instructed to generate a search query and the output query may be the LLM-generated code.

[0077] A query evaluation LLM is then prompted to produce two contrasting explanations as to whether the output query is hallucinated (block 404). One explanation is generated under the assumption that the output is hallucinated, highlighting elements that are not supported or verifiable based on the prompt. The other explanation assumes the output is faithfully consistent, offering justification based on alignment with the input context. Subsequently, a first explanation generated under the assumption that the output query is hallucinated is obtained from the query evaluation LLM and a second explanation generated under the assumption that the output query is consistent with the generation prompt is obtained from the query evaluation LLM (block 406 and block 408). The query evaluation LLM is then prompted to determine whether the output query is hallucinated based on the generation prompt, the query output, and the contrasting explanations (block 410).

[0078] Referring to FIG. 5, a flow diagram illustrating a detailed example process of generating a hallucination decision with a query evaluation LLM is shown in accordance with various embodiments of the disclosure. FIG. 5 shows an example process 500 of determining whether a query output generated by an LLM was hallucinated by the hallucination detection logic 160 of FIGS. 1-2. The example process 500 may be implemented, for example, by a computing device that comprises one or more processors and non-transitory computer-readable medium and is specifically configured with the logic modules set forth in FIGS. 1-2. The non-transitory computer readable medium may store instructions that, when executed by the processor(s), cause the processor(s) to perform the operations of the illustrated process 500.

[0079] Each block illustrated in FIG. 5 represents an operation of the process 500. It should be understood that not every operation illustrated in FIG. 5 is required. In fact, certain operations may be optional to complete aspects of the process 500. The process 500 begins with an operation of obtaining contrasting explanations generated by an evaluation LLM as to whether an LLM-generated query output was hallucinated (block 502). As illustrated in FIG. 3, the query evaluation LLM 218 generates contrasting explanations—the hallucination assumed explanation 306 and the consistent assumed explanation 308—which are then again considered by the query evaluation LLM 218, i.e., the same LLM that originally generated the contrasting explanations.

[0080] The query evaluation LLM 218 is then prompted to determine whether the LLM generated query output was hallucinated by analyzing the contrasting explanations in a first order (block 504). For example, the query evaluation LLM 218 may first be prompted to determine whether the LLM-generated query output was hallucinated by analyzing the generation prompt, the LLM-generated query output, and the contrasting explanations considering the hallucinated assumed explanation first. Additionally, the evaluation LLM is prompted to determine whether the LLM generated query output was hallucinated by analyzing the contrasting explanations in a second order opposite the first order (block 506). Continuing the example above, the query evaluation LLM 218 may then be prompted to determine whether the LLM-generated query output was hallucinated by analyzing the generation prompt, the LLM-generated query output, and the contrasting explanations considering the consistent assumed explanation first.

[0081] Following both evaluations of the generation prompt, the query output, and the two contrasting explanations, a determination is made as to whether the decisions are consistent with each other (block 508). When the decisions generated by the query evaluation LLM 218 for both orderings of the contrasting explanations are consistent, the consistent decision is accepted as final (block 510). In such instances, the hallucination detection logic 160 may return an indication that hallucination was not detected, e.g., to the AI assistant 150. In such instances, the AI assistant 150 may then return the LLM-generated query output to the user via the chat interface. In other instances, the AI assistant 150 may then proceed with executing the LLM-generated query output resulting in data retrieval and / or analysis that is ultimately returned to the user via the chat interface.

[0082] However, when the decisions generated by the query evaluation LLM 218 for both orderings of the contrasting explanations are inconsistent, the query evaluation LLM 218 is prompted an additional odd number of times with an increased temperature (block 512). In some examples, the query evaluation LLM 218 is prompted three additional times with an increased temperature, e.g., an increase in 0.5 each pass, to encourage response diversity. However, 0.5 is merely an example. Other incremental increases may be utilized such as 0.1, 0.2, 0.3, etc. In some examples, each pass is continually incremented relative to the prior pass. However, in other examples, the additional odd number of passes are all incremented the same amount relative to the two initial passes. Following the additional evaluations by the query evaluation LLM, the majority decision across all evaluations is determined and accepted as the final decision (block 514).

[0083] Referring now to FIG. 6, a flow diagram illustrating an example detailed process of deploying the evaluation LLM in combination with a data intake and query system is shown in accordance with various embodiments of the disclosure. FIG. 6 shows an example process 600 of determining whether a query output generated by an LLM was hallucinated by the hallucination detection logic 160 of FIGS. 1-2. The example process 600 may be implemented, for example, by a computing device that comprises one or more processors and non-transitory computer-readable medium and is specifically configured with the logic modules set forth in FIGS. 1-2. The non-transitory computer readable medium may store instructions that, when executed by the processor(s), cause the processor(s) to perform the operations of the illustrated process 600.

[0084] Each block illustrated in FIG. 6 represents an operation of the process 600. It should be understood that not every operation illustrated in FIG. 6 is required. In fact, certain operations may be optional to complete aspects of the process 600. The process 600 begins with an operation of receiving a generation prompt and an output query (block 602). As discussed above, the generation prompt may be provided to an AI assistant, such as the AI assistant 150, via a chat interface in which the AI assistant is instructed to generate a search query and the output query may be the LLM-generated code.

[0085] The query evaluation LLM is then prompted to produce two contrasting explanations as to whether the output query is hallucinated (block 604). One explanation is generated under the assumption that the output is hallucinated, highlighting elements that are not supported or verifiable based on the prompt. The other explanation assumes the output is faithfully consistent, offering justification based on alignment with the input context.

[0086] The two contrasting explanations are then obtained that were generated by an evaluation LLM as to whether an LLM-generated query output was hallucinated (block 606). As illustrated in FIG. 3, the query evaluation LLM 218 generates contrasting explanations—the hallucination assumed explanation 306 and the consistent assumed explanation 308—which are then again considered by the query evaluation LLM 218, i.e., the same LLM that originally generated the contrasting explanations. The query evaluation LLM is then prompted to determine whether the output query is hallucinated based on the generation prompt, the query output, and the contrasting explanations (block 608).

[0087] A determination is then made as to whether the query output was hallucinated. (block 610). When the final decision is that the query output was not hallucinated, the query output may optionally be stored as a saved detection (block 612). As a saved detection, the query output may be stored in the saved search and detection data store 202 illustrated in FIG. 2 and executed at defined intervals, e.g., hourly, daily, weekly, etc. by the query system 130 of the data intake and query system 102 (block 614). Additionally, automated remedial actions may be performed in response to the execution results (block 616).

[0088] In some embodiments, the automated remedial actions include blocking network traffic from a client device 110 or a data source 105 based on association with detected anomalies following execution of the saved search, e.g., blocking an IP address associated with the client device 110 or the data source 105. For example, the anomaly detection subsystem 140 may send block network traffic instructions to firewall operating at a boundary of the network 116 or the network 115 The firewall blocks network traffic accordingly.

[0089] In various embodiments, the automated remedial actions may include sending remediation instructions to an access control point and / or one or more third-party applications such as a cybersecurity application. The remediation instructions may include temporarily quarantining one or more user accounts, such as those associated with detected anomalies following execution of the saved search; temporarily freezing access to data stores with confidential information and / or the storage system 135; identifying whether a client device 110 associated with detected anomalies following execution of the saved search accessed any confidential information; sending an alert to an administrator of an access control point; updating one or more network settings and / or one or more firewall settings; and / or implementing a higher security role-based access control policy, temporarily or permanently.

[0090] In various embodiments, the automated remedial actions may include sending an anomaly detection alert to a STEM application, a security orchestration, automation and response (SOAR) application, and / or a user such as a security operations center (SOC) analyst. In various embodiments, the anomaly detection subsystem 140 generates alerts / dashboards 208, which may be sent to one or more destinations, such as a SIEM application. In other embodiments, the SIEM application generates or updates a dashboard based on data received from the anomaly detection subsystem 140, e.g., data included in the anomaly detection alert.

[0091] When the final decision is that the query output was hallucinated, an AI assistant that generated the query output may be instructed to generate the query output again based on the generation prompt with feedback from the evaluation LLM analysis (block 618).IV. Evaluation Methodology Using Generated Benchmark

[0092] To enable the development and evaluation of hallucination detection methods for SPL generation, a suitable benchmark is needed. As discussed above, the self-debating framework discussed herein may be applied to many programming languages; however, such is particularly advantage in less-resourced domains relative to more well-resourced domains such as SQL and Python. SPL may be categorized as a less-resourced domain. As a result, to illustrate one technological benefit provided to the field of code generation, the self-debating framework was applied to the detecting hallucination of LLM-generated code in SPL. Additionally, to assess the generalizability of the framework beyond SPL (and corresponding the technological improvements to the field of LLM-code generation), the self-debating framework was evaluated on FaithBench, which is a challenging benchmark for hallucination detection in summarization tasks. As will be illustrated in more detail below, the self-debating framework achieved consistent gains in F1-Macro across all six tested LLMs, with four models showing over 30% relative improvement. Notably, when applied to the o1-mini model, the self-debating framework not only surpassed the original baseline performance of o1-mini on FaithBench but also achieved state-of-the-art (SOTA) results among all evaluated models.a. Benchmark Construction

[0093] The following provides discussion of the generation of a synthetic SPL benchmark, SynSPL, to support systematic evaluation. SynSPL was constructed to serves both as a testbed for the self-debating framework disclosed herein, e.g., as implemented in the data intake and query system 102 of FIG. 1 and as a reusable resource for future testing on hallucination mitigation in structured query generation.

[0094] Experimental results show that the self-debating framework consistently outperforms LLM-as-a-Judge baselines using standard zero-shot and chain-of-thought (CoT) prompts across six different LLMs. However, research on SPL remains limited, and no large-scale benchmark currently exists for this purpose. Collecting real-world queries and associated data is challenging due to privacy concerns and annotation costs. In contrast, text-to-SQL has benefited from extensive benchmarks and community support. Given the conceptual and structural similarities between SQL and SPL, a synthetic benchmark for SPL hallucination detection was constructed by adapting and extending an existing text-to-SQL dataset.

[0095] The synthetic SPL benchmark was constructed using the development set of the BIRD benchmark as the seed. The BIRD development set spans eleven databases and includes SQL queries across three levels of difficulty: challenging, moderate, and simple. Each sample in the BIRD dataset typically includes a user question, a corresponding golden-standard SQL query, a piece of relevant knowledge required for SQL generation, and the name of target database. The construction process involves two stages. In the first stage, gold-standard (prompt, SPL) pairs are generated free from hallucinations. In the second stage, different types of hallucinations are systematically injected into the gold-standard queries to produce corresponding hallucinated examples.i. First Stage: Construction of Consistent Pairs

[0096] To ensure broad domain coverage and increase the difficulty of the resulting SynSPL benchmark, up to 30 examples per database were selected prioritizing more complex queries. This resulted in a total of 330 initial SQL samples, which serve as the seed for constructing the synthetic SPL dataset. To generate golden pairs (prompt, SPL) without hallucinations, a three-step process was followed: (1) SQL-to-SPL translation, (2) prompt synthesis, and (3) post-validation.

[0097] As a first operation, an LLM, e.g., GPT-4o, was prompted to translate the selected SQL queries into equivalent SPL queries. To verify semantic equivalence, GPT-4o was asked to verify that the translated SPL faithfully captures the intent and logic of the original SQL query. Only those examples for which GPT-4o affirmed equivalence were retained, yielding 252 verified samples with translated SPL queries. GPT-4o was again prompted to extract the fields used in each SPL query. These extracted fields were used both to support hallucination injection in later stages and to provide an additional layer of correctness checking. In particular, challenging SQL queries often involve multiple JOIN operations and table aliases, which are not typically used in SPL. This discrepancy can result in translation errors, such as invalid field references like T1.id in SPL, where T1 is a table alias or joint in the SQL query but has no equivalent in SPL. To address this, the translated SPL queries were manually reviewed by experts paying special attention to field references that may involve aliases, and any errors were corrected to ensure that all gold-standard examples were both syntactically valid and semantically faithful.

[0098] A synthetic generation prompt was then constructed to accompany each verified SPL query. The structure of the synthetic prompt mirrored that of a standard prompt used for SPL generation and comprised five components: a general instruction, retrieved SPL metadata, relevant example queries, user history, and the current user query. The general instruction remains fixed across all examples, while the remaining components are query-specific and are the focus of the prompt synthesis process. The SPL metadata section includes a list of relevant indices, each is accompanied by a brief description highlighting representative fields. To simulate this, the tables from the original SQL query's database were treated as corresponding indices, and the columns within each table as potential fields.

[0099] An LLM, such as GPT-4o, was then prompted to generate index descriptions based on the column definitions in these tables. The relevant example section consists of five (user query, SPL) pairs that are semantically similar to a current query. To identify these examples, the top five most similar user queries were retrieved from the training set of BIRD based on their semantic content. Such were retrieved with their corresponding translated SPLs as contextual examples. To simulate user history, it was assumed that a user is likely to explore related queries within the same domain. Accordingly, all user queries in the development set were grouped by their associated database and randomly sample five additional queries from the same database along with SPL query translated by GPT-4o as the user history. Finally, the current user query was constructed by concatenating the original user question with its associated supporting knowledge, as provided in the BIRD dataset. This results in a realistic and structured synthetic prompt that closely resembles those used in real-world SPL generation scenarios.

[0100] In the final step, multiple LLMs were leveraged, e.g., GPT-4o and o1-mini, to independently assess whether each (prompt, SPL) pair is semantically and syntactically consistent. If both models flag a pair as inconsistent, the pair is manually checked by an expert and corrected if necessary. This multi-step process helps ensure that the resulting dataset contains high-quality, hallucination-free SPL examples that are reliable for subsequent hallucination injection and evaluation.ii. Second Stage: Hallucination Injection

[0101] To simulate realistic failure cases and enable fine-grained evaluation, four types of hallucinations, including fabrication, syntax error, mixed information, and misaligned information, were injected into the gold-standard (prompt, SPL) pairs, with each type defined above. Misinterpretation hallucinations are excluded, as earlier analysis shows they are rare and less impactful for large-scale evaluation.

[0102] Hallucinated SPLs were generated by a plurality of different LLMs such as o1-mini, GPT-4o, LLaMA-3.1-8B, LLaMA-3.1-70B, DeepSeek-R1-Distill-Llama-8B, and DeepSeek-R1-Distill-Llama-70B. For each gold example, each LLM was prompted with the synthetic generation prompt, the gold SPL query, a formal definition of the target hallucination type, and a few-shot demonstration of examples illustrating that type. For fabrication hallucinations, extracted fields from the gold SPL were also included to guide manipulation. The LLM was instructed to generate a new SPL query that reflects the specified hallucination category while maintaining fluency and structural plausibility. The final dataset consisted of 6,300 examples, comprising 252 consistent examples and 252 hallucinated examples for each combination of hallucination type and injection model.b. Self-Debating Framework Evaluation

[0103] SynSPL was primarily used to evaluate the performance of the self-debating framework in hallucination detection. To further assess the generalization capability of the self-debating framework, it was evaluated on FaithBench, which is a challenging benchmark for summarization hallucination detection that features high-quality human annotations known to those having ordinary skill in the art. On both datasets, the self-debating framework was compared against two prompt-based baselines: zero-shot prompt and a CoT prompt following, both of which were previously evaluated on FaithBench. For SynSPL, F1 score, precision, and recall for the hallucination class were reported, as hallucination detection is the primary focus. For FaithBench, the original evaluation protocol was followed and balanced accuracy and macro-averaged F1 score was reported. Additionally, to better understand model performance across both classes, class-wise F1 scores for hallucinated and faithfully consistent generations were reported. As an example, a plurality of different LLMs may be utilized for the benchmark evaluations. The example discussed below includes deployment of six LLMs as backbone models, including: o1-mini, GPT-4o, LLaMA-3.1-8B, LLaMA-3.1-70B, DeepSeek-R1-Distill-LLaMA-8B, and DeepSeek-R1-Distill-LLaMA-70B.i. Results on SynSPL

[0104] As illustrated in Table 2, the self-debating framework demonstrates consistent performance improvements across all six evaluated LLMs, outperforming both baseline methods, the zero-shot prompt and the CoT prompt, in the majority of cases. The most substantial gains are observed in weaker and mid-tier models. For example, the F1 score of LLaMA-3.1-8B improved significantly from 23.39% with the zero-shot prompt and only 2.55% with CoT to 85.05% under the self-debating framework. Similarly, DeepSeek-R1-8B improved from 39.39% (zero-shot) and 19.13% (CoT) to 74.87% when the self-debating was applied.

[0105] Table 2 provides evaluation results on SynSPL for hallucination class, where bold numbers indicate the overall best in each metric and underlined numbers indicate the highest values for each LLM (all numbers are in percentage format):F1PrecisionRecallZeroFACTSSelfZeroFACTSSelfZeroFACTSSelfModelShotCoTDebatingShotCoTDebatingShotCoTDebatingGPT-4o96.2384.7695.4096.7799.4996.9295.6973.8393.93o1-mini86.0384.5991.9498.5598.3197.4776.3474.2286.15LLaMA-23.392.5585.0598.29100.00 96.6413.281.2975.953.1-8BLLAMA-68.3450.5274.3999.0099.4798.9552.1833.8659.603.1-70BDeepSeek-39.3919.1374.8798.6798.0196.6824.6010.6061.09R1-8BDeepSeek-62.5058.5489.3999.0699.0698.0245.5941.8582.15R1-70B

[0106] These results demonstrate the technological improvement of the framework's effectiveness in enabling weaker models to detect hallucinated SPL queries with much higher accuracy. The improvements in recall further illustrate that the self-debating framework effectively addresses the core challenge of identifying hallucinations, substantially reducing missed detections. Additionally, precision remains consistently high across all models and even slightly improves in many cases, demonstrating that the framework maintains accuracy and robustness without introducing significant false positives.

[0107] While there is a slight performance decrease observed for the GPT-4o model, with the self-debating framework resulting in a marginal drop from 96.23% to 95.40% in F1 score, one possible explanation is that GPT-4o, already achieving high baseline performance, benefits less from explicit contrastive reasoning due to its sophisticated internal reasoning capabilities on SPL hallucination detection. Introducing the additional complexity of contrastive evaluation might have inadvertently caused minor confusion or overly conservative judgments in an already high-performing model. Overall, the results highlight the model-agnostic nature and scalability of the self-debating framework, which enhances performance across a diverse range of LLMs.

[0108] The accuracy for each category of data is included in Table 3. Overall, the self-debating framework achieved the highest accuracy for every hallucination type across most injection models, confirming its effectiveness is generalized rather than type-specific.

[0109] Table 3 provides a comparison of categorical accuracy achieved by zero-shot prompt, FACTS CoT, and self-debating, where each cell contains the three corresponding results. Bold numbers indicate the overall best in each metric, where underlined numbers indicate the highest values for each LLM, to note that there are 252 consistent samples and 1512 samples for each type of hallucinations (the numbers are percentages):ModelConsistentFabricationMixed InfoMisalignedSyntax ErrorGPT-4o23.41 / 90.87 / 99.12 / 94.53 / 98.96 / 95.07 / 99.40 / 95.93 / 98.20 / 88.29 / 28.1798.6898.7899.2297.39o1-mini73.02 / 69.44 / 95.21 / 94.46 / 96.00 / 96.00 / 96.64 / 96.53 / 88.49 / 87.24 / 46.8396.9997.4998.0293.04LLaMA-94.44 / 100.00 / 78.22 / 75.20 / 79.07 / 75.38 / 78.60 / 75.55 / 77.38 / 75.17 / 3.1-8B38.4994.7894.3095.7591.95LLaMA-87.30 / 95.63 / 87.80 / 81.96 / 91.60 / 86.90 / 92.13 / 87.29 / 80.65 / 77.71 / 3.1-70B84.9292.1492.1692.7281.63DeepSeek-92.06 / 94.84 / 82.18 / 78.01 / 82.06 / 78.44 / 82.52 / 77.94 / 77.84 / 76.21 / R1-8B52.3891.2090.4890.9287.93DeepSeek-93.25 / 90.48 / 86.90 / 84.99 / 88.46 / 88.43 / 90.86 / 89.78 / 79.37 / 78.65 / R1-70B62.3096.7196.4197.5990.87

[0110] A notable observation is that the self-debating framework sometimes reduced accuracy on consistent samples, due to a more cautious stance that occasionally flags valid outputs as hallucinated. This reflects a precision-recall trade-off, where the framework aims to maximize hallucination detection even if it results in some false positives. However, this does not mean the framework is simply more conservative or indiscriminately flags hallucinations. The self-debating framework adapts model behavior based on the error tendencies of the base model, addressing the actual bottleneck. The framework helps correct overly cautious models, such as GPT-4o, by improving selectivity, and helps under-sensitive models, such as LLaMA-3.1-8B, by expanding detection coverage.ii. Results on FaithBench

[0111] The evaluation results on FaithBench are shown in Table 4. Consistent with observations from the SynSPL dataset, the self-debating framework demonstrated strong generalization and improves performance over the zero-shot baseline across most of six models. The improvement in balanced accuracy and Macro F1, particularly for GPT-4o and o1-mini, indicated improved discrimination between hallucinated and consistent summaries through contrastive reasoning.

[0112] Table 4 provides evaluation results on FaithBench, where bold numbers indicate the overall best in each metric, and where underlined numbers indicate the highest values for each LLM (the numbers are percentages):Balanced Acc.F1-MacroF1-HaluF1-ConsZeroFACTSSelfZeroFACTSSelfZeroFACTSSelfZeroFACTSSelfModelShotCoTDebatingShotCoTDebatingShotCoTDebatingShotCoTDebatingGPT-4o54.5953.8156.4836.9236.1054.9026.2025.0867.1947.6547.1242.61o1-mini56.3956.1763.4241.2241.8058.7733.9535.3965.8848.5048.2051.66LLaMA-51.2151.9650.8739.8637.0440.3535.8828.7837.3743.8545.3043.333.1-8BLLaMA-54.5553.4854.4837.9032.9049.3928.3618.4754.9547.4547.3343.823.1-70BDeepSeek-51.2148.1649.2330.7227.6736.3415.6511.5829.8145.7943.7642.86R1-8BDeepSeek-53.2453.6356.6032.1433.4849.9817.0419.5953.6147.2447.3646.36R1-70B

[0113] The F1 score for hallucination detection showed particularly notable improvements, underscoring the framework's strength in reliably identifying hallucinated summaries across multiple models. However, the F1 score for consistent samples slightly decreases for certain models such as GPT-4o and DeepSeek-R1-70B. This minor performance tradeoff suggests that explicitly contrastive reasoning may lead models to adopt a more conservative approach, occasionally misclassifying borderline consistent examples as hallucinated.

[0114] However, compared to the results on SynSPL dataset, the overall improvements obtained on FaithBench tend to be smaller, particularly among weaker-performing models such as DeepSeek-R1-Distill-Llama-8B and LLaMA-3.1-8B. One possible explanation is that summarization outputs typically involve natural-language text, making subtle hallucinations inherently more challenging to detect than in structured query outputs. Summaries often contain nuanced or minor inaccuracies, increasing ambiguity and complicating precise identification of deviations from the input sources. Another potential reason relates to the prior exposure of LLMs to large-scale natural language training data. Models are typically extensively trained on diverse textual corpora, making them highly proficient and knowledgeable in common tasks such as summarization. Consequently, explicit contrastive reasoning may have less impact on tasks for which models already possess extensive prior knowledge.

[0115] Conversely, tasks like SPL generation are relatively specialized and less represented in training data, potentially leaving models with gaps in their prior knowledge. In such scenarios, contrastive reasoning provided by the self-debating framework could be more effective, compensating for these knowledge gaps. Despite these inherent differences and challenges, the self-debating framework consistently delivered improved detection performance, underscoring its general robustness and cross-domain applicability.V. Environment Overview

[0116] Referring to FIG. 7, a conceptual block diagram of a device suitable for configuration with logic of a multi-layer anomaly detection subsystem is shown in accordance with various embodiments of the disclosure. The embodiment of the conceptual block diagram depicted in FIG. 7 can illustrate a conventional server, computer, workstation, desktop computer, laptop, tablet, network appliance, e-reader, smartphone, or other computing device, and can be utilized to execute any of the application and / or logic components presented herein. The embodiment of the conceptual block diagram depicted in FIG. 7 can also illustrate an access point, a switch, or a router in accordance with various embodiments of the disclosure. The device 700 may, in many nonlimiting examples, correspond to physical devices or to virtual resources described herein.

[0117] In many embodiments, the device 700 may include an environment 702 such as a baseboard or “motherboard,” in physical embodiments that can be configured as a printed circuit board with a multitude of components or devices connected by way of a system bus or other electrical communication paths. Conceptually, in virtualized embodiments, the environment 702 may be a virtual environment that encompasses and executes the remaining components and resources of the device 700. In more embodiments, one or more processors 704, such as, but not limited to, central processing units (“CPUs”) can be configured to operate in conjunction with a chipset 706. The processor(s) 704 can be standard programmable CPUs that perform arithmetic and logical operations necessary for the operation of the device 700.

[0118] In a number of embodiments, the processor(s) 704 can perform one or more operations by transitioning from one discrete, physical state to the next through the manipulation of switching elements that differentiate between and change these states. Switching elements generally include electronic circuits that maintain one of two binary states, such as flip-flops, and electronic circuits that provide an output state based on the logical combination of the states of one or more other switching elements, such as logic gates. These basic switching elements can be combined to create more complex logic circuits, including registers, adders-subtractors, arithmetic logic units, floating-point units, and the like.

[0119] In various embodiments, the chipset 706 may provide an interface between the processor(s) 704 and the remainder of the components and devices within the environment 702. The chipset 706 can provide an interface to a random-access memory (“RAM”) 1408, which can be used as the main memory in the device 700 in some embodiments. The chipset 706 can further be configured to provide an interface to a computer-readable storage medium such as a read-only memory (“ROM”) 710 or non-volatile RAM (“NVRAM” or “RAM 708”) for storing basic routines that can help with various tasks such as, but not limited to, starting up the device 700 and / or transferring information between the various components and devices. The ROM 710 or NVRAM can also store other application components necessary for the operation of the device 700 in accordance with various embodiments described herein.

[0120] Additional embodiments of the device 700 can be configured to operate in a networked environment using logical connections to remote computing devices and computer systems through a network, such as the network 740. The chipset 706 can include functionality for providing network connectivity through a network interface card (“NIC”) 1412, which may comprise a gigabit Ethernet adapter or similar component. The NIC 712 can be capable of connecting the device 700 to other devices over the network 740. It is contemplated that multiple NICs 712 may be present in the device 700, connecting the device to other types of networks and remote systems.

[0121] In further embodiments, the device 700 can be connected to a storage 718 that provides non-volatile storage for data accessible by the device 700. The storage 718 can, for instance, store an operating system 720, and programs 722. In various embodiments, the storage 718 includes logic modules encompassing logic of the anomaly detection subsystem 724, the AI assistant 725, data stores 726, and the hallucination detection logic 727 as discussed above.

[0122] The storage 718 can be connected to the environment 702 through a storage controller 714 connected to the chipset 706. In certain embodiments, the storage 718 can consist of one or more physical storage units. The storage controller 714 can interface with the physical storage units through a serial attached SCSI (“SAS”) interface, a serial advanced technology attachment (“SATA”) interface, a fiber channel (“FC”) interface, or other type of interface for physically connecting and transferring data between computers and physical storage units.

[0123] The device 700 can store data within the storage 718 by transforming the physical state of the physical storage units to reflect the information being stored. The specific transformation of physical state can depend on various factors. Examples of such factors can include, but are not limited to, the technology used to implement the physical storage units, whether the storage 718 is characterized as primary or secondary storage, and the like.

[0124] In many more embodiments, the device 700 can store information within the storage 718 by issuing instructions through the storage controller 714 to alter the magnetic characteristics of a particular location within a magnetic disk drive unit, the reflective or refractive characteristics of a particular location in an optical storage unit, or the electrical characteristics of a particular capacitor, transistor, or other discrete component in a solid-state storage unit, or the like. Other transformations of physical media are possible without departing from the scope and spirit of the present description, with the foregoing examples provided only to facilitate this description. The device 700 can further read or access information from the storage 718 by detecting the physical states or characteristics of one or more particular locations within the physical storage units.

[0125] In addition to the storage 718 described above, the device 700 can have access to other computer-readable storage media to store and retrieve information, such as program modules, data structures, or other data. It should be appreciated by those skilled in the art that computer-readable storage media is any available media that provides for the non-transitory storage of data and that can be accessed by the device 700. In some examples, the operations performed by a cloud computing network, and or any components included therein, may be supported by one or more devices similar to device 700. Stated otherwise, some or all of the operations performed by the cloud computing network, and or any components included therein, may be performed by one or more devices 700 operating in a cloud-based arrangement. By way of example, and not limitation, computer-readable storage media can include volatile and non-volatile, removable and non-removable media implemented in any method or technology.

[0126] By way of example, and not limitation, computer-readable storage media can include volatile and non-volatile, removable and non-removable media implemented in any method or technology. Computer-readable storage media includes, but is not limited to, RAM, ROM, erasable programmable ROM (“EPROM”), electrically-erasable programmable ROM (“EEPROM”), flash memory or other solid-state memory technology, compact disc ROM (“CD-ROM”), digital versatile disk (“DVD”), high definition DVD (“HD-DVD”), BLU-RAY, or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information in a non-transitory fashion.

[0127] As mentioned briefly above, the storage 718 can store an operating system 720 utilized to control the operation of the device 700. According to one embodiment, the operating system comprises the LINUX operating system. According to another embodiment, the operating system comprises the WINDOWS® SERVER operating system from MICROSOFT Corporation of Redmond, Washington. According to further embodiments, the operating system can comprise the UNIX operating system or one of its variants. It should be appreciated that other operating systems can also be utilized. The storage 718 can store other system or application programs and data utilized by the device 700.

[0128] In many additional embodiments, the storage 718 or other computer-readable storage media is encoded with computer-executable instructions which, when loaded into the device 700, may transform it from a general-purpose computing system into a special-purpose computer capable of implementing the embodiments described herein. These computer executable instructions may be stored as program 722 (for example, an application) and transform the device 700 by specifying how the processor(s) 704 can transition between states, as described above. In some embodiments, the device 700 has access to computer-readable storage media storing computer executable instructions which, when executed by the device 700, perform the various processes described above with regard to any of the figures discussed herein. In certain embodiments, the device 700 can also include computer-readable storage media having instructions stored thereupon for performing any of the other computer-implemented operations described herein.

[0129] In still further embodiments, the device 700 can also include one or more input / output controllers 716 for receiving and processing input from a number of input devices, such as a keyboard, a mouse, a touchpad, a touch screen, an electronic stylus, or other type of input device. Similarly, an input / output controller 716 can be configured to provide output to a display, such as a computer monitor, a flat panel display, a digital projector, a printer, or other type of output device. Those skilled in the art will recognize that the device 700 might not include all of the components shown in FIG. 7 and can include other components that are not explicitly shown in FIG. 7 or might utilize an architecture completely different than that shown in FIG. 7.

[0130] As described above, the device 700 may support a virtualization layer, such as one or more virtual resources executing on the device 700. In some examples, the virtualization layer may be supported by a hypervisor that provides one or more virtual machines running on the device 700 to perform functions described herein. The virtualization layer may generally support a virtual resource that performs at least a portion of the techniques described herein.

[0131] Although a specific embodiment for a device suitable for configuration with logic of an AI system for carrying out the various steps, processes, methods, and operations described herein is discussed with respect to FIG. 7, any of a variety of systems and / or processes may be utilized in accordance with embodiments of the disclosure. For example, the device may be in a virtual environment such as a cloud-based network administration suite, or it may be distributed across a variety of network devices or switches. The elements depicted in FIG. 7 may also be interchangeable with other elements of the disclosure as appropriate to realize a particularly desired embodiment.

[0132] Referring to FIG. 8, a diagram 800 depicting various subsets of artificial intelligence in accordance with various embodiments of the disclosure is shown. Artificial intelligence (AI) 810 is typically understood in the art to be the development of machines and algorithms that mimic human intelligence, for example, by optimizing actions to achieve certain goals. At its core, AI 810 often involves designing algorithms and models that mimic cognitive functions, such as learning, reasoning, problem-solving, perception, and even language understanding. Unlike traditional computer programs that follow a fixed set of instructions, AI systems have the ability to adapt, improve, and make decisions based on input data and environmental interactions.

[0133] AI 810 can be considered a generic term because it encompasses a wide range of subfields and techniques, from simple rule-based systems to advanced machine learning and deep learning models. These AI techniques are used to simulate various aspects of human cognition. For example, machine learning (ML) 820 allows computers to learn from data patterns without explicit programming for each task, while natural language processing (NLP) enables machines to understand and generate human language. Deep learning (DL) 830, a more advanced branch of AI, uses neural networks to automatically learn complex patterns from large datasets, akin to the human brain's information processing. This versatility makes AI a powerful tool across diverse applications, including image recognition, autonomous driving, voice assistants, healthcare diagnostics, and materials discovery.

[0134] A goal of AI is often to create systems that can function autonomously and intelligently in real-world scenarios. As AI 810 continues to evolve, it can increasingly mirror human-like cognition, enabling machines to not just process data but to “think” in a way that can handle uncertainty, make predictions, and even interact with their surroundings in a meaningful manner. While AI systems are far from achieving the full breadth of human intelligence, their ability to replicate specific cognitive functions makes them invaluable in tackling complex, data-driven challenges.

[0135] Machine Learning (ML) 820 is a subset of Artificial Intelligence (AI) 810 that focuses on the development of algorithms and statistical models that enable computers to learn and make decisions from data without explicit programming. In traditional programming, a computer is given a fixed set of rules to follow, but ML 820 can shift this paradigm by allowing systems to identify patterns, adapt, and improve their performance based on the data they encounter. This data-driven approach makes ML particularly valuable for tasks that are too complex or dynamic to define using straightforward rules, such as, for example, recognizing images, predicting consumer behavior, or diagnosing diseases.

[0136] ML models can be configured to analyze large amounts of data to identify trends and relationships that inform their predictions or classifications. The process typically involves three stages: training, validation, and testing. During training, the model learns from a dataset by adjusting its internal parameters to minimize errors between its predictions and the actual results. Techniques like linear regression, decision trees, random forests, and Gaussian processes are commonly used in ML 820. These algorithms can handle various data types, including numerical, categorical, and structured datasets like spreadsheets or grids. One of the key strengths of ML is its ability to generalize from the training data to make accurate predictions on new, unseen data.

[0137] However, traditional ML methods rely heavily on feature engineering, wherein human experts manually identify the most relevant features or patterns within the data. For example, when using ML 820 for image recognition, an expert might need to extract features like edges, textures, or color patterns before feeding them into a model. This requirement can limit the scalability of traditional ML approaches, especially when dealing with large, unstructured datasets such as images, text, or graphs. Additionally, ML algorithms may often work best when provided with relatively structured data, and they often need a reasonable amount of samples (typically more than 800) to learn effectively.

[0138] Deep Learning (DL) 830 is a specialized subset of Machine Learning (ML) 820 that employs multi-layered artificial neural networks to automatically learn complex patterns and representations from large, often unstructured datasets. Inspired by the way the human brain processes information, DL 830 consists of interconnected layers of “neurons” that can adaptively change as they are exposed to more data. Unlike traditional ML methods, which require manual feature engineering to identify key data characteristics, DL models can automatically extract features directly from raw data, such as images, text, or molecular structures. This automated feature extraction allows DL 830 to handle data types and tasks that were previously difficult or impossible for ML models to tackle effectively.

[0139] DL models, including Convolutional Neural Networks (CNNs), Graph Neural Networks (GNNs), and Recurrent Neural Networks (RNNs), excel at processing various forms of data. CNNs are particularly effective for image analysis, recognizing intricate patterns in visual inputs, making them indispensable in areas like materials science for analyzing microscopic images or detecting defects in materials. GNNs, on the other hand, are designed to work with graph-based data, such as molecular structures, social networks, or atomic interactions. They can learn the dependencies and relationships within graph-like structures, which is crucial for predicting properties of complex molecules and materials. RNNs and their variants, such as Long Short-Term Memory (LSTM) networks, are suited for sequential data like time-series or natural language processing, allowing for the analysis and generation of textual information or the prediction of temporal patterns in scientific research.

[0140] One of the defining characteristics of deep learning is its requirement for large datasets (typically over 500 samples for example) to effectively train neural networks. The deep, multi-layered structure of these networks enables them to capture highly complex and abstract representations of the data, but it also demands significant computational power. Techniques like Variational Autoencoders (VAEs) and Generative Adversarial Networks (GANs) add to the versatility of DL by enabling the generation of new data samples that resemble the training set, aiding in areas such as materials discovery and synthetic data creation. Deep Reinforcement Learning (DRL) combines neural networks with decision-making processes to solve problems that involve optimization and control, further expanding DL's application potential. In summary, DL's ability to automatically learn from raw, unstructured data and model intricate patterns makes it a powerful tool in AI, particularly for complex domains like image recognition, natural language processing, and materials science.

[0141] Artificial Neural networks (ANNs or sometimes just NNs) are often a foundation of a DL system. The basic unit of a neural network is typically the perceptron, which can take inputs, assigns weights to these inputs, and combines them to produce an output. The final output is then passed through an activation function (such as, for example, ReLU, sigmoid, or hyperbolic tangent) to introduce non-linearity, which enables the network to model complex patterns.

[0142] Neural networks are typically trained through a process of backpropagation, where the system's predictions are compared against the known output, and a loss function is used to measure the difference between the prediction and the actual result. The network's weights can be adjusted through a process called gradient descent, which can be configured to minimize the loss function over time. However, the training process can be prone to problems like overfitting (where the model performs well on the training data but poorly on new data). To counter this, techniques such as regularization (e.g., regularization, dropout), early stopping, and mini batches can be utilized to prevent the network from becoming overly specialized to the training set.

[0143] CNNs are a specific type of DL 830 neural network designed to work particularly well with image data, making them highly relevant for image and video data processing. As those skilled in the art will recognize, CNNs typically use specialized layers known as convolutional layers, which apply filters (also known as kernels) to the input data. These filters slide over the input (e.g., an image), detecting patterns like edges or textures, which are then passed to the next layer for further processing. The advantage of CNNs is their ability to automatically learn and extract relevant features from raw data without the need for manual feature engineering. Furthermore, pooling layers (e.g., max-pooling or average pooling) are often added after convolutional layers to reduce the dimensionality of the data, helping to make the system more efficient while retaining the most important information. After several layers of convolutions and pooling, the CNN can output a prediction that is relevant to the underlying process being executed.

[0144] While CNNs are well-suited for grid-based data like images, many real-world problems can involve non-grid data. This type of data may better be represented as a graph, where nodes represent entities (e.g., specific items) and edges represent relationships between them (e.g., characteristics, values, etc.). Thus, Graph Neural Networks (GNNs) can be utilized to operate on such graph-based data.

[0145] In GNNs, information is passed between nodes through edges in a process called message passing. This allows the network to capture dependencies and relationships within the graph structure. The key feature of GNNs is their ability to aggregate information from neighboring nodes, which is crucial in predicting properties that depend on the current / local structure, such as the behavior of an entity or the properties of a related to that or associated entities.

[0146] Generative models aim to learn the underlying distribution of a dataset and generate new samples that resemble the original data. Two common types of generative models are Variational Autoencoders (VAEs) and Generative Adversarial Networks (GANs). VAEs are often configured to work by encoding data into a lower-dimensional latent space and then decoding it back into its original form. This can allow for the generation of new data by sampling points from the latent space. Similarly, GANs often consist of two components: a generator that creates fake / generated data and a discriminator that tries to distinguish between real and fake data. The two components can be trained in a competitive process where the generator tries to “fool” the discriminator, leading to increasingly realistic generated data.

[0147] Reinforcement Learning (RL) involves an agent learning to make decisions by interacting with an environment and receiving feedback (rewards or penalties) based on its actions. Deep Reinforcement Learning (DRL) combines RL with DL techniques, allowing agents to learn from high-dimensional inputs, such as images or complex data simulations. In various embodiments, DRL can be used in scenarios where an optimal decision needs to be made. The combination of RL and DL can allow for learning from raw data, making it a powerful tool for dynamic and real-time decision-making within various embodiments.

[0148] Although a specific embodiment for a diagram 800 depicting various subsets of artificial intelligence suitable for carrying out the various steps, processes, methods, and operations described herein is discussed with respect to FIG. 8, any of a variety of systems and / or processes may be utilized in accordance with embodiments of the disclosure. For example, other subset may be present and available for use within AI 810. Those skilled in the art will recognize that the diagram 800 presented in FIG. 8 is simplified for illustration purposes and various methods and techniques may interact with other areas (ML 820 with DL 830, etc.). The elements depicted in FIG. 8 may also be interchangeable with other elements of FIGS. 9-10 as required to realize a particularly desired embodiment.

[0149] Referring to FIG. 9, different methods of machine-based learning in accordance with various embodiments of the disclosure are shown. In many embodiments, a machine learning model is defined as a mathematical representation of the output of the training process. A machine learning model is often considered similar to computer software designed to recognize patterns or behaviors based on previous experience or data. However, the learning algorithm can discover patterns within the training data, and output an ML model which can capture these patterns and make predictions on new data.

[0150] ML models can be understood as a device that has been trained to find patterns within new data and make predictions. These models can be represented as a complex mathematical function that would be impractical for a human to calculate that takes requests in the form of input data, makes predictions on input data, and then provides an output in response. First, these models can be trained over a set of data, and then they are provided an algorithm or other task to reason over data, extract the pattern from feed data and learn from that data. Once the model(s) is / are trained, they can be used to predict a new and previously unseen dataset.

[0151] There are various types of machine learning models available based on different business goals and data sets available. Often, based on the desired application, ML models can be configured as or settle into one of three different model types: supervised learning, unsupervised learning, and / or reinforcement learning. Supervised learning can further be broken down into two categories of classification and regression. Likewise, unsupervised learning can be divided into three categories: clustering, association rule, and / or dimensionality reduction.

[0152] In the embodiment depicted in FIG. 9, a supervised learning system 900A is shown. The supervised learning system 900A can be configured with a supervised learning model 920 that accepts input data 910 and generates an output 921. However, the output data is often reviewed by a critic 980 that can determine one or more errors 970 that are fed back into the supervised learning model 920 for use in updating.

[0153] Supervised learning systems 900A are often considered the simplest machine learning model to understand in which input data (such as training data) has a known label or result as an output. So, the supervised learning model 920 can be understood to work on the principle of input-output pairs. As such, a function can be trained using a training data set, which is then applied to unknown data and makes some predictive performance. Supervised learning is task-based and mostly tested on labeled data sets.

[0154] Supervised learning systems 900A may often involve one or more regression problems. In regression problems, the output is a continuous variable. Some commonly used Regression models include linear regression, decision trees, and random forests. Linear regression is typically the most straightforward machine learning model in which a prediction of one output variable is made using one or more input variables. The representation of linear regression can be processed as a linear equation, which combines a set of input values (denoted as x) and a predicted output (denoted as y) for the set of those input values. As those skilled in the art will recognize, this may be represented in the form of a line: Y=bx+c. A typical aim of a linear regression-based model can be to find the optimal fit line that best fits the available data points. Linear regression can be extended to multiple linear regressions (finding a plane of best fit in higher dimensional space) and polynomial regressions (finding the best fit curve).

[0155] Decision trees are also popular machine learning models that can be used for both regression and classification problems. A decision tree uses a tree-like structure of decisions along with their possible consequences and outcomes. In this, each internal node is used to represent a test on an attribute while each branch is used to represent the outcome of the test. The more nodes a decision tree has, the more accurate the result will be. The advantage of decision trees is that they are intuitive and easy to implement, but may lack accuracy depending on the available computational or time resources.

[0156] Random forests are an ensemble learning method, which may consist of a large number of decision trees. For example, each decision tree in a random forest predicts an outcome, and the prediction with the majority of votes is considered as the outcome. A random forest model can be used for both regression and classification problems. For the classification task, the outcome of the random forest may be taken from the majority of votes. Whereas in the regression task, the outcome can be taken from the mean or average of the predictions generated by each tree.

[0157] Classification models are another type of supervised learning, which can be used to generate conclusions from observed values in one or more categorical forms. For example, a classification model can identify if an email is spam or not; whether a certain routing pathway is optimal or not, etc. Classification algorithms can also be used to predict between two or more classes and / or categorize an output into different groups. For these classification systems, a classifier model can be designed that classifies the dataset into different categories, and each category can subsequently be assigned a label. As those skilled in the art will recognize, there are currently two main types of classifications in machine learning: binary and multi-class. Binary classification can be utilized when there are only two possible classes (i.e., yes / no, dog / cat, etc.). Multi-class classification can be utilized when there are more than two possible classes, thus requiring a multi-class classifier.

[0158] One of the potential classification processes is logistic regression. Logistic regression can be used to solve various classification problems in machine learning systems. These processes are similar to linear regression but are often used to predict categorical variables. While some variations can be configured to generate a prediction as an output in either “yes” or “no”, 0 or 8, “true” or “false”, etc. However, in some embodiments, the system can instead be configured to not give exact values, but instead provide probabilistic values between zero and one, etc.

[0159] Another classification process that can be utilized is a support vector machine (SVM) which is widely used for classification and regression tasks. However, the main aim of SVM is to find the best decision boundaries in an N-dimensional space, which can be utilized to segregate data points into classes, and generate a best decision boundary often known as a hyperplane. SVM processes can select the extreme vector to find a hyperplane, wherein these vectors are known as support vectors.

[0160] Naïve Bayes is another popular classification algorithm used in machine learning. This process receives its name as it is based on Bayes theorem and follows the naïve (independent) assumption between the features which is often given as the formula:P⁡(y❘X)=P⁡(X❘y)*P⁡(y)P⁡(X)

[0161] This formula takes a class or target y and a predictor attribute (X) and calculates a posterior probability P(y|X) of that class given a particular predictor. P(y) is the prior probability of that class, P(X) is the prior probability of the predictor, and P(X|y) is the likelihood or probability of the predictor given the class. As those skilled in the art will recognize, this may be more succinctly understood as the posterior chance being a result of the prior results times the likelihood divided by the evidence available. Each naïve Bayes classifier assumes that the value of a specific variable is independent of any other variable / feature. For example, if a fruit needs to be classified based on color, shape, and taste. So yellow, oval, and sweet will be recognized as mango. Here each feature is independent of other features.

[0162] Again, in the embodiment depicted in FIG. 9, an unsupervised learning system 900B is shown. The unsupervised learning system 900B can be configured with an unsupervised learning model 940 that accepts input data 930 and generates an output 941. Unlike other model types, there are no critics or error signals to process. Unsupervised learning models 940 can implement the learning process opposite to supervised learning, which means it enables the model to learn from an unlabeled training dataset. Based on the unlabeled dataset, the unsupervised learning model 940 can predict the output. Using an unsupervised learning system 900B, the unsupervised learning model 940 can learn hidden patterns from the dataset by itself without any supervision. In various embodiments, unsupervised learning models 940 are often utilized to perform tasks involving clustering, association rule learning, and / or dimensional reduction.

[0163] Clustering is an unsupervised learning technique that involves clustering or grouping the available data points into different clusters based on similarities and / or differences. The objects or data points with the most similarities remain in the same group, and they have no or very few similarities from other groups. Clustering algorithms can be used in a variety of different tasks such as, but not limited to image segmentation, statistical data analysis, market segmentation, and the like. Some commonly used clustering algorithms that can be selected include K-means Clustering, hierarchal Clustering, DBSCAN, etc.

[0164] Association rule learning is an unsupervised learning technique which finds unique relations among variables within a large data set. In many embodiments, a primary aim of this type of learning algorithm is to find the dependency of one data item on another data item and map those variables accordingly so that it can satisfy some desired outcome. This algorithm can be applied in market basket analysis, web usage mining, continuous production, etc. However, those skilled in the art will recognize that other scenarios may be available based on the desired application. Some popular algorithms of association rule learning are Apriori Algorithm, Eclat, and FP-growth algorithm.

[0165] In additional embodiments, the number of features / variables present in a dataset can be understood as the dimensionality of the dataset, and the technique used to reduce the dimensionality is known as a dimensionality reduction technique. Although more data provides more accurate results, it can also affect the performance of the model / algorithm, such as yielding overfitting outcomes, etc. In such cases, dimensionality reduction techniques can be utilized. It is often desired that this process involves converting the higher dimensions dataset into lesser dimensions dataset while also ensuring that the ensuing results provide similar information. Different dimensionality reduction methods can be utilized, such as, but not limited to, PCA (Principal Component Analysis), Singular Value Decomposition (SVD), etc.

[0166] Finally, in the embodiment depicted in FIG. 9, a reinforcement learning system 900C is shown. The reinforcement learning system 900C can be configured with a reinforcement learning model 960 that accepts input data 950 and generates an output 961. In reinforcement learning, the reinforcement learning model 960 learns actions for a given set of states that lead to a goal state. In the embodiment depicted in FIG. 9, a critic 980 can receive or otherwise notice an error 970 within the reinforcement learning model 960 actions, and provide a reinforcement signal 990 corresponding to an evaluation of the actions. The reinforcement signal 990 provides corrective information such as a “reward,”“punishment,” or error estimation to better model the future behaviors or processing of the reinforcement learning model 960.

[0167] Described is a feedback-based learning model that can take feedback signals after each state or action by interacting with the environment. This feedback works as a reward (positive for each good action and negative for each bad action), and the agent's goal is to maximize the positive rewards to improve their performance. The behavior of the model in reinforcement learning is similar to human learning, as humans learn things by experiences as feedback and interact with the environment. Popular methods of reinforcement learning include q-learning, state-action-reward-state-action (SARSA), and deep Q network.

[0168] Q-learning is one of the popular model-free algorithms of reinforcement learning, which is based on the Bellman equation. It often aims to learn the policy that can help the AI agent to take the best action for maximizing the reward under a specific circumstance. It can incorporate Q values for each state-action pair that indicate the reward to following a given state path, and it tries to maximize that Q-value.

[0169] SARSA is an on-policy algorithm based on the Markov decision process. In many embodiments, it can use the action performed by the current policy to learn the Q-value. The SARSA algorithm stands for State Action Reward State Action, which symbolizes the tuple (s, a, r, s′, a′). Finally, deep Q neural networking (or DQN) is Q-learning within a neural network. It can be deployed within a big state space environment where defining a Q-table would be a complex task. So, in these embodiments, rather than using a Q-table, the neural network instead utilizes Q-values for each action based on the state.

[0170] Although a specific embodiment for different methods of machine-based learning suitable for carrying out the various steps, processes, methods, and operations described herein is discussed with respect to FIG. 9, any of a variety of systems and / or processes may be utilized in accordance with embodiments of the disclosure. For example, those skilled in the art will recognize that methods of learning described herein are generalized and may incorporate other types developed as well as a combination of one or more methods based on the goals of the desired application. The elements depicted in FIG. 9 may also be interchangeable with other elements of FIGS. 8 and 10-10 as required to realize a particularly desired embodiment.

[0171] Referring to FIG. 10, a machine learning lifecycle 1000 in accordance with various embodiments of the disclosure is shown. During the development of machine learning systems, the embodiment depicted in FIG. 10 can provide a framework for how to structure the design and maintenance of these systems. This machine learning lifecycle 1000 outlines various stages involved in building, deploying, and improving ML models to solve real-world problems. By following this structured process, businesses and organizations can ensure that their machine learning projects align with strategic goals, use data effectively, and adapt to changing conditions over time. This machine learning lifecycle 1000 emphasizes that developing a machine learning model is not a one-time effort but an iterative process requiring ongoing monitoring and adjustment. The feedback loop inherent in the machine learning lifecycle 1000 allows for continual refinement and optimization of models to maintain their accuracy and relevance.

[0172] In many embodiments, a first stage of the machine learning lifecycle 1000 is identifying the business goal 1010, which sets the overall direction and purpose of the ML project. This can involve understanding the specific problems or opportunities within the business or project that machine learning can address. A clear business goal 1010 ensures that the project remains focused on delivering tangible value. Without a well-defined goal, it can be challenging to align the subsequent stages of the ML lifecycle 1000, as the choice of model, data processing methods, and performance metrics can all depend on what the business aims to achieve.

[0173] Establishing a proper business goal 1010 can also involve engaging with key stakeholders and developers to gather requirements and set success criteria. It can provide a roadmap that outlines what success looks like and helps in framing the ML problem. Clearly defined goals not only help guide the project but also provide benchmarks for evaluating the effectiveness of the deployed model once it enters production.

[0174] Once the business goal 1010 is established, various embodiments take a next step involving ML problem framing 1020, wherein the goal is translated into a specific machine learning task. This can involve selecting the appropriate type of ML problem, such as classification, regression, clustering, or recommendation, and defining the target variables or outputs. Proper problem framing can be important as it determines the particular data requirements, choice of model, and evaluation metrics.

[0175] During this stage, it is also prudent to consider the constraints and assumptions that may affect the model's development. This might include data availability, computational resources, ethical considerations, or regulatory compliance. Properly framing the problem ensures that the model development aligns with the business's needs and that the problem is broken down into manageable steps, ultimately increasing the project's chances of success.

[0176] Data processing 1030 is a step in many embodiments where raw data is collected, cleaned, and transformed into a format suitable for machine learning. This step can involve gathering data from various sources, removing errors or inconsistencies, handling missing values, and normalizing or scaling features to ensure that the model can learn effectively. Feature engineering is often a part of this stage, where new features are derived from the raw data to capture more relevant information and improve model performance.

[0177] The quality and preparation of the utilized data can significantly impact the model's accuracy and reliability. Inadequate or poorly processed data can lead to biased or inaccurate predictions, no matter how advanced the model is. Hence, data processing 1030 can require or at least benefit from careful planning and iterative refinement. Once the data is processed, it is typically split into training, validation, and test sets to develop and evaluate the model, ensuring that it generalizes well to new, unseen data.

[0178] Model development 1040 is a phase in a number of embodiments where machine learning algorithms are selected, trained, and refined to create a model that addresses the framed problem. This stage can involve choosing the appropriate algorithm (e.g., decision trees, neural networks, support vector machines), setting up the model's architecture, and defining hyperparameters that will guide the training process. The model is trained on the processed data to identify patterns and relationships that allow it to make predictions or decisions.

[0179] During model development 1040, the model can be evaluated using the validation dataset to fine-tune its parameters and improve performance. Techniques like cross-validation, regularization, and hyperparameter tuning can be used to prevent overfitting and ensure the model generalizes well. If proper steps are taken, the result is a model that, once it meets predefined performance metrics, is ready for deployment in a real-world environment. However, this process often involves several iterations to optimize the model for the specific business goal, indicated by the arrow back to data processing 1030.

[0180] In further embodiments, deployment 1050 is the stage where the developed model is integrated into the production environment to perform its intended tasks. This phase may involve setting up the necessary infrastructure, such as APIs or cloud-based services, to allow the model(s) to process live data and generate predictions. Deployment 1050 can transform the model from a research tool into a functional component of a business process or product, providing real-time insights, automations, or decisions.

[0181] Proper deployment 1050 can also include setting up mechanisms for logging, error handling, and user access. Since real-world environments are often dynamic and differ from training conditions, deployment may require continuous adaptation and updates to ensure the model(s) operates efficiently. This step can be important because a model's success is not only determined by its performance metrics but also by its ability to provide actionable results that align with the business goal 1010.

[0182] In more embodiments, monitoring 1060 is the ongoing process of tracking the model's performance and behavior after deployment. It involves collecting data on the model's predictions, accuracy, latency, and error rates to detect issues such as concept drift, where changes in the underlying data patterns can degrade the model's accuracy. By continuously monitoring 1060, teams can identify when the model's performance drops and requires retraining or adjustments to align with the evolving data.

[0183] Monitoring 1060 can also encompass aspects like user feedback, security, and compliance, ensuring that the model remains effective, reliable, and ethical in its application. It may serve as the feedback loop in the lifecycle, where insights gained from monitoring feed back into the earlier stages, particularly data processing 1030 and model development 1040, to refine the model(s) as needed. This iterative process allows the machine learning system to adapt and maintain its alignment with the original business goal 1010 over time.

[0184] Although a specific embodiment for a machine learning lifecycle 1000 suitable for carrying out the various steps, processes, methods, and operations described herein is discussed with respect to FIG. 10, any of a variety of systems and / or processes may be utilized in accordance with embodiments of the disclosure. For example, the particular route of development of the model(s) may not follow this cycle completely. As those skilled in the art will recognize, there are a variety of ways to develop AI products that include various iterative steps that aide in development and refinement of different model(s). The elements depicted in FIG. 10 may also be interchangeable with other elements of FIGS. 8-9 and 11-10 as required to realize a particularly desired embodiment.

[0185] Referring to FIG. 11, an exemplary neural network 1100 in accordance with various embodiments of the disclosure is shown. The embodiment depicted specifically depicts a feedforward neural network with multiple layers. This type of network consists of an input layer 1110, one or more hidden layers 1120, and an output layer 1130. Each layer contains nodes (or neurons) that are interconnected, representing how data flows through the network. The input layer 1110 can receive raw data, which is then processed by the hidden layers 1120 through weighted connections and activation functions. These hidden layers 1120 can enable the network to learn complex patterns and relationships within the data.

[0186] The final output layer 1130 produces the network's predictions or classifications based on the processed input. The interconnected nature of the nodes allows the neural network 1100 to learn from data during training by adjusting the weights of connections to minimize prediction errors. This structure is the foundation of deep learning models, as adding more hidden layers 1120 can create a deep neural network, capable of tackling highly complex tasks such as image recognition, natural language processing, and pattern detection in large datasets.

[0187] A perceptron or a single artificial neuron is the building block of artificial neural networks (ANNs) and can perform forward propagation of information. For a set of inputs to the perceptron, weights (and biases to shift wights) can be assigned. These inputs and weights can be multiplied out correspondingly together to get a sum output. Those skilled in the art will recognize tools such as, but not limited to, PyTorch, Tensorflow, and MXNet as training packages for common neural network tasks. However, it is contemplated that other tools may be developed specifically for the neural network tasks related to the embodiments described herein.

[0188] In additional embodiments, the weight matrices of a neural network can be initialized randomly or obtained from a pre-trained model. These weight matrices can be multiplied with the input matrix (or output from a previous layer) and subjected to a nonlinear activation function to yield updated representations, which are often referred to as activations or feature maps. The loss function (also known as an objective function or empirical risk) can often be calculated by comparing the output of the neural network and the known target value data.

[0189] Feedforward networks, such as the neural network 1100 depicted in the embodiment of FIG. 11, are often configured as neural networks where information moves in one direction, from the input layer through the hidden layers to the output layer, without any cycles or loops. They are primarily used for tasks such as classification, regression, and simple pattern recognition, where each input is processed independently of others. In contrast, backpropagation is not a separate type of network but rather a training algorithm commonly used in both feedforward and other types of networks, like recurrent neural networks (RNNs).

[0190] Backpropagation involves adjusting the weights of the network in the reverse direction (from output to input) based on the error between the predicted output and the actual target during training. While feedforward describes the structure and data flow within the network, backpropagation is a technique used to optimize the model. Feedforward networks are ideal for straightforward tasks where input-output relationships are not sequential or time-dependent. However, for problems involving learning complex patterns over time, such as speech recognition or time-series analysis, networks that leverage backpropagation for training, like RNNs or deep feedforward networks with many hidden layers, become necessary to capture these intricate dependencies.

[0191] Typically, in these network arrangements, the weights are iteratively updated via various methods including, but not limited to, stochastic gradient descent algorithms in order to help minimize the loss function until the desired accuracy is achieved. Most modern deep learning frameworks can facilitate this by using reverse-mode automatic differentiation to obtain the partial derivatives of the loss function with respect to each network parameter through recursive application of the chain rule. Colloquially, this is also known as back-propagation. Common gradient descent algorithms can include, but are not limited to, Stochastic Gradient Descent (SGD), Adam, Adagrad etc. The learning rate is an important parameter in gradient descent. Except for SGD, all other methods use adaptive learning parameter tuning. Depending on the objective such as classification or regression, different loss functions such as Binary Cross Entropy (BCE), Negative Log Likelihood Loss (NLLL) or Mean Squared Error (MSE) can be used.

[0192] Neural network architecture is commonly used for a wide range of tasks in fields such as computer vision, natural language processing, financial forecasting, and materials science. For instance, it can be employed to recognize patterns in images, such as identifying objects or faces, or to classify text into categories, like spam detection in emails. It is also useful in regression problems, such as predicting stock prices or energy consumption, where input features can be processed to output continuous values. However, this is a general example of an artificial intelligence (AI) model, illustrating how a feedforward neural network works. Depending on the problem, other methods and models may be more appropriate. For example, convolutional neural networks (CNNs) are often used for image processing tasks, while recurrent neural networks (RNNs) are suitable for sequential data like time-series data or text. Additionally, simpler models like linear regression, decision trees, or support vector machines (SVMs) may be sufficient if the problem is less complex, or the dataset is relatively small. The embodiment depicted in FIG. 11 is presented as an exemplary ML solution that may be deployed within one or more methods or systems described herein.

[0193] In many embodiments, the input layer 1110 is the first layer in a neural network 1100 and serves as the initial point where raw data is introduced into the model. Each node (or neuron) in this layer represents an individual feature or variable from the dataset, allowing the network to receive and process various types of data, such as pixel values in an image, numerical features in a spreadsheet, or words in a text document. For instance, in image recognition tasks, the input layer can consist of nodes that correspond to the pixel values of the image, providing the network with the visual information needed to identify objects or patterns. The number of nodes in the input layer directly depends on the number of features present in the dataset. If there are one-hundred features in the data, the input layer will typically have one-hundred nodes, each conveying one piece of the information to the subsequent layers. FIG. 11 illustrates a set of n nodes in the input layer, where a first node receives Input 1 1111, a second node receives Input 2 1112, and a third node receives Input n 1115. In some embodiments, the inputs of the neural network 1100 are generally scaled i.e., normalized to have a zero mean and / or unit standard deviation. Scaling can also be applied to the input of hidden layers (using batch or layer normalization) to improve the stability of neural network 1100.

[0194] Unlike the hidden layers 1120 and output layers 1130, the input layer 1110 typically does not perform any computations or transformations on the data. Its primary function is often to pass the input data to the next layer in the network, the first hidden layer 1121. However, it is often desired that the data fed into this layer is preprocessed appropriately, such as being normalized or standardized, to ensure that the neural network can learn efficiently. Proper preprocessing, like scaling numerical values or encoding categorical variables, can help the network process data uniformly, facilitating more stable and faster convergence during training.

[0195] The input layer's design depends on the nature of the problem. For example, in natural language processing, the input layer may represent words encoded as numerical vectors, while in time-series analysis, each node might represent a data point in a sequence. While the input layer 1110 itself does not modify the data, it sets the stage for the neural network to extract complex patterns and relationships through the deeper layers. This flexibility in handling various types of input make the neural network 1100 a powerful tool for a diverse set of applications.

[0196] With respect to the embodiments described herein, the input layer may be configured with a plurality of inputs providing input data 1150. As those skilled in the art will recognize, input data 1150 can vary in form, structure, or size based on the specific application desired. For example, in large language models, the input may be one or more tokens taken from an input provided by a user. The neural network 1100 may also be a more specific step or sub-step within a larger AI / ML system. In some embodiments, the neural network 1100 may be a part of a multi-layer perceptron within a large language model. However, as those skilled in the art will recognize, additional setups can be configured to format the input data 1150 in a satisfactory way prior to processing by the neural network 1100.

[0197] In a number of embodiments, the neural network 1100 may comprise a plurality of hidden layers 1120. The embodiment depicted in FIG. 11 comprises a first hidden layer 1121, a second hidden layer 1122, and an nth hidden layer 1125, which are denoted as h1, h2, and hn respectively. In many embodiments, the hidden layers 1120 are where the core of the model's learning and pattern recognition occurs. In each hidden layer, individual neurons receive inputs from the previous layer, apply a set of weights, add a bias, and pass the result through an activation function (e.g., ReLU, leaky ReLU, sigmoid, hyperbolic tangent (tanh), Swish, etc.). This process can introduce non-linearity, allowing the network to capture complex patterns in the data that simple linear models cannot. The intricate web of connections among neurons across layers helps the network transform and process input features into representations that become progressively more abstract and useful for making predictions.

[0198] The first hidden layer 1121 h1 receives direct input from the input layer, transforming the raw data into an initial set of features. For example, in an image recognition task, this layer might begin identifying basic patterns, such as edges or simple textures. The output of the first hidden layer 1121 is then passed to a second hidden layer 1122 h2, which builds upon the features identified by the first hidden layer 1121. This deeper layer might start recognizing more complex patterns, such as shapes or specific object components, by combining the lower-level features identified earlier. This can continue on until a last, nth hidden layer 1125 hn continues this abstraction process, allowing the network to recognize even higher-level, more detailed features, such as identifying an entire object within an image or understanding intricate relationships in the input data.

[0199] Each hidden layer adds a level of complexity and abstraction to the network's learning capabilities. The multi-layer structure can enable the network to move from recognizing simple patterns in the first input layer 1121 to highly complex, abstract concepts in the deeper layers. The number of hidden layers and neurons within them can vary depending on the problem's complexity. More hidden layers generally allow the network to model more intricate functions, making deep neural networks especially effective for tasks like image recognition, natural language processing, and complex predictive modeling. However, adding more layers also increases the computational demand and the risk of overfitting, highlighting the need to carefully design and tune these hidden layers for optimal performance.

[0200] In various embodiments, the output layer 1130 is often the final layer in a neural network and is responsible for producing the network's predictions or classifications based on the information processed through the previous hidden layers 1120. Each neuron in the output layer 1130 can represent a specific outcome or category that the model can predict. In the embodiment depicted in FIG. 11, the outputs are labeled as “output 1”1131 to “output n”1135, indicating that the network can be designed to have a varying number of outputs depending on the nature of the problem being solved for. For example, in a binary classification task (e.g., an email is spam vs. an email is safe), there would typically be a single output neuron that provides a probability score for one of the two classes / outcomes. In contrast, for multi-class classification (e.g., determining an optimal path from many to transmit data), the output layer would contain multiple neurons, each corresponding to a different class.

[0201] The number of neurons in the output layer 1130 can be designed specifically for other types of tasks, such as regression, where the model can predict continuous values. In such cases, the output layer 1130 might contain a single neuron representing a numerical prediction, such as the price of a house or the temperature forecast, etc. Alternatively, in complex applications like multi-label classification (where each input can belong to multiple classes simultaneously), the output layer 1130 could have multiple neurons, each representing a different class, with each neuron outputting a probability of the input belonging to that specific class.

[0202] The activation function used in the output layer can vary based on the desired output. For binary classification, a sigmoid function is commonly used to produce a probability between 0 and 1. For multi-class classifications, a SoftMax function can be applied to output a set of probabilities that sum to 1, indicating the most likely class. For regression problems, a linear activation function is often used to output a continuous range of values. The flexibility in designing the output layer allows the neural network 1100 to be applied to a wide variety of tasks, from simple binary decisions to complex multi-output predictions, making them a versatile tool in artificial intelligence and machine learning.

[0203] Although a specific embodiment for an exemplary neural network suitable for carrying out the various steps, processes, methods, and operations described herein is discussed with respect to FIG. 11, any of a variety of systems and / or processes may be utilized in accordance with embodiments of the disclosure. For example, real-world neural networks are often far more complex, featuring many more layers, nodes, and connections than the simplified structure shown in the embodiment depicted in FIG. 11, which is an illustrative example meant to make it easier to explain the basic concepts of neural networks and how they process information. The specific features and functions described herein are not intended to be limiting to this specific embodiment. Additionally, the elements depicted in FIG. 11 may also be interchangeable with other elements of FIGS. 8-3 and 12-10 as required to realize a particularly desired embodiment.

[0204] Referring to FIG. 12, a conceptual illustration of a variety of tokens for utilization within a large language model in accordance with various embodiments of the disclosure is shown. While most people are familiar with typing commands directly into a computer, interacting with a large language model (LLM) typically involves using prompts that are broken down into smaller units called tokens. These tokens can be segments of the original input prompt, such as individual words, subwords, or characters, allowing the model to process the prompt in manageable, structured pieces for a more nuanced understanding.

[0205] In fact, tokens are most often a fundamental unit of data used to represent a larger, general input for large language models (LLMs) and similar AI systems. In the context of LLMs, tokens are segments of text derived from the input prompt, where each token represents a manageable piece of the input, such as a word, part of a word, or a character. This segmentation can allow the model to break down complex text into simpler, consistent units that can be processed independently and then understood in relation to each other. By dividing input data into tokens, LLMs can handle language in a structured, flexible manner, adapting to diverse text inputs, from full sentences to specialized jargon or short phrases.

[0206] In many embodiments, tokens can serve as building blocks, enabling models to interpret language by analyzing these discrete parts and their relationships. For instance, in English, tokens often correspond to whole words, but when dealing with specialized vocabulary, slang, or languages with compound words, tokens might represent subwords or even single characters. This tokenization approach helps to maintain a balance between flexibility and precision, as smaller tokens allow the model to handle unfamiliar or highly specific terms more effectively. In a number of embodiments, each token can be encoded with a unique identifier that the model can use to differentiate it from others, preserving the distinct meaning or function it carries in context.

[0207] In the embodiment depicted in FIG. 12, a textual input prompt 1210 is shown as divided up into a plurality of tokens. A first token 1211 includes the word “To” while a second token comprises the next word “date.” In some embodiments, the first token 1211 can be configured to include the space between “To” and “date.” This small change can be utilized by the LLM to further divine meaning from the textual input prompt 1210. The number of tokens can vary depending on the type of input provided. This can extend from the first token 1211, to the second token 1212, to the nth or last token 1215 within the textual input prompt 1210. This last token 1219 can be utilized to indicate a requested or projected response.

[0208] Beyond text, similar tokenization principles may apply to other data types when used in models that process audio or visual input. For audio data, tokenization can involve dividing a sound file into slices, where each token might represent a short segment of audio, perhaps a fraction of a second or a small, meaningful slice of a larger waveform. By breaking audio down in this way, the model can analyze specific sounds, pitches, or rhythms within the context of the entire recording. This segmentation enables the model to interpret audio inputs in a structured format, similar to how language is tokenized, making it easier to process complex auditory patterns and understand sounds in a sequential manner.

[0209] In the embodiment depicted in FIG. 12, the audio input prompt 1220 is shown divided into a plurality of audio slices. The first audio token 1221 comprises a number of samples within the audio input prompt 1220. Likewise, the second audio token 1222 comprises a second number of samples within the audio input prompt 1220. This slicing of the audio input prompt 1220 can continue throughout the rest of the remaining audio such that when all tokens have been processed, the system can determine a best guess for the next audio token that should be appended to the end of the audio input prompt 1220.

[0210] In the case of visual data, such as images, tokenization often involves segmenting the image into smaller chunks or patches, each of which becomes a visual token. These tokens represent different parts of the image, like color regions, edges, or textures, which the model can examine individually. Visual tokens enable the model to capture the intricate details within an image by focusing on manageable portions, while still considering their relationships to the broader visual structure. This approach allows AI systems to interpret complex images by analyzing these visual segments in the same way LLMs handle text tokens, offering a structured method for processing and understanding visual content.

[0211] In the embodiment depicted in FIG. 12, the image data prompt 1230 is divided into a plurality of smaller visual tokens. The first visual input token 1231 is shown as a small square portion of the original, larger image. This procedure of processing various chunks of the original image data prompt 1230 can occur on these smaller portions of the image, such as the second visual input token 1232, up to and including the nth visual input token 1235. Each of these smaller visual tokens can be processed individually, but often in parallel to each other.

[0212] The concept of tokens is therefore versatile, allowing diverse types of input, whether text, sound, or images, to be converted into standardized, model-friendly formats. Tokenization creates a consistent framework for representing complex data types in a way that artificial intelligence systems can process effectively. This segmentation enables each model, regardless of the input type, to dissect and examine different parts of the data with a fine level of granularity, which is especially important when working with highly detailed or nuanced inputs. This tokenized structure can enable the model to interpret the input systematically, providing a foundation for further processing and understanding of the information encapsulated within each token.

[0213] Although a specific embodiment for a variety of tokens for utilization within a large language model suitable for carrying out the various steps, processes, methods, and operations described herein is discussed with respect to FIG. 12, any of a variety of systems and / or processes may be utilized in accordance with embodiments of the disclosure. In many non-limiting examples, the type and number of tokens can vary depending on the specific application desired and / or the amount of available processing power available to handle the input prompt. The elements depicted in FIG. 12 may also be interchangeable with other elements of FIGS. 8-11 and 13-16 as required to realize a particularly desired embodiment.

[0214] Referring to FIG. 13, a conceptual illustration of an embedding matrix 1300 for a large language model, in accordance with various embodiments of the disclosure is shown. In many embodiments of large language models (LLMs), embedding matrices are components that enable the model to interpret tokens in a mathematically accessible way. An embedding matrix 1300 is essentially a large table of vector representations, where each token in the model's vocabulary is assigned a unique vector, or array of numbers, that captures its initial meaning in relation to other tokens. When an input prompt is tokenized, each token can be matched with a corresponding entry in the embedding matrix 1300. In a number of embodiments, this lookup process can provide the token with an initial value, or embedding, which represents the token in a multi-dimensional space. These embeddings allow the model to recognize patterns, relationships, and meanings in language beyond simple string matching, forming the foundation for all further processing within the model.

[0215] In a number of embodiments, each entry in the embedding matrix 1300 is a vector of fixed size, with each dimension in the vector representing a distinct feature or aspect of the token's meaning. For example, words that are semantically or contextually similar may have embeddings that place them close to one another in this multi-dimensional space. This spatial relationship allows the model to capture a form of conceptual proximity wherein synonyms or related terms might occupy nearby areas in this space, while antonyms or unrelated words are farther apart. By assigning each token an embedding with specific values, the matrix can encode subtle linguistic and contextual information into numerical form, enabling the model to work with tokens in a highly structured, yet flexible, manner.

[0216] In the embodiment depicted in FIG. 13, the embedding matrix 1300 is associated with every known word in the English language. In other words, the matrix has a column associated with each of the around 50,000 or so words in English. Each column of the embedding matrix 1300 comprises a vector 1360 which associates the corresponding word to a location with a multi-dimensional space. For example, the first word 1351“aah” has a corresponding vector 1360 from the first entry +1.0, to the nth entry −3.7. Likewise, the second word 1352“aardvark” has another column of vector values associated with it starting at +4.3 and ending in −2.0. Finally, the nth word 1359“zzz” is associated with a corresponding vector 1360 that includes the values in the column starting at +9.5 to +7.9. As each token is processed, it is assigned the corresponding vector 1360 taken from the embedding matrix 1300.

[0217] The embedding matrix 1300 is typically learned during the model's training phase. As the model is exposed to vast amounts of text, it iteratively adjusts the values in the embedding vectors to capture the relationships between tokens more accurately. Through this process, embeddings evolve to represent the associations, contexts, and distinctions that the model has observed across its training data. For instance, words that frequently appear together or in similar contexts may have embeddings that reflect this association. The embedding matrix 1300 thus serves as a kind of “knowledge base” for initial token relationships, giving the model a structured way to approach the vast variability in language.

[0218] This embedding approach is highly efficient because it enables the model to generalize across contexts and recognize similarities even with previously unseen tokens. For example, even if a token or phrase in a prompt has not been encountered during training, the model can infer its meaning based on the embeddings of other, similar tokens. This generalization is possible because embeddings capture both specific meanings and broader patterns, allowing the model to interpret novel inputs based on its learned understanding of language structure and relationships. By embedding tokens in a shared space, the model can gain a foundational understanding of language that it can apply across various prompts and contexts. This arrangement can allow the LLM to move beyond a rigid, word-by-word interpretation and instead engage with language as a rich network of interconnected meanings and ideas.

[0219] Although a specific embodiment for an embedding matrix for a large language model suitable for carrying out the various steps, processes, methods, and operations described herein is discussed with respect to FIG. 13, any of a variety of systems and / or processes may be utilized in accordance with embodiments of the disclosure. For example, similar concepts associated with the embedding matrix 1300 of FIG. 13 can be applied to other types of embedded matrices associated with other data types. It is contemplated that the embedding matrix is only limited by the types of input data that it is configured to process. The elements depicted in FIG. 13 may also be interchangeable with other elements of FIGS. 8-5 and 14-9 as required to realize a particularly desired embodiment.

[0220] Referring to FIG. 14, a conceptual illustration of an input prompt converted from a series of tokens into a series of tensors in accordance with various embodiments of the disclosure is shown. In many embodiments, when an input prompt is converted into tokens, each of these tokens is then transformed through an embedding matrix to yield a unique vector representation, known as an embedding. This embedding is often a numerical array, or tensor, that encodes the token's position, context, and meaning within a multi-dimensional space. Essentially, once the tokenized prompt passes through the embedding matrix, each token is matched with a tensor that captures both its individual characteristics and its relationships to other tokens in the model's vocabulary. These tensors form the foundational representation of the prompt, providing structured data that the model can process to understand and generate contextually relevant responses.

[0221] Each tensor associated with a token after embedding can represent a fixed number of dimensions, often hundreds or even thousands, depending on the model's architecture. These dimensions give the tensor a rich structure, with each element in the tensor reflecting different features of the token's meaning. For instance, certain dimensions might encode aspects related to semantic similarity, part of speech, or contextual nuances observed during training. By encoding these complex features into a tensor, the model gains a detailed, flexible understanding of the token's role in the input prompt, which becomes critical for capturing context, sentiment, and intent in language processing tasks.

[0222] In various embodiments, the collection of tensors generated from the embedded tokens can create a high-dimensional representation of the entire prompt, with each tensor holding a unique set of values corresponding to its specific token. Because each tensor encodes information about a single token, the model can recognize patterns in the prompt by examining the relationships between these tensors. For example, words that often appear together may have similar values in certain dimensions of their tensors, allowing the model to capture implicit relationships and context within the input. This organized structure of tensors provides the model with a map of the prompt that it can analyze to make inferences about meaning, order, and emphasis.

[0223] In the embodiment depicted in FIG. 14, the first token 1411 is associated with the word “To” and has a corresponding tensor 1431 which is an array in multi-dimensional space. Likewise, the second token 1412 is associated with a second tensor 1432. Each token within the input prompt is subsequently associated with a corresponding tensor, up to the last and nth token 1415 which is associated with the nth tensor 1435. Processing these input prompt tokens will yield a projected or otherwise best fit for what the next token / word 1419 will be.

[0224] In further embodiments, the use of tensors can allow the model to handle complex language structures efficiently, as each token's tensor can interact with others in ways that reflect natural language dependencies. By representing each token as a tensor, the model can apply various mathematical operations across these tensors to analyze and synthesize information. These operations enable the model to determine which tokens are most relevant to one another within the context of the prompt. For instance, determining the vector difference between two related words like “man” and “woman” may be applied to a different context to determine similar words like applying that same vector difference to the vector associated with “uncle” to lead to the vector associated with the word “aunt”.

[0225] Although a specific embodiment for an input prompt converted from a series of tokens into a series of tensors suitable for carrying out the various steps, processes, methods, and operations described herein is discussed with respect to FIG. 14, any of a variety of systems and / or processes may be utilized in accordance with embodiments of the disclosure. For example, the number of elements within a tensor can number in the thousands, or even tens of thousands, depending on the complexity of the model. Additionally, in various embodiments, the position of the token within the input prompt can also be encoded within the tensor, which may be done by processing some additional value to the original tensor. The elements depicted in FIG. 14 may also be interchangeable with other elements of FIGS. 8-6 and FIGS. 15-10 as required to realize a particularly desired embodiment.

[0226] Referring to FIG. 15, a conceptual illustration of an attention layer process 1500 within a large language model in accordance with various embodiments of the disclosure is shown. When processing languages such as English, understanding the context of each word or token within an input prompt is beneficial. As such, many embodiments herein comprise at least one attention layer for processing the embedded tokens.

[0227] Take for example, the following three sentences: “I saw an American shrew mole,”“Measure one mole of carbon dioxide,” and “Take a biopsy of that mole”. Each of these sentences utilize the word “mole” in distinct contexts, demonstrating how language can carry multiple meanings based on surrounding words and phrases. In natural language processing, understanding these varied meanings requires the model to consider each token in relation to its neighbors, which is where attention layers become crucial. By focusing on the surrounding context of each instance of “mole,” an attention layer can discern whether it refers to an animal, a unit of chemical measurement, or a skin lesion. In many embodiments, the context, or set of nearby tokens, can allow the model to assign different meanings to “mole” depending on which other words are present, such as “American shrew” in the first case, “carbon dioxide” in the second, and “biopsy” in the third.

[0228] In a number of embodiments, attention layers can enable the model to weigh the relevance of each neighboring token to identify the specific meaning of “mole” in each phrase. For example, in “An American shrew mole,” the attention mechanism can emphasize the tokens “American” and “shrew,” which typically appear in contexts related to animals, thus guiding the model to interpret “mole” as a small mammal. Conversely, for the phrase “One mole of carbon dioxide,” however, the presence of “carbon dioxide” and the numerical term “one” shifts the focus toward scientific terminology, signaling that “mole” refers to a unit of chemical measurement. Similarly, in “Take a biopsy of that mole,” attention is drawn to the medical term “biopsy,” leading the model to interpret “mole” as a skin lesion. Through this mechanism, attention layers allow the model to dynamically adapt its understanding of words based on context, handling polysemous terms (words with multiple meanings) with greater accuracy.

[0229] In this way, attention layers can help the model “tease out” the correct meanings by selectively focusing on relevant tokens within the prompt. By assigning higher weights to contextually significant words, the model can make nuanced distinctions between different senses of the same token. This ability to disambiguate words based on context is essential for LLMs to generate accurate and meaningful responses, as it enables them to navigate the inherent complexity and flexibility of human language.

[0230] In literature, the generation of “attention” with these attention layers is described as:Attention⁢ (Q,K,V)=soft⁢max⁡(QKTdk)⁢V

[0231] Wherein Q represents the query matrix which itself is a placeholder for the “query” vectors derived from each embedded token in the input sequence. When processing language, each token (or word) is associated with a specific query vector that encodes what that token is “looking for” in other tokens within the sequence. In many embodiments, these query vectors are produced by multiplying the token embeddings by a learned weight matrix specific to the queries. The query serves as a way for the model to actively seek out relevant information from other tokens, allowing it to identify connections or dependencies between different parts of the sequence. Thus, queries capture the intention or focus of each token as it interacts with the rest of the input.

[0232] K is associated with the key matrix consisting of “key” vectors, which are similarly derived from the input sequence. Each token has an associated key vector that represents the essential information it holds. While queries represent what each token is searching for, keys encode what each token offers in terms of information. Keys are generated by multiplying token embeddings with a learned weight matrix distinct from that used for queries. The relationship between queries and keys determines how strongly one token will attend to another, allowing the model to weigh the relevance of each token to each other token within the sequence.

[0233] The term QKT therefore represents the dot product between the query and key matrices. This operation calculates the similarity (or relevance) between each query vector and each key vector, effectively measuring how much attention one token should give to another. The resulting score indicates how strongly each token should focus on every other token, capturing the relationships within the input sequence. This relevance score is fundamental to the attention mechanism, as it serves as the basis for distributing focus across the sequence.

[0234] Within the above equation, V stands for “value”, insomuch as a value matrix contains “value” vectors, which can represent the actual content information associated with each token. Unlike queries and keys, which often work to determine the relevance of tokens to each other, values contain the data the model will pass along through the attention layer. Value vectors are produced by multiplying token embeddings with a learned weight matrix specific to values. These value vectors carry the contextual information that the model will use when constructing output, ensuring that the information emphasized by the attention mechanism is carried forward in processing.

[0235] The division by √{square root over (dk)} is a scaling factor where dk denotes the dimensionality of the query and key vectors. Without this scaling, the dot product values in QKT could become large as the number of dimensions increases, which would push the SoftMax function towards extreme values, creating an unstable learning process. By scaling with √{square root over (dk)}, the model normalizes the scores, keeping gradients more manageable and stabilizing the SoftMax output, which aids in more effective learning and model convergence.

[0236] In the embodiment depicted in FIG. 15, an input prompt of “a fluffy blue creature roamed the verdant forest” is being processed through the attention filter represented by the attention layer process 1500. Each of these tokens, such as a first token, are subject to processing through a query vector 1510 shown as WQ. In a very simplistic way (and described herein for illustrative purposes), the token has an associated query vector that can “ask” questions in a numerical way such as, but not limited to, “are there any adjectives in front of me”? In response, words that are adjectives before the creature token 1540 are more likely to be activated later on.

[0237] Specifically, each token has an associated vector / tensor written down herein as E1, E2 onward to E8. Each of these vectors / tensors can be multiplied by or otherwise processed by a corresponding query matrix (shown as WQ) to generate a query vector, denoted by Q1, Q2 onward to Q8. Likewise, the same tokens, such as the first key token 1525, second key token 1535, and fourth key token 1545 can be processed through a key matrix (shown as Wk 1550) to generate corresponding key vectors denoted by K1, K2, and the like. Finally, for each token, the dot product of the query vector and key vector are determined. These values are then operated on through a type of SoftMax filter to generate a specific format of numbers such that each value will be placed between 0 and 1, and the sum off all values within a column shall be equal to 1. In this way, we can see that the“fluffy” token 1520 and “blue” token 1530 output a large value in association with the token “creature” as those tokens are adjectives describing the creature token 1540. Similar values appear when “the” and “verdant” are compared to the token “forest”.

[0238] In a variety of embodiments, the result of this dot product is an “attention vector” that can be added to the original vector such that a new modified attention vector is created. The goal is to move the vector associated with the token to a spot on the multi-dimensional space that is closer to other related terms. This output can then be sent to one or more multi-layer perceptrons (MLPs).

[0239] Although a specific embodiment for an attention layer process 1500 within a large language model suitable for carrying out the various steps, processes, methods, and operations described herein is discussed with respect to FIG. 15, any of a variety of systems and / or processes may be utilized in accordance with embodiments of the disclosure. For example, the process described herein with reference to FIG. 15 and the attention models is presented in a simplistic fashion in order to allow for increased comprehension. However, those skilled in the art would recognize that other steps or attention model types may be utilized such as, but not limited to multi-head attention, and multi-head attention. The elements depicted in FIG. 15 may also be interchangeable with other elements of FIGS. 8-14, 16, and 17 as required to realize a particularly desired embodiment.

[0240] Referring to FIG. 16, a conceptual illustration of a multi-layer perceptron within a large language model in accordance with various embodiments of the disclosure is shown. In many embodiments within large language models (LLMs), multi-layer perceptrons (MLPs) play a role in refining and processing information after it has passed through the attention layers. MLPs, in the context of LLMs, are often positioned after each attention layer to add further transformations to the information embedded within each token. After the attention layer has modified each token's vector based on context and relationships with other tokens, this modified vector is then passed through an MLP. This MLP typically consists of a sequence of linear transformations, combined with a non-linear activation function, such as ReLU (Rectified Linear Unit). By applying these transformations, the MLP can help to fine-tune the representation of each token, capturing essential details and storing “factual” information that the model may rely on later.

[0241] The process can begin with a linear transformation, which expands the dimensions of the modified vector 1610, essentially mapping it to a higher-dimensional space. In the embodiment depicted in FIG. 16, the original modified vector 1610, which is typically an output of an attention layer, is processed through a linear transformation to yield a first output vector 1620. This initial expansion can allow the MLP to encode more complex information within each vector, giving it more capacity to capture and retain meaningful details.

[0242] After this expansion, various embodiments can apply a ReLU activation function, which introduces non-linearity into the processing. ReLU is particularly effective because it enables the model to focus on positive values within the vector, setting any negative values to zero. This step allows the model to highlight certain features within the token's vector while suppressing others, helping it differentiate important from less relevant information within the encoded representation. In the embodiment depicted in FIG. 16, the ReLU output vector 1630 is subsequently processed through another linear transformation.

[0243] In a number of embodiments, this second linear transformation can down-project the vector back to its original dimensionality. This step can ensure that the output from the MLP has the same dimensions as the input vector, allowing for a consistent vector size across all layers. The output vector 1640 from this down-projection is then added back to the original modified vector from the attention layer, creating what's known as a residual connection 1650. This residual connection 1650 combines the newly refined features from the MLP with the original contextual information produced by the attention layer. This approach enhances stability during training and allows the model to retain both the relational context and the refined factual details within the token's representation.

[0244] In the broader architecture of LLMs, MLPs are often considered the component where “facts” are stored. While the attention mechanism focuses on identifying relationships and associations between tokens, essentially, contextualizing each word within the sentence structure, the MLPs focus on enriching each token's representation with more granular, content-specific details. Through the repeated application of MLPs across multiple layers, the model can accumulate and consolidate information, effectively “remembering” facts and attributes associated with different words or phrases. This allows LLMs to recall specifics about language usage, word meanings, and even broader real-world information encoded in the training data.

[0245] In contrast, the attention layers are where the “associations” are stored, focusing on dynamically adjusting each token's focus depending on its context within the input sequence. Attention layers determine how strongly each token should relate to others, capturing nuances like syntax, grammar, and context-sensitive meanings. While attention layers dynamically build context, MLPs hold onto factual representations that serve as the knowledge base within each layer. Together, the attention and MLP layers enable the model to balance understanding relationships with retaining concrete information, resulting in a robust representation of both context and knowledge.

[0246] In a number of embodiments, input data often passes through multiple rounds of attention filters and multi-layer perceptron (MLP) layers, forming a sequence of transformations that incrementally refine the model's understanding of the input before reaching the final output stage. Each layer in the transformer model, the architecture commonly used for LLMs, includes both an attention component and an MLP component, with these two parts working in tandem to progressively deepen the model's comprehension of the text. This sequence is repeated over numerous layers, allowing the model to develop a sophisticated representation of the entire input sequence through cumulative transformations. By the end of these repeated passes, each token vector holds a highly nuanced, multi-dimensional understanding of the prompt. Once all layers have processed the data, the final, refined vectors proceed to the unembedding stage, where they are mapped back to language tokens that represent the model's predicted output.

[0247] Although a specific embodiment for a multi-layer perceptron within a large language model suitable for carrying out the various steps, processes, methods, and operations described herein is discussed with respect to FIG. 16, any of a variety of systems and / or processes may be utilized in accordance with embodiments of the disclosure. For example, as those skilled in the art will recognize, the specific layout and structure of the MLP layer can vary depending on the specific application desired. The elements depicted in FIG. 16 may also be interchangeable with other elements of FIGS. 8-15 and 17 as required to realize a particularly desired embodiment.

[0248] Referring to FIG. 17, a conceptual illustration of an unembedding process within a large language model in accordance with various embodiments of the disclosure is shown. In many embodiments, the final stage of a large language model's (LLM) processing is called unembedding, where it transforms the refined vectors from the last layer back into a probability distribution over potential output tokens. This stage is useful because it can allow the model to generate language tokens that represent the most likely continuations or responses to the input prompt. To achieve this, each vector (representing a token in the sequence) is mapped back to the model's vocabulary, which may contain tens of thousands of possible tokens. Unembedding utilizes a learned matrix, similar to the embedding matrix used at the input stage, but in reverse. Instead of converting tokens into vectors, it translates the processed vectors back into a set of potential language tokens that the model can output.

[0249] In a number of embodiments, the matrix output 1720 from the unembedding process is a final array 1730 where each entry corresponds to a probability score for a potential token. This probability distribution indicates how likely each word or phrase is to follow the input sequence, based on the context the model has built through its layers of attention and MLP processing. For instance, if the input prompt 1710, such as in the embodiment depicted in FIG. 17, is “That which does not kill you only makes you,” the unembedding process will produce a ranked list of possible next words, e.g., response 1719. In this case, the word “stronger” might appear as the most probable continuation, with a high probability score. In FIG. 17, the probability of the “stronger” token response 1741 within the list of possible token responses 1740 is shown as 90.60 percent. This reflects the model's understanding of common phraseology and context, identifying “stronger” as a likely completion due to its frequency and relevance in similar contexts within the training data.

[0250] The ranked list produced during unembedding may include other potential outputs, each with an associated probability score that indicates its relative likelihood. For example, the word “stranger” could appear as a less probable continuation, with a probability of 2.80 percent, still present in the ranked list but much lower than “stronger.” This ranking reflects the model's capacity to recognize alternative continuations, including those that might follow less conventional but still possible language patterns. Other words, such as “more” or “weaker,” may also appear on this list, each with its own probability based on the contextual and semantic associations the model has learned. This probabilistic approach allows the model to produce flexible responses and make informed guesses about the next token in a way that mimics human language prediction.

[0251] The unembedding process may not only provide a ranked list of potential next words but also enable the model to maintain flexibility in generating responses. Depending on the application, the model might choose the highest-ranked token for a precise and likely output, or it could sample from the probability distribution to introduce variability, which can be useful in creative text generation or conversational applications. By examining the distribution of probabilities across potential tokens, the model can adapt its output strategy to different tasks, choosing the most probable word for accuracy or exploring lesser probable options for creative responses. This versatility is one of the reasons LLMs are effective across diverse language tasks, from completing sentences to generating open-ended stories.

[0252] The probability distribution generated in the unembedding phase reflects the culmination of all previous processing steps, encapsulating the context, associations, and factual information encoded within the model. Each token's probability is informed by the layers of attention and MLP transformations, which allow the model to build a nuanced understanding of the input. By ranking potential outputs, the model can provide a final “decision” on the next token based on its understanding, with the unembedding process acting as a bridge between the abstract, high-dimensional vector space within the model and the concrete language output we see.

[0253] In further embodiments, the LLM can generate entire sequences of text by using its own output as the input for subsequent steps, allowing it to create a series of tokens that form coherent responses or passages. Once the model generates a probable next token, it can feed this token back into its input pipeline, treating it as the next part of the prompt. This iterative process enables the model to build on each newly generated token, maintaining continuity and context with each step. For example, if the initial prompt is “The sky is,” and the model predicts “blue” as the most probable next word, it can then take “The sky is blue” as the new input. By repeating this cycle, the LLM can produce extended responses, updating its understanding of context and adjusting its predictions as it goes along. This feedback loop allows the model to generate complex, contextually aligned sequences, whether for completing sentences, generating stories, or engaging in conversational responses, all by sequentially predicting and incorporating each token into its evolving context.

[0254] Although a specific embodiment for an unembedding process within a large language model suitable for carrying out the various steps, processes, methods, and operations described herein is discussed with respect to FIG. 17, any of a variety of systems and / or processes may be utilized in accordance with embodiments of the disclosure. For example, the output for other types of models can be token related to images, sounds, or other data format types. The elements depicted in FIG. 17 may also be interchangeable with other elements of FIGS. 8-16 as required to realize a particularly desired embodiment.

[0255] Entities that operate computing environments need information about their computing environments. For example, an entity may need to know the operating status of the various computing resources in the entity's computing environment, so that the entity can administer the environment, including performing configuration and maintenance, performing repairs or replacements, provisioning additional resources, removing unused resources, or addressing issues that may arise during operation of the computing environment, among other examples. As another example, an entity can use information about a computing environment to identify and remediate security issues that may endanger the data, users, and / or equipment in the computing environment. As another example, an entity may be operating a computing environment for some purpose (e.g., to run an online store, to operate a bank, to manage a municipal railway, etc.) and may want information about the computing environment that can aid the entity in understanding whether the computing environment is operating efficiently and for its intended purpose.

[0256] Collection and analysis of the data from a computing environment can be performed by a data intake and query system such as is described herein. A data intake and query system can ingest and store data obtained from the components in a computing environment, and can enable an entity to search, analyze, and visualize the data. Through these and other capabilities, the data intake and query system can enable an entity to use the data for administration of the computing environment, to detect security issues, to understand how the computing environment is performing or being used, and / or to perform other analytics.

[0257] FIG. 18 is a block diagram illustrating an example computing environment 1800 that includes a data intake and query system 1810. The data intake and query system 1810 obtains data from a data source 1802 in the computing environment 1800 and ingests the data using an indexing system 1820. A search system 1860 of the data intake and query system 1810 enables users to navigate the indexed data. Though drawn with separate boxes in FIG. 18, in some implementations the indexing system 1820 and the search system 1860 can have overlapping components. A computing device 1804, running a network access application 1806, can communicate with the data intake and query system 1810 through a user interface system 1814 of the data intake and query system 1810. Using the computing device 1804, a user can perform various operations with respect to the data intake and query system 1810, such as administration of the data intake and query system 1810, management and generation of “knowledge objects,” (user-defined entities for enriching data, such as saved searches, event types, tags, field extractions, lookups, reports, alerts, data models, workflow actions, and fields), initiating of searches, and generation of reports, among other operations. The data intake and query system 1810 can further optionally include apps 1812 that extend the search, analytics, and / or visualization capabilities of the data intake and query system 1810.

[0258] The data intake and query system 1810 can be implemented using program code that can be executed using a computing device. A computing device is an electronic device that has a memory for storing program code instructions and a hardware processor for executing the instructions. The computing device can further include other physical components, such as a network interface or components for input and output. The program code for the data intake and query system 1810 can be stored on a non-transitory computer-readable medium, such as a magnetic or optical storage disk or a flash or solid-state memory, from which the program code can be loaded into the memory of the computing device for execution. “Non-transitory” means that the computer-readable medium can retain the program code while not under power, as opposed to volatile or “transitory” memory or media that requires power in order to retain data.

[0259] In various examples, the program code for the data intake and query system 1810 can be executed on a single computing device, or execution of the program code can be distributed over multiple computing devices. For example, the program code can include instructions for both indexing and search components (which may be part of the indexing system 1820 and / or the search system 1860, respectively), which can be executed on a computing device that also provides the data source 1802. As another example, the program code can be executed on one computing device, where execution of the program code provides both indexing and search components, while another copy of the program code executes on a second computing device that provides the data source 1802. As another example, the program code can be configured such that, when executed, the program code implements only an indexing component or only a search component. In this example, a first instance of the program code that is executing the indexing component and a second instance of the program code that is executing the search component can be executing on the same computing device or on different computing devices.

[0260] The data source 1802 of the computing environment 1800 is a component of a computing device that produces machine data. The component can be a hardware component (e.g., a microprocessor or a network adapter, among other examples) or a software component (e.g., a part of the operating system or an application, among other examples). The component can be a virtual component, such as a virtual machine, a virtual machine monitor (also referred as a hypervisor), a container, or a container orchestrator, among other examples. Examples of computing devices that can provide the data source 1802 include personal computers (e.g., laptops, desktop computers, etc.), handheld devices (e.g., smart phones, tablet computers, etc.), servers (e.g., network servers, compute servers, storage servers, domain name servers, web servers, etc.), network infrastructure devices (e.g., routers, switches, firewalls, etc.), and “Internet of Things” devices (e.g., vehicles, home appliances, factory equipment, etc.), among other examples. Machine data is electronically generated data that is output by the component of the computing device and reflects activity of the component. Such activity can include, for example, operation status, actions performed, performance metrics, communications with other components, or communications with users, among other examples. The component can produce machine data in an automated fashion (e.g., through the ordinary course of being powered on and / or executing) and / or as a result of user interaction with the computing device (e.g., through the user's use of input / output devices or applications). The machine data can be structured, semi-structured, and / or unstructured. The machine data may be referred to as raw machine data when the data is unaltered from the format in which the data was output by the component of the computing device. Examples of machine data include operating system logs, web server logs, live application logs, network feeds, metrics, change monitoring, message queues, and archive files, among other examples.

[0261] As discussed in greater detail below, the indexing system 1820 obtains machine data from the data source 1802 and processes and stores the data. Processing and storing of data may be referred to as “ingestion” of the data. Processing of the data can include parsing the data to identify individual events, where an event is a discrete portion of machine data that can be associated with a timestamp. Processing of the data can further include generating an index of the events, where the index is a data storage structure in which the events are stored. The indexing system 1820 does not require prior knowledge of the structure of incoming data (e.g., the indexing system 1820 does not need to be provided with a schema describing the data). Additionally, the indexing system 1820 retains a copy of the data as it was received by the indexing system 1820 such that the original data is always available for searching (e.g., no data is discarded, though, in some examples, the indexing system 1820 can be configured to do so).

[0262] The search system 1860 searches the data stored by the indexing system 1820. As discussed in greater detail below, the search system 1860 enables users associated with the computing environment 1800 (and possibly also other users) to navigate the data, generate reports, and visualize search results in “dashboards” output using a graphical interface. Using the facilities of the search system 1860, users can obtain insights about the data, such as retrieving events from an index, calculating metrics, searching for specific conditions within a rolling time window, identifying patterns in the data, and predicting future trends, among other examples. To achieve greater efficiency, the search system 1860 can apply map-reduce methods to parallelize searching of large volumes of data. Additionally, because the original data is available, the search system 1860 can apply a schema to the data at search time. This allows different structures to be applied to the same data, or for the structure to be modified if or when the content of the data changes. Application of a schema at search time may be referred to herein as a late-binding schema technique.

[0263] The user interface system 1814 provides mechanisms through which users associated with the computing environment 1800 (and possibly others) can interact with the data intake and query system 1810. These interactions can include configuration, administration, and management of the indexing system 1820, initiation and / or scheduling of queries that are to be processed by the search system 1860, receipt or reporting of search results, and / or visualization of search results. The user interface system 1814 can include, for example, facilities to provide a command line interface or a web-based interface.

[0264] Users can access the user interface system 1814 using a computing device 1804 that communicates with data intake and query system 1810, possibly over a network. A “user,” in the context of the implementations and examples described herein, is a digital entity that is described by a set of information in a computing environment. The set of information can include, for example, a user identifier, a username, a password, a user account, a set of authentication credentials, a token, other data, and / or a combination of the preceding. Using the digital entity that is represented by a user, a person can interact with the computing environment 1800. For example, a person can log in as a particular user and, using the user's digital information, can access the data intake and query system 1810. A user can be associated with one or more people, meaning that one or more people may be able to use the same user's digital information. For example, an administrative user account may be used by multiple people who have been given access to the administrative user account. Alternatively or additionally, a user can be associated with another digital entity, such as a bot (e.g., a software program that can perform autonomous tasks). A user can also be associated with one or more entities. For example, a company can have associated with it a number of users. In this example, the company may control the users' digital information, including assignment of user identifiers, management of security credentials, control of which persons are associated with which users, and so on.

[0265] The computing device 1804 can provide a human-machine interface through which a person can have a digital presence in the computing environment 1800 in the form of a user. The computing device 1804 is an electronic device having one or more processors and a memory capable of storing instructions for execution by the one or more processors. The computing device 1804 can further include input / output (I / O) hardware and a network interface. Applications executed by the computing device 1804 can include a network access application 1806, such as a web browser, which can use a network interface of the client computing device 1804 to communicate, over a network, with the user interface system 1814 of the data intake and query system 1810. The user interface system 1814 can use the network access application 1806 to generate user interfaces that enable a user to interact with the data intake and query system 1810. A web browser is one example of a network access application. A shell tool can also be used as a network access application. In some examples, the data intake and query system 1810 is an application executing on the computing device 1804. In such examples, the network access application 1806 can access the user interface system 1814 without going over a network.

[0266] The data intake and query system 1810 can optionally include apps 1812. An app of the data intake and query system 1810 is a collection of configurations, knowledge objects (a user-defined entity that enriches the data in the data intake and query system 1810), views, and dashboards that may provide additional functionality, different techniques for searching the data, and / or additional insights into the data. The data intake and query system 1810 can execute multiple applications simultaneously. Example applications include an information technology service intelligence application, which can monitor and analyze the performance and behavior of the computing environment 1800, and an enterprise security application, which can include content and searches to assist security analysts in diagnosing and acting on anomalous or malicious behavior in the computing environment 1800.

[0267] Though FIG. 18 illustrates only one data source, in practical implementations, the computing environment 1800 contains many data sources spread across numerous computing devices. The computing devices may be controlled and operated by a single entity. For example, in an “on the premises” or “on-prem” implementation, the computing devices may physically and digitally be controlled by one entity, meaning that the computing devices are in physical locations that are owned and / or operated by the entity and are within a network domain that is controlled by the entity. In an entirely on-prem implementation of the computing environment 1800, the data intake and query system 1810 executes on an on-prem computing device and obtains machine data from on-prem data sources. An on-prem implementation can also be referred to as an “enterprise” network, though the term “on-prem” refers primarily to physical locality of a network and who controls that location while the term “enterprise” may be used to refer to the network of a single entity. As such, an enterprise network could include cloud components.

[0268] “Cloud” or “in the cloud” refers to a network model in which an entity operates network resources (e.g., processor capacity, network capacity, storage capacity, etc.), located for example in a data center, and makes those resources available to users and / or other entities over a network. A “private cloud” is a cloud implementation where the entity provides the network resources only to its own users. A “public cloud” is a cloud implementation where an entity operates network resources in order to provide them to users that are not associated with the entity and / or to other entities. In this implementation, the provider entity can, for example, allow a subscriber entity to pay for a subscription that enables users associated with the subscriber entity to access a certain amount of the provider entity's cloud resources, possibly for a limited time. A subscriber entity of cloud resources can also be referred to as a tenant of the provider entity. Users associated with the subscriber entity access the cloud resources over a network, which may include the public Internet. In contrast to an on-prem implementation, a subscriber entity does not have physical control of the computing devices that are in the cloud, and has digital access to resources provided by the computing devices only to the extent that such access is enabled by the provider entity.

[0269] In some implementations, the computing environment 1800 can include on-prem and cloud-based computing resources, or only cloud-based resources. For example, an entity may have on-prem computing devices and a private cloud. In this example, the entity operates the data intake and query system 1810 and can choose to execute the data intake and query system 1810 on an on-prem computing device or in the cloud. In another example, a provider entity operates the data intake and query system 1810 in a public cloud and provides the functionality of the data intake and query system 1810 as a service, for example under a Software-as-a-Service (SaaS) model, to entities that pay for the user of the service on a subscription basis. In this example, the provider entity can provision a separate tenant (or possibly multiple tenants) in the public cloud network for each subscriber entity, where each tenant executes a separate and distinct instance of the data intake and query system 1810. In some implementations, the entity providing the data intake and query system 1810 is itself subscribing to the cloud services of a cloud service provider. As an example, a first entity provides computing resources under a public cloud service model, a second entity subscribes to the cloud services of the first provider entity and uses the cloud computing resources to operate the data intake and query system 1810, and a third entity can subscribe to the services of the second provider entity in order to use the functionality of the data intake and query system 1810. In this example, the data sources are associated with the third entity, users accessing the data intake and query system 1810 are associated with the third entity, and the analytics and insights provided by the data intake and query system 1810 are for purposes of the third entity's operations.

[0270] FIG. 19 is a block diagram illustrating in greater detail an example of an indexing system 1920 of a data intake and query system, such as the data intake and query system 1810 of FIG. 18. The indexing system 1920 of FIG. 19 uses various methods to obtain machine data from a data source 1902 and stores the data in an index 1938 of an indexer 1932. As discussed previously, a data source is a hardware, software, physical, and / or virtual component of a computing device that produces machine data in an automated fashion and / or as a result of user interaction. Examples of data sources include files and directories; network event logs; operating system logs, operational data, and performance monitoring data; metrics; first-in, first-out queues; scripted inputs; and modular inputs, among others. The indexing system 1920 enables the data intake and query system to obtain the machine data produced by the data source 1902 and to store the data for searching and retrieval.

[0271] Users can administer the operations of the indexing system 1920 using a computing device 1904 that can access the indexing system 1920 through a user interface system 1914 of the data intake and query system. For example, the computing device 1904 can be executing a network access application 1906, such as a web browser or a terminal, through which a user can access a monitoring console 1916 provided by the user interface system 1914. The monitoring console 1916 can enable operations such as: identifying the data source 1902 for data ingestion; configuring the indexer 1932 to index the data from the data source 1902; configuring a data ingestion method; configuring, deploying, and managing clusters of indexers; and viewing the topology and performance of a deployment of the data intake and query system, among other operations. The operations performed by the indexing system 1920 may be referred to as “index time” operations, which are distinct from “search time” operations that are discussed further below.

[0272] The indexer 1932, which may be referred to herein as a data indexing component, coordinates and performs most of the index time operations. The indexer 1932 can be implemented using program code that can be executed on a computing device. The program code for the indexer 1932 can be stored on a non-transitory computer-readable medium (e.g. a magnetic, optical, or solid state storage disk, a flash memory, or another type of non-transitory storage media), and from this medium can be loaded or copied to the memory of the computing device. One or more hardware processors of the computing device can read the program code from the memory and execute the program code in order to implement the operations of the indexer 1932. In some implementations, the indexer 1932 executes on the computing device 1904 through which a user can access the indexing system 1920. In some implementations, the indexer 1932 executes on a different computing device than the illustrated computing device 1904.

[0273] The indexer 1932 may be executing on the computing device that also provides the data source 1902 or may be executing on a different computing device. In implementations wherein the indexer 1932 is on the same computing device as the data source 1902, the data produced by the data source 1902 may be referred to as “local data.” In other implementations the data source 1902 is a component of a first computing device and the indexer 1932 executes on a second computing device that is different from the first computing device. In these implementations, the data produced by the data source 1902 may be referred to as “remote data.” In some implementations, the first computing device is “on-prem” and in some implementations the first computing device is “in the cloud.” In some implementations, the indexer 1932 executes on a computing device in the cloud and the operations of the indexer 1932 are provided as a service to entities that subscribe to the services provided by the data intake and query system.

[0274] For a given data produced by the data source 1902, the indexing system 1920 can be configured to use one of several methods to ingest the data into the indexer 1932. These methods include upload 1922, monitor 1924, using a forwarder 1926, or using HyperText Transfer Protocol (HTTP 1928) and an event collector 1930. These and other methods for data ingestion may be referred to as “getting data in” (GDI) methods.

[0275] Using the upload 1922 method, a user can specify a file for uploading into the indexer 1932. For example, the monitoring console 1916 can include commands or an interface through which the user can specify where the file is located (e.g., on which computing device and / or in which directory of a file system) and the name of the file. The file may be located at the data source 1902 or maybe on the computing device where the indexer 1932 is executing. Once uploading is initiated, the indexer 1932 processes the file, as discussed further below. Uploading is a manual process and occurs when instigated by a user. For automated data ingestion, the other ingestion methods are used.

[0276] The monitor 1924 method enables the indexing system 1920 to monitor the data source 1902 and continuously or periodically obtain data produced by the data source 1902 for ingestion by the indexer 1932. For example, using the monitoring console 1916, a user can specify a file or directory for monitoring. In this example, the indexing system 1920 can execute a monitoring process that detects whenever the file or directory is modified and causes the file or directory contents to be sent to the indexer 1932. As another example, a user can specify a network port for monitoring. In this example, a monitoring process can capture data received at or transmitting from the network port and cause the data to be sent to the indexer 1932. In various examples, monitoring can also be configured for data sources such as operating system event logs, performance data generated by an operating system, operating system registries, operating system directory services, and other data sources.

[0277] Monitoring is available when the data source 1902 is local to the indexer 1932 (e.g., the data source 1902 is on the computing device where the indexer 1932 is executing). Other data ingestion methods, including forwarding and the event collector 1930, can be used for either local or remote data sources.

[0278] A forwarder 1926, which may be referred to herein as a data forwarding component, is a software process that sends data from the data source 1902 to the indexer 1932. The forwarder 1926 can be implemented using program code that can be executed on the computer device that provides the data source 1902. A user launches the program code for the forwarder 1926 on the computing device that provides the data source 1902. The user can further configure the forwarder 1926, for example to specify a receiver for the data being forwarded (e.g., one or more indexers, another forwarder, and / or another recipient system), to enable or disable data forwarding, and to specify a file, directory, network events, operating system data, or other data to forward, among other operations.

[0279] The forwarder 1926 can provide various capabilities. For example, the forwarder 1926 can send the data unprocessed or can perform minimal processing on the data before sending the data to the indexer 1932. Minimal processing can include, for example, adding metadata tags to the data to identify a source, source type, and / or host, among other information, dividing the data into blocks, and / or applying a timestamp to the data. In some implementations, the forwarder 1926 can break the data into individual events (event generation is discussed further below) and send the events to a receiver. Other operations that the forwarder 1926 may be configured to perform include buffering data, compressing data, and using secure protocols for sending the data, for example.

[0280] Forwarders can be configured in various topologies. For example, multiple forwarders can send data to the same indexer. As another example, a forwarder can be configured to filter and / or route events to specific receivers (e.g., different indexers), and / or discard events. As another example, a forwarder can be configured to send data to another forwarder, or to a receiver that is not an indexer or a forwarder (such as, for example, a log aggregator).

[0281] The event collector 1930 provides an alternate method for obtaining data from the data source 1902. The event collector 1930 enables data and application events to be sent to the indexer 1932 using HTTP 1928. The event collector 1930 can be implemented using program code that can be executed on a computing device. The program code may be a component of the data intake and query system or can be a standalone component that can be executed independently of the data intake and query system and operates in cooperation with the data intake and query system.

[0282] To use the event collector 1930, a user can, for example using the monitoring console 1916 or a similar interface provided by the user interface system 1914, enable the event collector 1930 and configure an authentication token. In this context, an authentication token is a piece of digital data generated by a computing device, such as a server, that contains information to identify a particular entity, such as a user or a computing device, to the server. The token will contain identification information for the entity (e.g., an alphanumeric string that is unique to each token) and a code that authenticates the entity with the server. The token can be used, for example, by the data source 1902 as an alternative method to using a username and password for authentication.

[0283] To send data to the event collector 1930, the data source 1902 is supplied with a token and can then send HTTP 1928 requests to the event collector 1930. To send HTTP 1928 requests, the data source 1902 can be configured to use an HTTP client and / or to use logging libraries such as those supplied by Java, JavaScript, and NET libraries. An HTTP client enables the data source 1902 to send data to the event collector 1930 by supplying the data, and a Uniform Resource Identifier (URI) for the event collector 1930 to the HTTP client. The HTTP client then handles establishing a connection with the event collector 1930, transmitting a request containing the data, closing the connection, and receiving an acknowledgment if the event collector 1930 sends one. Logging libraries enable HTTP 1928 requests to the event collector 1930 to be generated directly by the data source. For example, an application can include or link a logging library, and through functionality provided by the logging library manage establishing a connection with the event collector 1930, transmitting a request, and receiving an acknowledgement.

[0284] An HTTP 1928 request to the event collector 1930 can contain a token, a channel identifier, event metadata, and / or event data. The token authenticates the request with the event collector 1930. The channel identifier, if available in the indexing system 1920, enables the event collector 1930 to segregate and keep separate data from different data sources. The event metadata can include one or more key-value pairs that describe the data source 1902 or the event data included in the request. For example, the event metadata can include key-value pairs specifying a timestamp, a hostname, a source, a source type, or an index where the event data should be indexed. The event data can be a structured data object, such as a JavaScript Object Notation (JSON) object, or raw text. The structured data object can include both event data and event metadata. Additionally, one request can include event data for one or more events.

[0285] In some implementations, the event collector 1930 extracts events from HTTP 1928 requests and sends the events to the indexer 1932. The event collector 1930 can further be configured to send events to one or more indexers. Extracting the events can include associating any metadata in a request with the event or events included in the request. In these implementations, event generation by the indexer 1932 (discussed further below) is bypassed, and the indexer 1932 moves the events directly to indexing. In some implementations, the event collector 1930 extracts event data from a request and outputs the event data to the indexer 1932, and the indexer generates events from the event data. In some implementations, the event collector 1930 sends an acknowledgement message to the data source 1902 to indicate that the event collector 1930 has received a particular request form the data source 1902, and / or to indicate to the data source 1902 that events in the request have been added to an index.

[0286] The indexer 1932 ingests incoming data and transforms the data into searchable knowledge in the form of events. In the data intake and query system, an event is a single piece of data that represents activity of the component represented in FIG. 19 by the data source 1902. An event can be, for example, a single record in a log file that records a single action performed by the component (e.g., a user login, a disk read, transmission of a network packet, etc.). An event includes one or more fields that together describe the action captured by the event, where a field is a key-value pair (also referred to as a name-value pair). In some cases, an event includes both the key and the value, and in some cases the event includes only the value and the key can be inferred or assumed.

[0287] Transformation of data into events can include event generation and event indexing. Event generation includes identifying each discrete piece of data that represents one event and associating each event with a timestamp and possibly other information (which may be referred to herein as metadata). Event indexing includes storing of each event in the data structure of an index. As an example, the indexer 1932 can include a parsing module 1934 and an indexing module 1936 for generating and storing the events. The parsing module 1934 and indexing module 1936 can be modular and pipelined, such that one component can be operating on a first set of data while the second component is simultaneously operating on a second sent of data. Additionally, the indexer 1932 may at any time have multiple instances of the parsing module 1934 and indexing module 1936, with each set of instances configured to simultaneously operate on data from the same data source or from different data sources. The parsing module 1934 and indexing module 1936 are illustrated in FIG. 19 to facilitate discussion, with the understanding that implementations with other components are possible to achieve the same functionality.

[0288] The parsing module 1934 determines information about incoming event data, where the information can be used to identify events within the event data. For example, the parsing module 1934 can associate a source type with the event data. A source type identifies the data source 1902 and describes a possible data structure of event data produced by the data source 1902. For example, the source type can indicate which fields to expect in events generated at the data source 1902 and the keys for the values in the fields, and possibly other information such as sizes of fields, an order of the fields, a field separator, and so on. The source type of the data source 1902 can be specified when the data source 1902 is configured as a source of event data. Alternatively, the parsing module 1934 can determine the source type from the event data, for example from an event field in the event data or using machine learning techniques applied to the event data.

[0289] Other information that the parsing module 1934 can determine includes timestamps. In some cases, an event includes a timestamp as a field, and the timestamp indicates a point in time when the action represented by the event occurred or was recorded by the data source 1902 as event data. In these cases, the parsing module 1934 may be able to determine from the source type associated with the event data that the timestamps can be extracted from the events themselves. In some cases, an event does not include a timestamp and the parsing module 1934 determines a timestamp for the event, for example from a name associated with the event data from the data source 1902 (e.g., a file name when the event data is in the form of a file) or a time associated with the event data (e.g., a file modification time). As another example, when the parsing module 1934 is not able to determine a timestamp from the event data, the parsing module 1934 may use the time at which it is indexing the event data. As another example, the parsing module 1934 can use a user-configured rule to determine the timestamps to associate with events.

[0290] The parsing module 1934 can further determine event boundaries. In some cases, a single line (e.g., a sequence of characters ending with a line termination) in event data represents one event while in other cases, a single line represents multiple events. In yet other cases, one event may span multiple lines within the event data. The parsing module 1934 may be able to determine event boundaries from the source type associated with the event data, for example from a data structure indicated by the source type. In some implementations, a user can configure rules the parsing module 1934 can use to identify event boundaries.

[0291] The parsing module 1934 can further extract data from events and possibly also perform transformations on the events. For example, the parsing module 1934 can extract a set of fields (key-value pairs) for each event, such as a host or hostname, source or source name, and / or source type. The parsing module 1934 may extract certain fields by default or based on a user configuration. Alternatively or additionally, the parsing module 1934 may add fields to events, such as a source type or a user-configured field. As another example of a transformation, the parsing module 1934 can anonymize fields in events to mask sensitive information, such as social security numbers or account numbers. Anonymizing fields can include changing or replacing values of specific fields. The parsing module 1934 can further perform user-configured transformations.

[0292] The parsing module 1934 outputs the results of processing incoming event data to the indexing module 1936, which performs event segmentation and builds index data structures.

[0293] Event segmentation identifies searchable segments, which may alternatively be referred to as searchable terms or keywords, which can be used by the search system of the data intake and query system to search the event data. A searchable segment may be a part of a field in an event or an entire field. The indexer 1932 can be configured to identify searchable segments that are parts of fields, searchable segments that are entire fields, or both. The parsing module 1934 organizes the searchable segments into a lexicon or dictionary for the event data, with the lexicon including each searchable segment (e.g., the field “src=10.10.1.1”) and a reference to the location of each occurrence of the searchable segment within the event data (e.g., the location within the event data of each occurrence of “src=10.10.1.1”). As discussed further below, the search system can use the lexicon, which is stored in an index file 1946, to find event data that matches a search query. In some implementations, segmentation can alternatively be performed by the forwarder 1926. Segmentation can also be disabled, in which case the indexer 1932 will not build a lexicon for the event data. When segmentation is disabled, the search system searches the event data directly.

[0294] Building index data structures generates the index 1938. The index 1938 is a storage data structure on a storage device (e.g., a disk drive or other physical device for storing digital data). The storage device may be a component of the computing device on which the indexer 1932 is operating (referred to herein as local storage) or may be a component of a different computing device (referred to herein as remote storage) that the indexer 1932 has access to over a network. The indexer 1932 can manage more than one index and can manage indexes of different types. For example, the indexer 1932 can manage event indexes, which impose minimal structure on stored data and can accommodate any type of data. As another example, the indexer 1932 can manage metrics indexes, which use a highly structured format to handle the higher volume and lower latency demands associated with metrics data.

[0295] The indexing module 1936 organizes files in the index 1938 in directories referred to as buckets. The files in a bucket 1944 can include raw data files, index files, and possibly also other metadata files. As used herein, “raw data” means data as when the data was produced by the data source 1902, without alteration to the format or content. As noted previously, the parsing module 1934 may add fields to event data and / or perform transformations on fields in the event data. Event data that has been altered in this way is referred to herein as enriched data. A raw data file 1948 can include enriched data, in addition to or instead of raw data. The raw data file 1948 may be compressed to reduce disk usage. An index file 1946, which may also be referred to herein as a “time-series index” or tsidx file, contains metadata that the indexer 1932 can use to search a corresponding raw data file 1948. As noted above, the metadata in the index file 1946 includes a lexicon of the event data, which associates each unique keyword in the event data with a reference to the location of event data within the raw data file 1948. The keyword data in the index file 1946 may also be referred to as an inverted index. In various implementations, the data intake and query system can use index files for other purposes, such as to store data summarizations that can be used to accelerate searches.

[0296] A bucket 1944 includes event data for a particular range of time. The indexing module 1936 arranges buckets in the index 1938 according to the age of the buckets, such that buckets for more recent ranges of time are stored in short-term storage 1940 and buckets for less recent ranges of time are stored in long-term storage 1942. Short-term storage 1940 may be faster to access while long-term storage 1942 may be slower to access. Buckets may be moves from short-term storage 1940 to long-term storage 1942 according to a configurable data retention policy, which can indicate at what point in time a bucket is old enough to be moved.

[0297] A bucket's location in short-term storage 1940 or long-term storage 1942 can also be indicated by the bucket's status. As an example, a bucket's status can be “hot,”“warm,”“cold,”“frozen,” or “thawed.” In this example, hot bucket is one to which the indexer 1932 is writing data and the bucket becomes a warm bucket when the indexer 1932 stops writing data to it. In this example, both hot and warm buckets reside in short-term storage 1940. Continuing this example, when a warm bucket is moved to long-term storage 1942, the bucket becomes a cold bucket. A cold bucket can become a frozen bucket after a period of time, at which point the bucket may be deleted or archived. An archived bucket cannot be searched. When an archived bucket is retrieved for searching, the bucket becomes thawed and can then be searched.

[0298] The indexing system 1920 can include more than one indexer, where a group of indexers is referred to as an index cluster. The indexers in an index cluster may also be referred to as peer nodes. In an index cluster, the indexers are configured to replicate each other's data by copying buckets from one indexer to another. The number of copies of a bucket can be configured (e.g., three copies of each buckets must exist within the cluster), and indexers to which buckets are copied may be selected to optimize distribution of data across the cluster.

[0299] A user can view the performance of the indexing system 1920 through the monitoring console 1916 provided by the user interface system 1914. Using the monitoring console 1916, the user can configure and monitor an index cluster, and see information such as disk usage by an index, volume usage by an indexer, index and volume size over time, data age, statistics for bucket types, and bucket settings, among other information.

[0300] FIG. 20 is a block diagram illustrating in greater detail an example of the search system 2060 of a data intake and query system, such as the data intake and query system 1810 of FIG. 18. The search system 2060 of FIG. 20 issues a query 2066 to a search head 2062, which sends the query 2066 to a search peer 2064. Using a map process 2070, the search peer 2064 searches the appropriate index 2038 for events identified by the query 2066 and sends events 2078 so identified back to the search head 2062. Using a reduce process 2082, the search head 2062 processes the events 2078 and produces results 2068 to respond to the query 2066. The results 2068 can provide useful insights about the data stored in the index 2038. These insights can aid in the administration of information technology systems, in security analysis of information technology systems, and / or in analysis of the development environment provided by information technology systems.

[0301] The query 2066 that initiates a search is produced by a search and reporting app 2015 that is available through the user interface system 2014 of the data intake and query system. Using a network access application 2006 executing on a computing device 2004, a user can input the query 2066 into a search field provided by the search and reporting app 2015. Alternatively or additionally, the search and reporting app 2015 can include pre-configured queries or stored queries that can be activated by the user. In some cases, the search and reporting app 2015 initiates the query 2066 when the user enters the query 2066. In these cases, the query 2066 maybe referred to as an “ad-hoc” query. In some cases, the search and reporting app 2015 initiates the query 2066 based on a schedule. For example, the search and reporting app 2015 can be configured to execute the query 2066 once per hour, once per day, at a specific time, on a specific date, or at some other time that can be specified by a date, time, and / or frequency. These types of queries maybe referred to as scheduled queries.

[0302] The query 2066 is specified using a search processing language. The search processing language includes commands or search terms that the search peer 2064 will use to identify events to return in the search results 2068. The search processing language can further include commands for filtering events, extracting more information from events, evaluating fields in events, aggregating events, calculating statistics over events, organizing the results, and / or generating charts, graphs, or other visualizations, among other examples. Some search commands may have functions and arguments associated with them, which can, for example, specify how the commands operate on results and which fields to act upon. The search processing language may further include constructs that enable the query 2066 to include sequential commands, where a subsequent command may operate on the results of a prior command. As an example, sequential commands may be separated in the query 2066 by a vertical line (“I” or “pipe”) symbol.

[0303] In addition to one or more search commands, the query 2066 includes a time indicator. The time indicator limits searching to events that have timestamps described by the indicator. For example, the time indicator can indicate a specific point in time (e.g., 10:00:00 am today), in which case only events that have the point in time for their timestamp will be searched. As another example, the time indicator can indicate a range of time (e.g., the last 24 hours), in which case only events whose timestamps fall within the range of time will be searched. The time indicator can alternatively indicate all of time, in which case all events will be searched.

[0304] Processing of the search query 2066 occurs in two broad phases: a map phase 2050 and a reduce phase 2052. The map phase 2050 takes place across one or more search peers. In the map phase 2050, the search peers locate event data that matches the search terms in the search query 2066 and sorts the event data into field-value pairs. When the map phase 2050 is complete, the search peers send events that they have found to one or more search heads for the reduce phase 2052. During the reduce phase 2052, the search heads process the events through commands in the search query 2066 and aggregate the events to produce the final search results 2068.

[0305] A search head, such as the search head 2062 illustrated in FIG. 20, is a component of the search system 2060 that manages searches. The search head 2062, which may also be referred to herein as a search management component, can be implemented using program code that can be executed on a computing device. The program code for the search head 2062 can be stored on a non-transitory computer-readable medium and from this medium can be loaded or copied to the memory of a computing device. One or more hardware processors of the computing device can read the program code from the memory and execute the program code in order to implement the operations of the search head 2062.

[0306] Upon receiving the search query 2066, the search head 2062 directs the query 2066 to one or more search peers, such as the search peer 2064 illustrated in FIG. 20. “Search peer” is an alternate name for “indexer” and a search peer may be largely similar to the indexer described previously. The search peer 2064 may be referred to as a “peer node” when the search peer 2064 is part of an indexer cluster. The search peer 2064, which may also be referred to as a search execution component, can be implemented using program code that can be executed on a computing device. In some implementations, one set of program code implements both the search head 2062 and the search peer 2064 such that the search head 2062 and the search peer 2064 form one component. In some implementations, the search head 2062 is an independent piece of code that performs searching and no indexing functionality. In these implementations, the search head 2062 may be referred to as a dedicated search head.

[0307] The search head 2062 may consider multiple criteria when determining whether to send the query 2066 to the particular search peer 2064. For example, the search system 2060 may be configured to include multiple search peers that each have duplicative copies of at least some of the event data and are implanted using different hardware resources q. In this example, the sending the search query 2066 to more than one search peer allows the search system 2060 to distribute the search workload across different hardware resources. As another example, search system 2060 may include different search peers for different purposes (e.g., one has an index storing a first type of data or from a first data source while a second has an index storing a second type of data or from a second data source). In this example, the search query 2066 may specify which indexes to search, and the search head 2062 will send the query 2066 to the search peers that have those indexes.

[0308] To identify events 2078 to send back to the search head 2062, the search peer 2064 performs a map process 2070 to obtain event data 2074 from the index 2038 that is maintained by the search peer 2064. During a first phase of the map process 2070, the search peer 2064 identifies buckets that have events that are described by the time indicator in the search query 2066. As noted above, a bucket contains events whose timestamps fall within a particular range of time. For each bucket 2044 whose events can be described by the time indicator, during a second phase of the map process 2070, the search peer 2064 performs a keyword search 2072 using search terms specified in the search query 2066. The search terms can be one or more of keywords, phrases, fields, Boolean expressions, and / or comparison expressions that in combination describe events being searched for. When segmentation is enabled at index time, the search peer 2064 performs the keyword search 2072 on the bucket's index file 2046. As noted previously, the index file 2046 includes a lexicon of the searchable terms in the events stored in the bucket's raw data 2048 file. The keyword search 2072 searches the lexicon for searchable terms that correspond to one or more of the search terms in the query 2066. As also noted above, the lexicon includes, for each searchable term, a reference to each location in the raw data 2048 file where the searchable term can be found. Thus, when the keyword search identifies a searchable term in the index file 2046 that matches a search term in the query 2066, the search peer 2064 can use the location references to extract from the raw data 2048 file the event data 2074 for each event that include the searchable term.

[0309] In cases where segmentation was disabled at index time, the search peer 2064 performs the keyword search 2072 directly on the raw data 2048 file. To search the raw data 2048, the search peer 2064 may identify searchable segments in events in a similar manner as when the data was indexed. Thus, depending on how the search peer 2064 is configured, the search peer 2064 may look at event fields and / or parts of event fields to determine whether an event matches the query 2066. Any matching events can be added to the event data 2074 read from the raw data 2048 file. The search peer 2064 can further be configured to enable segmentation at search time, so that searching of the index 2038 causes the search peer 2064 to build a lexicon in the index file 2046.

[0310] The event data 2074 obtained from the raw data 2048 file includes the full text of each event found by the keyword search 2072. During a third phase of the map process 2070, the search peer 2064 performs event processing 2076 on the event data 2074, with the steps performed being determined by the configuration of the search peer 2064 and / or commands in the search query 2066. For example, the search peer 2064 can be configured to perform field discovery and field extraction. Field discovery is a process by which the search peer 2064 identifies and extracts key-value pairs from the events in the event data 2074. The search peer 2064 can, for example, be configured to automatically extract the first 100 fields (or another number of fields) in the event data 2074 that can be identified as key-value pairs. As another example, the search peer 2064 can extract any fields explicitly mentioned in the search query 2066. The search peer 2064 can, alternatively or additionally, be configured with particular field extractions to perform.

[0311] Other examples of steps that can be performed during event processing 2076 include: field aliasing (assigning an alternate name to a field); addition of fields from lookups (adding fields from an external source to events based on existing field values in the events); associating event types with events; source type renaming (changing the name of the source type associated with particular events); and tagging (adding one or more strings of text, or a “tags” to particular events), among other examples.

[0312] The search peer 2064 sends processed events 2078 to the search head 2062, which performs a reduce process 2080. The reduce process 2080 potentially receives events from multiple search peers and performs various results processing 2082 steps on the received events. The results processing 2082 steps can include, for example, aggregating the events received from different search peers into a single set of events, deduplicating and aggregating fields discovered by different search peers, counting the number of events found, and sorting the events by timestamp (e.g., newest first or oldest first), among other examples. Results processing 2082 can further include applying commands from the search query 2066 to the events. The query 2066 can include, for example, commands for evaluating and / or manipulating fields (e.g., to generate new fields from existing fields or parse fields that have more than one value). As another example, the query 2066 can include commands for calculating statistics over the events, such as counts of the occurrences of fields, or sums, averages, ranges, and so on, of field values. As another example, the query 2066 can include commands for generating statistical values for purposes of generating charts of graphs of the events.

[0313] The reduce process 2080 outputs the events found by the search query 2066, as well as information about the events. The search head 2062 transmits the events and the information about the events as search results 2068, which are received by the search and reporting app 2015. The search and reporting app 2015 can generate visual interfaces for viewing the search results 2068. The search and reporting app 2015 can, for example, output visual interfaces for the network access application 2006 running on a computing device 2004 to generate.

[0314] The visual interfaces can include various visualizations of the search results 2068, such as tables, line or area charts, Choropleth maps, or single values. The search and reporting app 2015 can organize the visualizations into a dashboard, where the dashboard includes a panel for each visualization. A dashboard can thus include, for example, a panel listing the raw event data for the events in the search results 2068, a panel listing fields extracted at index time and / or found through field discovery along with statistics for those fields, and / or a timeline chart indicating how many events occurred at specific points in time (as indicated by the timestamps associated with each event). In various implementations, the search and reporting app 2015 can provide one or more default dashboards. Alternatively or additionally, the search and reporting app 2015 can include functionality that enables a user to configure custom dashboards.

[0315] The search and reporting app 2015 can also enable further investigation into the events in the search results 2068. The process of further investigation may be referred to as drilldown. For example, a visualization in a dashboard can include interactive elements, which, when selected, provide options for finding out more about the data being displayed by the interactive elements. To find out more, an interactive element can, for example, generate a new search that includes some of the data being displayed by the interactive element, and thus may be more focused than the initial search query 2066. As another example, an interactive element can launch a different dashboard whose panels include more detailed information about the data that is displayed by the interactive element. Other examples of actions that can be performed by interactive elements in a dashboard include opening a link, playing an audio or video file, or launching another application, among other examples.

[0316] FIG. 21 illustrates an example of a self-managed network 2100 that includes a data intake and query system. “Self-managed” in this instance means that the entity that is operating the self-managed network 2100 configures, administers, maintains, and / or operates the data intake and query system using its own compute resources and people. Further, the self-managed network 2100 of this example is part of the entity's on-premise network and comprises a set of compute, memory, and networking resources that are located, for example, within the confines of a entity's data center. These resources can include software and hardware resources. The entity can, for example, be a company or enterprise, a school, government entity, or other entity. Since the self-managed network 2100 is located within the customer's on-prem environment, such as in the entity's data center, the operation and management of the self-managed network 2100, including of the resources in the self-managed network 2100, is under the control of the entity. For example, administrative personnel of the entity have complete access to and control over the configuration, management, and security of the self-managed network 2100 and its resources.

[0317] The self-managed network 2100 can execute one or more instances of the data intake and query system. An instance of the data intake and query system may be executed by one or more computing devices that are part of the self-managed network 2100. A data intake and query system instance can comprise an indexing system and a search system, where the indexing system includes one or more indexers 2120 and the search system includes one or more search heads 2160.

[0318] As depicted in FIG. 21, the self-managed network 2100 can include one or more data sources 2102. Data received from these data sources may be processed by an instance of the data intake and query system within self-managed network 2100. The data sources 2102 and the data intake and query system instance can be communicatively coupled to each other via a private network 2110.

[0319] Users associated with the entity can interact with and avail themselves of the functions performed by a data intake and query system instance using computing devices. As depicted in FIG. 21, a computing device 2104 can execute a network access application 2106 (e.g., a web browser), that can communicate with the data intake and query system instance and with data sources 2102 via the private network 2110. Using the computing device 2104, a user can perform various operations with respect to the data intake and query system, such as management and administration of the data intake and query system, generation of knowledge objects, and other functions. Results generated from processing performed by the data intake and query system instance may be communicated to the computing device 2104 and output to the user via an output system (e.g., a screen) of the computing device 2104.

[0320] The self-managed network 2100 can also be connected to other networks that are outside the entity's on-premise environment / network, such as networks outside the entity's data center. Connectivity to these other external networks is controlled and regulated through one or more layers of security provided by the self-managed network 2100. One or more of these security layers can be implemented using firewalls 2112. The firewalls 2112 form a layer of security around the self-managed network 2100 and regulate the transmission of traffic from the self-managed network 2100 to the other networks and from these other networks to the self-managed network 2100.

[0321] Networks external to the self-managed network can include various types of networks including public networks 2190, other private networks, and / or cloud networks provided by one or more cloud service providers. An example of a public network 2190 is the Internet. In the example depicted in FIG. 21, the self-managed network 2100 is connected to a service provider network 2192 provided by a cloud service provider via the public network 2190.

[0322] In some implementations, resources provided by a cloud service provider may be used to facilitate the configuration and management of resources within the self-managed network 2100. For example, configuration and management of a data intake and query system instance in the self-managed network 2100 may be facilitated by a software management system 2194 operating in the service provider network 2192. There are various ways in which the software management system 2194 can facilitate the configuration and management of a data intake and query system instance within the self-managed network 2100. As one example, the software management system 2194 may facilitate the download of software including software updates for the data intake and query system. In this example, the software management system 2194 may store information indicative of the versions of the various data intake and query system instances present in the self-managed network 2100. When a software patch or upgrade is available for an instance, the software management system 2194 may inform the self-managed network 2100 of the patch or upgrade. This can be done via messages communicated from the software management system 2194 to the self-managed network 2100.

[0323] The software management system 2194 may also provide simplified ways for the patches and / or upgrades to be downloaded and applied to the self-managed network 2100. For example, a message communicated from the software management system 2194 to the self-managed network 2100 regarding a software upgrade may include a Uniform Resource Identifier (URI) that can be used by a system administrator of the self-managed network 2100 to download the upgrade to the self-managed network 2100. In this manner, management resources provided by a cloud service provider using the service provider network 2192 and which are located outside the self-managed network 2100 can be used to facilitate the configuration and management of one or more resources within the entity's on-prem environment. In some implementations, the download of the upgrades and patches may be automated, whereby the software management system 2194 is authorized to, upon determining that a patch is applicable to a data intake and query system instance inside the self-managed network 2100, automatically communicate the upgrade or patch to self-managed network 2100 and cause it to be installed within self-managed network 2100.

[0324] Various examples and possible implementations have been described above, which recite certain features and / or functions. Although these examples and implementations have been described in language specific to structural features and / or functions, it is understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or functions described above. Rather, the specific features and functions described above are disclosed as examples of implementing the claims, and other equivalent features and acts are intended to be within the scope of the claims. Further, any or all of the features and functions described above can be combined with each other, except to the extent it may be otherwise stated above or to the extent that any such embodiments may be incompatible by virtue of their function or structure, as will be apparent to persons of ordinary skill in the art. Unless contrary to physical possibility, it is envisioned that (i) the methods / steps described herein may be performed in any sequence and / or in any combination, and (ii) the components of respective embodiments may be combined in any manner.

[0325] Processing of the various components of systems illustrated herein can be distributed across multiple machines, networks, and other computing resources. Two or more components of a system can be combined into fewer components. Various components of the illustrated systems can be implemented in one or more virtual machines or an isolated execution environment, rather than in dedicated computer hardware systems and / or computing devices. Likewise, the data repositories shown can represent physical and / or logical data storage, including, e.g., storage area networks or other distributed storage systems. Moreover, in some embodiments the connections between the components shown represent possible paths of data flow, rather than actual connections between hardware. While some examples of possible connections are shown, any of the subset of the components shown can communicate with any other subset of components in various implementations.

[0326] Examples have been described with reference to flow chart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products. Each block of the flow chart illustrations and / or block diagrams, and combinations of blocks in the flow chart illustrations and / or block diagrams, may be implemented by computer program instructions. Such instructions may be provided to a processor of a general purpose computer, special purpose computer, specially-equipped computer (e.g., comprising a high-performance database server, a graphics subsystem, etc.) or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor(s) of the computer or other programmable data processing apparatus, create means for implementing the acts specified in the flow chart and / or block diagram block or blocks. These computer program instructions may also be stored in a non-transitory computer-readable memory that can direct a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the acts specified in the flow chart and / or block diagram block or blocks. The computer program instructions may also be loaded to a computing device or other programmable data processing apparatus to cause operations to be performed on the computing device or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computing device or other programmable apparatus provide steps for implementing the acts specified in the flow chart and / or block diagram block or blocks.

[0327] In some embodiments, certain operations, acts, events, or functions of any of the algorithms described herein can be performed in a different sequence, can be added, merged, or left out altogether (e.g., not all are necessary for the practice of the algorithms). In certain embodiments, operations, acts, functions, or events can be performed concurrently, e.g., through multi-threaded processing, interrupt processing, or multiple processors or processor cores or on other parallel architectures, rather than sequentially.

Claims

1. A computer-implemented method, comprising:receiving a generation prompt and an output query, wherein the output query is generated through use of artificial intelligence (AI);prompting a query evaluation large language model (LLM) to produce two contrasting explanations as to whether the output query is hallucinated, wherein a first explanation of the two contrasting explanations is generated under an assumption that the output query is hallucinated, and wherein a second explanation is generated under an assumption that the output query is consistent with the generation prompt;prompting the query evaluation LLM to determine whether the output query is hallucinated based on the generation prompt, the query output, and the two contrasting explanations; anddetermining, by an evaluation logic, whether the output query was hallucinated based on the contrasting explanations.

2. The computer-implemented method of claim 1, wherein the AI is a second LLM, wherein the generation prompt was provided to the second LLM, and wherein the output query was generated by the second LLM in response to receipt of the generation prompt.

3. The computer-implemented method of claim 1 further comprising:responsive to a determination by the evaluation logic that the output query was hallucinated, instructing a second LLM that generated the output query to generate a revised output query based on the generation prompt and the two contrasting explanations.

4. The computer-implemented method of claim 1 further comprising:responsive to a determination by the evaluation logic that the output query was not hallucinated, causing the output query to be stored as a saved detection that is executed by a data intake and query system, and wherein the saved detection is directed to detecting one or more anomalies; andresponsive to detecting the one or more anomalies, performing one or more automated remedial actions.

5. The computer-implemented method of claim 1, wherein prompting the query evaluation LLM to determine whether the output query is hallucinated based on the generation prompt, the query output, and the two contrasting explanations includes: (i) prompting the query evaluation LLM to perform a first pass analyzing the generation prompt, the query output, and the first explanation before the second explanation resulting in a first prediction, and (ii) prompting the query evaluation LLM to perform a second pass analyzing the generation prompt, the query output, and the second explanation before the first explanation resulting in a second prediction.

6. The computer-implemented method of claim 5, wherein determining that the output query was hallucinated when both the first prediction and the second prediction indicate that the output query was hallucinated, andwherein determining that the output query was not hallucinated when both the first prediction and the second prediction indicate that the output query was not hallucinated.

7. The computer-implemented method of claim 6 further comprising:responsive to the first prediction and the second prediction diverging, prompting the query evaluation LLM to perform an additional odd number of passes analyzing the generation prompt, the query output, and the two contrasting explanations, wherein an increased temperature is utilized for the additional odd number of passes; anddetermining whether the output query was hallucinated based on a majority of predictions from the first pass, the second pass, and the additional odd number of passes.

8. A computing device, comprising:a processor; anda non-transitory computer-readable medium having stored thereon instructions that, when executed by the processor, cause the processor to perform operations including:receiving a generation prompt and an output query, wherein the output query is generated through use of artificial intelligence (AI),prompting a query evaluation large language model (LLM) to produce two contrasting explanations as to whether the output query is hallucinated, wherein a first explanation of the two contrasting explanations is generated under an assumption that the output query is hallucinated, and wherein a second explanation is generated under an assumption that the output query is consistent with the generation prompt,prompting the query evaluation LLM to determine whether the output query is hallucinated based on the generation prompt, the query output, and the two contrasting explanations, anddetermining, by an evaluation logic, whether the output query was hallucinated based on the contrasting explanations.

9. The computing device of claim 8, wherein the AI is a second LLM, wherein the generation prompt was provided to the second LLM, and wherein the output query was generated by the second LLM in response to receipt of the generation prompt.

10. The computing device of claim 8, wherein the operations further comprise:responsive to a determination by the evaluation logic that the output query was hallucinated, instructing a second LLM that generated the output query to generate a revised output query based on the generation prompt and the two contrasting explanations.

11. The computing device of claim 8, wherein the operations further comprise:responsive to a determination by the evaluation logic that the output query was not hallucinated, causing the output query to be stored as a saved detection that is executed by a data intake and query system, and wherein the saved detection is directed to detecting one or more anomalies, andresponsive to detecting the one or more anomalies, performing one or more automated remedial actions.

12. The computing device of claim 8, wherein prompting the query evaluation LLM to determine whether the output query is hallucinated based on the generation prompt, the query output, and the two contrasting explanations includes: (i) prompting the query evaluation LLM to perform a first pass analyzing the generation prompt, the query output, and the first explanation before the second explanation resulting in a first prediction, and (ii) prompting the query evaluation LLM to perform a second pass analyzing the generation prompt, the query output, and the second explanation before the first explanation resulting in a second prediction.

13. The computing device of claim 12, wherein determining that the output query was hallucinated when both the first prediction and the second prediction indicate that the output query was hallucinated, andwherein determining that the output query was not hallucinated when both the first prediction and the second prediction indicate that the output query was not hallucinated.

14. The computing device of claim 13, wherein the operations further comprise:responsive to the first prediction and the second prediction diverging, prompting the query evaluation LLM to perform an additional odd number of passes analyzing the generation prompt, the query output, and the two contrasting explanations, wherein an increased temperature is utilized for the additional odd number of passes, anddetermining whether the output query was hallucinated based on a majority of predictions from the first pass, the second pass, and the additional odd number of passes.

15. A non-transitory computer-readable medium having stored thereon instructions that, when executed by one or more processors, cause the one or more processors to perform operations including:receiving a generation prompt and an output query, wherein the output query is generated through use of artificial intelligence (AI);prompting a query evaluation large language model (LLM) to produce two contrasting explanations as to whether the output query is hallucinated, wherein a first explanation of the two contrasting explanations is generated under an assumption that the output query is hallucinated, and wherein a second explanation is generated under an assumption that the output query is consistent with the generation prompt;prompting the query evaluation LLM to determine whether the output query is hallucinated based on the generation prompt, the query output, and the two contrasting explanations; anddetermining, by an evaluation logic, whether the output query was hallucinated based on the contrasting explanations.

16. The non-transitory computer-readable medium of claim 15, wherein the AI is a second LLM, wherein the generation prompt was provided to the second LLM, and wherein the output query was generated by the second LLM in response to receipt of the generation prompt.

17. The non-transitory computer-readable medium of claim 15, wherein the operations further comprise:responsive to a determination by the evaluation logic that the output query was hallucinated, instructing a second LLM that generated the output query to generate a revised output query based on the generation prompt and the two contrasting explanations.

18. The non-transitory computer-readable medium of claim 15, wherein the operations further comprise:responsive to a determination by the evaluation logic that the output query was not hallucinated, causing the output query to be stored as a saved detection that is executed by a data intake and query system, and wherein the saved detection is directed to detecting one or more anomalies; andresponsive to detecting the one or more anomalies, performing one or more automated remedial actions.

19. The non-transitory computer-readable medium of claim 15, wherein prompting the query evaluation LLM to determine whether the output query is hallucinated based on the generation prompt, the query output, and the two contrasting explanations includes: (i) prompting the query evaluation LLM to perform a first pass analyzing the generation prompt, the query output, and the first explanation before the second explanation resulting in a first prediction, and (ii) prompting the query evaluation LLM to perform a second pass analyzing the generation prompt, the query output, and the second explanation before the first explanation resulting in a second prediction,wherein determining that the output query was hallucinated when both the first prediction and the second prediction indicate that the output query was hallucinated, andwherein determining that the output query was not hallucinated when both the first prediction and the second prediction indicate that the output query was not hallucinated.

20. The non-transitory computer-readable medium of claim 19, wherein the operations further comprise:responsive to the first prediction and the second prediction diverging, prompting the query evaluation LLM to perform an additional odd number of passes analyzing the generation prompt, the query output, and the two contrasting explanations, wherein an increased temperature is utilized for the additional odd number of passes; anddetermining whether the output query was hallucinated based on a majority of predictions from the first pass, the second pass, and the additional odd number of passes.