Package com.tnsai.coordination.roma
Interface Atomizer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Determines whether a task is atomic (solvable directly) or needs decomposition.
Implementations can use LLM-based analysis or heuristics.
-
Method Summary
Modifier and TypeMethodDescriptionstatic AtomizerdepthBased(int maxDepth) Creates a depth-based atomizer that treats tasks as atomic beyond a certain depth.booleanChecks if a task is atomic.static AtomizerllmBased(com.tnsai.agents.Agent agent) Creates an LLM-based atomizer that asks an agent to decide.
-
Method Details
-
isAtomic
Checks if a task is atomic.- Parameters:
task- the task descriptiondepth- current recursion depth- Returns:
- true if the task can be solved directly without decomposition
-
llmBased
Creates an LLM-based atomizer that asks an agent to decide.- Parameters:
agent- the agent to use for atomicity analysis- Returns:
- an atomizer that uses LLM judgment
-
depthBased
Creates a depth-based atomizer that treats tasks as atomic beyond a certain depth.- Parameters:
maxDepth- maximum decomposition depth before forcing atomic treatment- Returns:
- an atomizer that uses depth as the criteria
-