davsclaus commented on PR #30345:
URL: https://github.com/apache/camel/pull/30345#issuecomment-7001940228

   A follow-up on my review, to give the context behind CAMEL-23774: the 
recipes are aimed first at **local models** (14B-35B, Ollama, the TUI AI panel 
and the MCP tools). The ticket came out of our local-model benchmark runs: 
small models know the individual options from the catalog, but fail at 
composing them (wrong option names, wrong YAML shape, a missing repository bean 
or dependency). A frontier model mostly knows these patterns already; a small 
model gains the most from copying a validated route and adapting it.
   
   That changes one point of my review, and makes two others more important:
   
   1. **Keep `.core(true)`** (I suggested dropping it; please don't). The tool 
has to be in the tool set a small model sees by default, otherwise it will not 
find it. In return it must be cheap in the prompt: a short tool description, 
and the core/full budgets in `AiPanelPromptBudgetTest` raised by the measured 
amount, with a comment in the existing style ("raised by N for 
camel_catalog_pattern_recipes (CAMEL-23774), measured ~X").
   2. **Index first, one recipe per call.** Without a `term` (which a small 
model often does), the tool now returns all ten recipes, about 45 KB / ~11k 
tokens: twice the whole core prompt prefix, and enough to flood an 8k-32k 
context. Please return a small index without arguments (`id`, `name`, one-line 
`problem`, ~1k tokens), and one full recipe for an `id`. Transport variants 
could come only when asked, so the default answer stays small.
   3. **Term matching on values only.** Small models tend to pass generic 
terms. Matching the raw `toJson()` means `route` or `name` returns every 
recipe, and `connect/file-processing` never matches (`/` is escaped as `\/`). 
Matching the string values (case-insensitive) fixes both.
   
   The intended flow for a local model is: "deduplicate orders from Kafka" -> 
index -> `idempotent-consumer` -> copy and adapt the route -> 
`camel_validate_source`. With 1-3 each step stays small.
   
   _Claude Code on behalf of davsclaus_
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to