Does anyone have good experience with any tools for business rules management and code generation? I have a data-heavy project where each entity has tens and tens of attributes and the way an entity or a few are shown to the end users depends on those attributes and their combinations. Stuff like "if an entity has attribute A set to 1, show 'bad'", "if one of the two entities has attribute A set to 2 and the other has attribute B set to 7, show 'entities are incompatible'". The rules change all the time, so I'd like to remove myself as a link between rule authors and the resulting behavior.
I built a system like this using the https://www.openpolicyagent.org/ (so not clojure 😢). The principle worked great and removed my engineering team from managing rules but the Rego language OPA uses is not good.
But I liked how it worked so much I’ve wanted to build something that solves my rego beefs but gives the same flexibility
Ah, so it's a different language... I forgot to specify it in the OP, but I was hoping to hear about things that are WYSIWYG. UML-style, perhaps. :) Some people in the target audience know R well, some know it just enough to get by, some don't know it at all. And certainly nobody is willing to learn anything new if it's not absolutely required for what they do.
my team built a WYSIWYG editor for the OPA language and I think somewhere there was an official one but the company selling it was acquired by Apple so I’m not sure what happened to it
If OPA can do this, Cedar probably can, too, but it's not quite the same use-case.
My team was already doing a lot with clojure over cedar-java (rust bindings) and eventually I just pushed more functionality down into rust and made my own bindings with uniffi-rs, happy to talk about it.
There's a lot of clojure data DSL -> cedar string templating, but at the rust level I can use the real AST types
I like Cedar a lot, but I haven't tried other stuff in that category.
I was just looking their partial evaluation developments, https://www.cedarpolicy.com/blog/tpe
Sounds like a case for core.logic! The WYSIWYG is, that you can develop it in a REPL. :-)
Not WYSIWYG enough for people I work with. :) Need proper GUI, no special syntax, the least amount of text entry.
not kidding but we are using LLM specifically for this with heavy checks business rules are described in plain english -> prompt to map that to code -> generate code we are currently using it internally for now because a “rules engineer” is needed to resolve contradictory business rules but it has been a great time saver + customers only need to use english one insight i can share is have the llm generate classes (in OO languages) so they can describe relationships between entities and rules. it did not work very well when we just used plain objects. maybe this says something about OO 🙂 but that’s what we used to reduce errors by a lot
That's a definite no-go, unfortunately. A decent amount of rules are so convoluted, any issues with them become apparent only after the real data gets involved. The domain is heavily reliant on PII and trade secrets, so I really, really doubt they would be willing to involve thirdparty LLMs. They don't even want to use stuff like "Sign In with Google". It's also not "one manager said this is what the rule should be". It's "five people from our side are trying to agree on a rule, and five other people from the industry are throwing wrenches in their process". If it's just text->code, nobody will be able to agree on anything efficiently, just as it is now, and I'll still be left with a mess of the incessant back-and-forth.
That sounds like what we built and why 😂, wish i could just share it, but we gave a talk about it: https://www.youtube.com/watch?v=qHvh7ilYGQk
Thanks, I'll check it out.
Would this help? Can R hit APIs?
Thanks! Might be relevant, yeah. But I wouldn't use R, it would simply expose the GUI to the management.
Possibly biased comparison of Drools vs GoRules. Drools is the major Java player in the space. https://gorules.io/blog/gorules-vs-drools
Check out https://github.com/oakes/odoyle-rules, a Clojure rules engine.
Yes, I know about it. But does it have a GUI?
Can't speak for odoyle but I know Drools has one with some extensions (e.g. Drools Workbench).