You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is to explore the (crazy?) idea of introducing a new paradigm of how we instruct machines to perform data processing tasks in batch mode: AI-driven, agentic batch processing. Based on the following definition from Wikipedia - Agentic AI:
The core concept of agentic AI is the use of AI agents to perform automated tasks but without human intervention.
Automating tasks without human intervention is nothing more than batch processing if the tasks are data processing tasks. So
the idea here is to leverage AI agents to perform data processing tasks (ie steps) and use Spring Batch to orchestrate them in workflows (ie jobs).
Technically speaking, this would require a new implementation of the Step interface, let's say AiStep, which expects as input a configurable, clearly defined set of instructions in human language that an AI agent can perform. The step implementation would periodically save the progress state in the job repository to be able to restart the agent from where it left off in case of failure/restart. All the mechanics of state management that Spring Batch excels at still apply. AI steps could be mixed with classic (code-based) steps in the same workflow. This new feature could be shipped in a new module spring-batch-ai based on the excellent Spring AI project.
The main concern here would be determinism: How deterministic an AI agent can perform a data processing task based on a clearly defined set of instructions? In my experience with the latest models, AI agents are pretty mind-blowing good at following instructions when the prompt is precise enough.
The text was updated successfully, but these errors were encountered:
@fmbenhassine
Hi hassine!
I don't think your idea is crazy at all—on the contrary, I'm quite interested in this issue. 😄
To make sure I fully understand your proposal, I'd like to ask a few clarifying questions.
If you're considering using AI (possibly OpenAI?) within Spring Batch, are you envisioning a flow like this from the user's perspective?
The user provides both the data source and an instruction (Reader).
(In this case, I assume the data might come from a DB or file via the Reader, and the instruction would be passed in as a batch job parameter.)
The data and instruction are passed to the Processor, which uses OpenAI to process the request. (Processor)
(Presumably by calling OpenAI’s API inside the Processor.)
The processed result is then passed to the Writer for further handling. (Writer)
So essentially, are you suggesting that we would need a custom AiQueryProcessor (or similar) to handle step 2?
Could you share more details about your thinking? Thanks!
This issue is to explore the (crazy?) idea of introducing a new paradigm of how we instruct machines to perform data processing tasks in batch mode: AI-driven, agentic batch processing. Based on the following definition from Wikipedia - Agentic AI:
Automating tasks without human intervention is nothing more than batch processing if the tasks are data processing tasks. So
the idea here is to leverage AI agents to perform data processing tasks (ie steps) and use Spring Batch to orchestrate them in workflows (ie jobs).
Technically speaking, this would require a new implementation of the
Step
interface, let's sayAiStep
, which expects as input a configurable, clearly defined set of instructions in human language that an AI agent can perform. The step implementation would periodically save the progress state in the job repository to be able to restart the agent from where it left off in case of failure/restart. All the mechanics of state management that Spring Batch excels at still apply. AI steps could be mixed with classic (code-based) steps in the same workflow. This new feature could be shipped in a new modulespring-batch-ai
based on the excellent Spring AI project.The main concern here would be determinism: How deterministic an AI agent can perform a data processing task based on a clearly defined set of instructions? In my experience with the latest models, AI agents are pretty mind-blowing good at following instructions when the prompt is precise enough.
The text was updated successfully, but these errors were encountered: