mirror of
https://github.com/OpenSPG/openspg.git
synced 2025-06-27 03:20:10 +00:00
docs(ca): update ca readme.md (#221)
Co-authored-by: lisiyuan.li <lisiyuan.li@alibaba-inc.com>
This commit is contained in:
parent
089c40c737
commit
19ebd1976d
@ -1,34 +1,23 @@
|
||||
# CA Library
|
||||
# README: Controllable Generation Agent
|
||||
|
||||
The CA (Controllable Agent) library is designed to streamline the process of computation and scheduling within Python applications. It provides a modular framework that allows for the separation of computation logic from scheduling logic, as well as the ability to interface with remote Large Language Models (LLMs).
|
||||
This README provides an overview of a Controllable Generation Agent, highlighting its components, operational flow, and how training and inference are integrated to enable a large language model (LLM) to understand domain-specific questions and utilize a knowledge graph (KG) for appropriate responses.
|
||||
|
||||
## Modules
|
||||
## Components
|
||||
|
||||
The library is composed of several modules, each with a distinct purpose:
|
||||
The agent comprises two main modules:
|
||||
1. **LLM Module**: This module serves as the agent's core, leveraging a large language model to process natural language input and generate responses.
|
||||
2. **KG Query Module**: This module interacts with a Knowledge Graph, enabling the agent to fetch specific information or validate facts.
|
||||
|
||||
### Base Module
|
||||
## Operational Flow
|
||||
|
||||
The Base Module is at the core of the CA library. It provides the essential building blocks for constructing computational workflows. It ensures that the computational logic can operate independently from the scheduling mechanism, thereby allowing developers to focus on the algorithmic aspects without worrying about underlying infrastructure.
|
||||
The agent operates in a loop to ensure continuous interaction and feedback. Here's a simplified outline of the flow:
|
||||
1. The LLM Module receives user input and determines if it is a domain-specific query.
|
||||
2. If the question is domain-specific, the KG Query Module checks if the Knowledge Graph can provide an answer.
|
||||
3. If the KG contains relevant information, the response is generated using this data. Otherwise, the LLM generates a response based on its training data.
|
||||
4. The cycle repeats with each new input.
|
||||
|
||||
### LLM Module
|
||||
|
||||
The LLM Module extends the functionality of the CA library by allowing users to invoke Large Language Models that are hosted remotely. This module provides an interface to communicate with LLM services, enabling the integration of sophisticated language processing capabilities into the user's applications.
|
||||
|
||||
## Service
|
||||
|
||||
The CA library also includes service components that facilitate the deployment and invocation of algorithms comprised of multiple modules.
|
||||
|
||||
- **Deployment**: This service allows users to deploy a collection of modules as a cohesive algorithm onto a desired runtime environment. The service ensures that all modules are correctly instantiated and interconnected to function as a single algorithmic unit.
|
||||
|
||||
- **Invocation**: Once deployed, the invocation service enables users to execute the algorithm by providing an interface to trigger the computational process. It handles the routing of input data to the appropriate modules and the aggregation of results for output.
|
||||
|
||||
## TODO
|
||||
|
||||
The development roadmap for the CA library includes several enhancements aimed at improving the user experience and expanding the library's capabilities:
|
||||
|
||||
- **Develop Automatic Deployment**: To eliminate the need for manual container and service startup, work on an automatic deployment feature will allow users to deploy their algorithms with minimal setup. This advancement would streamline the process, making the deployment of complex algorithms more user-friendly.
|
||||
|
||||
- **Develop LLM's Lora Deployment Capability**: To simplify the deployment of models with Lora technology, a specialized service will be created. This service would automate the deployment process, enabling users to focus on the model's functionality without worrying about the intricacies of deployment.
|
||||
|
||||
- **Develop Agent Capability**: An agent-based model will be introduced to drive algorithmic workflows using large models. This approach would enable more dynamic and intelligent orchestration of computational processes, potentially leading to improved efficiency and adaptability.
|
||||
## Training and Inference Collaboration
|
||||
|
||||
Training and inference processes work together to make the agent more effective:
|
||||
1. **Training**: The LLM is trained to understand the context and determine whether a question falls within a specific domain. This training helps the agent decide if the question requires querying the Knowledge Graph.
|
||||
2. **Inference**: The trained LLM is used to make real-time decisions on whether to retrieve information from the Knowledge Graph or generate responses based on its own data.
|
||||
|
Loading…
x
Reference in New Issue
Block a user