Repository navigation
Integration report: fine-tuned Laya as a LangGraph router, vs XGBoost, BERT and Gemini #1298
AdityaThakare72
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi! I built a small, reproducible benchmark that uses Laya as the routing step of an agent workflow, and I'm sharing
the results here since CONTRIBUTING.md treats benchmarks and integration reports as first class.
Repo (Apache-2.0, Colab notebooks): https://github.com/AdityaThakare72/typed-decision-models
Setup
past failures). Output is a typed decision mapped onto Laya's three question types:
route_target:choice, 6 teamspriority_level:score, low / medium / high / criticalrequires_human:noulThe ticket is passed as a dict
state.laya.train.finetunefromconvaiinnovations/layawith the defaults (RLCD loss), 2 epochs,micro_batch=8,grad_accum=4, on a Colab T4.Results (450-ticket test set; exact match = all three fields right)
convaiinnovations/laya, zero-shotlaya-typed-decisions, zero-shotAs the router node in a LangGraph workflow (same graph, same 100 test tickets, only the router changes):
gemini-3.1-flash-lite, structured JSON, policy + 12 examplesObservations
about 2k tickets took held-out per-question accuracy from 0.545 to 0.911, as reported by
finetune's ownbefore/after evaluation.
confidence was 0.956 against 0.958 accuracy, so the refit temperatures work as advertised.
models (0.679). The dict
statewith numeric fields worked well without any feature engineering.Gemini picked the team well but couldn't apply a numeric priority policy described in words: 57 of 100 priorities
right, against 84 for Laya.
agent.predict(one state) runs at about 45 ms p50 on a T4, andpredict_batchis used for evaluation.A small thing I noticed
Loading
convaiinnovations/laya(and our fine-tune, which inherits it) emits:It only affects
choicequestions with 11 or more options, so it didn't touch our results (6 options). It may beworth refitting or removing that bucket in the published
rl_agent_config.json.Caveats
Happy to contribute
If useful, I could open a focused PR, for example:
examples/showing how to fine-tune on a custom multi-question routing schema and plugthe agent into a LangGraph router node, or
Let me know which, if any, would fit, and I'll follow CONTRIBUTING.md (conventional commits, ruff, one runnable check).
All reactions