β Core Concepts¶
-
β Feedback Functions.
-
β Rag Triad.
Glossary¶
General and π¦TruLens-specific concepts.
-
Agent. AComponentof anApplicationor the entirety of an application that provides a natural language interface to some set of capabilities typically incorporatingToolsto invoke or query local or remote services, while maintaining its state viaMemory. The user of an agent may be a human, a tool, or another agent. See alsoMulti Agent System. -
ApplicationorApp. An "application" that is tracked by π¦TruLens. Abstract definition of this tracking corresponds to App. We offer special support for LangChain via TruChain, LlamaIndex via TruLlama, and NeMo Guardrails via TruRailsApplicationsas well as custom apps via TruBasicApp or [TruApp][trulens.apps.app.TruApp], and apps that already come withTraces via TruVirtual. -
Chain. A LangChainApp. -
Chain of Thought. The use of anAgentto deconstruct its tasks and to structure, analyze, and refine itsCompletions. -
Completion,Generation. The process or result of LLM responding to somePrompt. -
Component. Part of anApplicationgiving it some capability. Common components include: -
Retriever -
Memory -
Tool -
Agent -
Prompt Template -
LLM -
Embedding. A real vector representation of some piece of text. Can be used to find related pieces of text in aRetrieval. -
Eval,Evals,Evaluation. Process or result of method that scores the outputs or aspects of aTrace. In π¦TruLens, our scores are real numbers between 0 and 1. -
Feedback. SeeEvaluation. -
Feedback Function. A method that implements anEvaluation. This corresponds to Feedback. -
Fine-tuning. The process of training an already pre-trained model on additional data. While the initial training of aLarge Language Modelis resource intensive (read "large"), the subsequent fine-tuning may not be and can improve the performance of theLLMon data that sufficiently deviates or specializes its original training data. Fine-tuning aims to preserve the generality of the original and transfer of its capabilities to specialized tasks. Examples include fine-tuning on: -
financial articles
-
medical notes
-
synthetic languages (programming or otherwise)
While fine-tuning generally requires access to the original model parameters, some model providers give users the ability to fine-tune through their remote APIs.
-
Generation. SeeCompletion. -
Human Feedback. A feedback that is provided by a human, e.g. a thumbs up/down in response to aCompletion. -
In-Context Learning. The use of examples in anInstruction Promptto help anLLMgenerate intendedCompletions. See alsoShot. -
Instruction Prompt,System Prompt. A part of aPromptgiven to anLLMto complete that contains instructions describing the task that theCompletionshould solve. Sometimes such prompts include examples of correct or intended completions (seeShots). A prompt that does not include examples is said to beZero Shot. -
Language Model. A model whose task is to model text distributions typically in the form of predicting token distributions for text that follows the given prefix. Proprietary models usually do not give users access to token distributions and insteadCompletea piece of input text via multiple token predictions and methods such as beam search. -
LLM,Large Language Model(seeLanguage Model). TheComponentof anApplicationthat performsCompletion. LLMs are usually trained on a large amount of text across multiple natural and synthetic languages. They are also trained to follow instructions provided in theirInstruction Prompt. This makes them general in that they can be applied to many structured or unstructured tasks and even tasks which they have not seen in their training data (SeeInstruction Prompt,In-Context Learning). LLMs can be further improved for rare/specialized settings usingFine-Tuning. -
Memory. The state maintained by anApplicationor anAgentindicating anything relevant to continuing, refining, or guiding it towards its goals.Memoryis provided asContextinPromptsand is updated when new relevant context is processed, be it a user prompt or the results of the invocation of someTool. AsMemoryis included inPrompts, it can be a natural language description of the state of the app/agent. To limit the size of memory,Summarizationis often used. -
Multi-Agent System. The use of multipleAgentsincentivized to interact with each other to implement some capability. While the term predatesLLMs, the convenience of the common natural language interface makes the approach much easier to implement. -
Prompt. The text that anLLMcompletes duringCompletion. In chat applications. See alsoInstruction Prompt,Prompt Template. -
Prompt Template. A piece of text with placeholders to be filled in in order to build aPromptfor a given task. APrompt Templatewill typically include theInstruction Promptwith placeholders for things likeContext,Memory, orApplicationconfiguration parameters. -
Provider. A system that provides the ability to execute models, eitherLLMs or classification models. In π¦TruLens,Feedback Functionsmake use ofProvidersto invoke models forEvaluation. -
RAG,Retrieval Augmented Generation. A common organization ofApplicationsthat combine aRetrievalwith anLLMto produceCompletionsthat incorporate information that anLLMalone may not be aware of. -
RAG Triad(π¦TruLens-specific concept). A combination of threeFeedback Functionsmeant toEvaluateRetrievalsteps inApplications. -
Record. A "record" of the execution of a single execution of an app. Single execution means invocation of some top-level app method. Corresponds to RecordNote
This will be renamed to
Tracein the future. -
Retrieval,Retriever. The process or result (or theComponentthat performs this) of looking up pieces of text relevant to aPromptto provide asContextto anLLM. Typically this is done usingEmbeddingrepresentations. -
Selector(π¦TruLens-specific concept). A specification of the source of data from aTraceto use as inputs to aFeedback Function. This corresponds to Lens and utilities Select. -
Shot,Zero Shot,Few Shot,<Quantity>-Shot.Zero Shotdescribes prompts that do not have any examples and only offer a natural language description of the task to be solved, while<Quantity>-Shotindicate some<Quantity>of examples are provided. The "shot" terminology predates instruction-based LLMs where techniques then used other information to handle unseen classes such as label descriptions in the seen/trained data.In-context Learningis the recent term that describes the use of examples inInstruction Prompts. -
Span. Some unit of work logged as part of a record. Corresponds to current π¦RecordAppCallMethod. -
Summarization. The task of condensing some natural language text into a smaller bit of natural language text that preserves the most important parts of the text. This can be targeted towards humans or otherwise. It can also be used to maintain conciseMemoryin anLLMApplicationorAgent. Summarization can be performed by anLLMusing a specificInstruction Prompt. -
Tool. A piece of functionality that can be invoked by anApplicationorAgent. This commonly includes interfaces to services such as search (generic search via Google or more specific like IMDB for movies). Tools may also perform actions such as submitting comments to GitHub issues. AToolmay also encapsulate an interface to anAgentfor use as a component in a largerApplication. -
Trace. SeeRecord.