Conversation
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
jimador
marked this pull request as ready for review
September 25, 2026 17:31
jimador
added this pull request to stack #2067
September 25, 2026 18:45
igordayen
reviewed
Sep 25, 2026
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| package com.embabel.common.ai.model |
Contributor
There was a problem hiding this comment.
although embeddingservice and its impl reside in the same package, I would recommend moving the Observed services into sub-package.
Looping in @azanux to review observability integration
|
|
||
| [source,java] | ||
| ---- | ||
| include::../../../../../../embabel-agent-common/embabel-agent-ai/src/test/java/com/embabel/common/ai/classification/ClassificationJavaTest.java[tag=enum-mapping] |
Contributor
There was a problem hiding this comment.
Would be resolved by doc build?
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Related: #2049, #2050, #2051, #2052, #2057, https://github.com/embabel/embabel-agent-experimental/issues/42. This splits the contract work out of prototype #2059 and precedes #2061.
This prototype implementation adds classification and decision service contracts for Java and Kotlin consumers. The TypeSafe integration in #2061 will implement these interfaces.
Classification answers which declared category applies. Categories have stable identifiers and descriptions, and callers can map the result to an enum or an application type without asking the provider to construct an object. No match, an inconclusive assessment and a provider failure are separate outcomes. Provider confidence stays optional. A supplied map determines category order; use an ordered map when that order matters.
DecisionServiceadds proposition assessment and also supports classification. Its model family remainsDECISIONwhen it is used as a classifier. A false proposition answer is a successful assessment. The application decides what to do with it.flowchart LR Consumer[Java or Kotlin consumer] --> Mapping[Typed category mapping] Mapping --> Request[Provider-neutral request] Request --> Service[ClassificationService] Decision[DecisionService] -->|classification capability| Service Decision --> Assessment[Proposition assessment] Service --> Result[Selected / no match / inconclusive / failure] Result --> Mapping Mapping --> Policy[Application policy] Service -.-> Metadata[Pure model metadata snapshot] Adapter[TypeSafe adapter in follow-up PR] -.-> DecisionThe new
CLASSIFICATIONandDECISIONmodel families require consumers with exhaustiveModelTypeswitches to handle those cases.The contracts live beside embedding services in
embabel-agent-ai. There is no new Maven module or provider SDK dependency. The guide covers typed categories, result semantics, metadata snapshots and observations. Services support ordinary dependency injection. Model registry selection, role defaults, BYOK and provider autoconfiguration follow with the adapter.