πŸ’ͺ Capability

The only limit to our realization of tomorrow will be our doubts of today; let us move forward with strong and active faith, believing in our capability to achieve the impossible. - Franklin Roosevelt

In langtorch, we define a concept called "Capability": the ability to do something. A capability consists of several "Capability units" combined together. In order to make each capability adapt to each other, we create an interface called "Node" that contains a capability unit and some context information. Combining different nodes together will make a capability DAG(Directed acyclic graph).

Capability Unit

A capability unit represents a single task in langtorch. It could be a large language model (LLM) with a pre-defined prompt or a custom function. In real-life scenarios, a capability unit is roughly equivalent to a task, such as performing a Q&A.

Capability Wrapper

The wrapper is a specialized CapabilityUnit designed for handling different cases

Example:

ConversationLLMWrapperUnitwraps LLMCapabilityUnit and adds conversation context and memory management. It takes a UserMessage as input and produces an AssistantMessage as output.

Capability Graph or DAG

A capability graph is a combination of multiple capability nodes.

Capability Node:

The Node interface represents a node in the CapabilityDAG. Each node has a unique ID, a list of out-degree nodes, and a process method that takes an iterable of inputs and generates an output. A node can be a simple processing step or a more complex capability unit.

Last updated