[ 
https://issues.apache.org/jira/browse/CAMEL-27245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on CAMEL-27245 started by Federico Mariani.
------------------------------------------------
> camel-spring-ai-decision - new component for Spring AI decision models
> ----------------------------------------------------------------------
>
>                 Key: CAMEL-27245
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27245
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-spring-ai
>            Reporter: Federico Mariani
>            Assignee: Federico Mariani
>            Priority: Major
>
> Spring AI 2.1.0 adds the {{DecisionModel}} API. It answers yes/no, choice and 
> score questions about an input and reports the probability of each answer. 
> Implementations: {{OpenAiDecisionModel}}, {{OllamaDecisionModel}} (default 
> model {{d1-omni:600m}}) and {{SystemOneDecisionModel}}. A decision model is 
> faster and cheaper than asking a chat model the same thing, and the 
> probabilities let the application decide how sure the model must be.
> This fits Camel's routing: classify a message and route it with a 
> Content-Based Router, stop a prompt injection before it reaches a chat model, 
> or check whether an answer is supported by the retrieved documents.
> h3. Proposal
> * A {{spring-ai-decision:name}} producer with an autowired {{decisionModel}}.
> * One question from the endpoint options: the kind (yes/no, choice, score), 
> the question, the options or levels with their descriptions, and the yes/no 
> criteria. The body is the input.
> * A {{DecisionPrompt}} body for several questions.
> * The answer and the probabilities in headers, so the route can {{choice()}} 
> on them, and the body left as it is.
> * Documentation with a routing example, and the Spring Boot starter.
> _Claude Code on behalf of Croway_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to