Laya
A Python tool that makes quick, typed decisions about text, like sorting messages or answering yes/no questions.
- Your data
- Stays on your device
- Coding needed
- Developers only
- Cost
- Free
A Python tool that makes quick, typed decisions about text, like sorting messages or answering yes/no questions.
Laya is a Python library for programs that need to make decisions about text. You give it some text and a list of questions. Each question can be a choice between options, a score on a scale, or a yes/no question. It returns an answer with probabilities for each option.
Instead of writing out an answer word by word like a chatbot, it makes each decision in a single step. Its makers describe this like a ball rolling into one of several valleys, where each valley is a possible answer. It can also say when it is not sure. It then flags the item for a person to review instead of guessing. The README says it handles over 100 languages and long documents, and can also work with images, audio and video.
It runs on your own machine and can work with different AI language models underneath, from small to large. An optional add-on lets it learn from answers your team confirms over time, without retraining the whole model.
Developers building automated workflows or AI agents that need to sort, score or route text, such as support tickets, with a way to send unsure cases to a person.
Developers only. You use it by writing Python code, though there is an online demo to try it. New to this? Start here.
Using Claude Code, Cursor or another AI coding assistant? Paste the prompt and it will walk you through the setup.New to this?