Eino: Components
The most significant difference between LLM application development and traditional application development lies in the two core capabilities of large language models:
- Semantic text processing: the ability to understand and generate human language, handling semantic relationships in unstructured content.
- Intelligent decision-making: the ability to reason and make judgments based on context, and make corresponding behavioral decisions.
These two core capabilities have given rise to three main application patterns:
- Direct conversation mode: process user input and generate corresponding responses.
- Knowledge processing mode: semantically process, store, and retrieve textual documents.
- Tool calling mode: make decisions based on context and call corresponding tools.
These patterns highly summarize the main scenarios of current LLM applications and provide a foundation for abstraction and standardization. Based on this, Eino abstracts these common capabilities into reusable “Components”.
The relationship between component abstractions and these patterns is as follows:
Conversation processing components:
-
Component abstractions for templated processing and LLM interaction parameters:
ChatTemplate,AgenticChatTemplateSee Eino: ChatTemplate Guide, Eino: AgenticChatTemplate Guide [Beta]
-
Component abstractions for direct LLM interaction:
ChatModel,AgenticModel
Text semantic processing components:
-
Component abstractions for acquiring and processing text documents:
Document.Loader,Document.TransformerSee Eino: Document Loader Guide, Eino: Document Transformer Guide
-
Component abstraction for semantic processing of text documents:
Embedding -
Component abstraction for storing data indexes after embedding:
Indexer -
Component abstraction for indexing and retrieving semantically related text documents:
Retriever
Decision and execution components:
-
Component abstractions for LLM decision-making and tool calling:
ToolsNode,AgenticToolsNodeSee Eino: ToolsNode&Tool Guide, Eino: AgenticToolsNode&Tool Guide [Beta]
Custom components:
-
Component abstraction for user-defined code logic:
Lambda
Components are the capability providers for LLM applications, serving as the bricks and mortar in the construction process of LLM applications. The quality of component abstractions determines the complexity of LLM application development. Eino’s component abstractions adhere to the following design principles:
- Modularity and standardization: abstract a series of capabilities with the same functionality into unified modules, with clear responsibilities and boundaries between components, supporting flexible composition.
- Extensibility: keep the interface design with minimal constraints on module capabilities, allowing component developers to easily implement custom component development.
- Reusability: encapsulate the most commonly used capabilities and implementations, providing developers with ready-to-use tools.
Component abstractions enable LLM application development to form relatively fixed paradigms, reducing cognitive complexity and enhancing collaboration efficiency. Component encapsulation allows developers to focus on implementing business logic, avoiding reinventing the wheel, and quickly building high-quality LLM applications.