Natural Language BAQs

Business Activity Queries (BAQ’s) are very powerful but not all users know how to create them, we want to make it easier for users to get the data they need to make decisions.

At Epicor labs we are evaluating if we can leverage Machine Learning to query data out of our ERP systems and allow users to describe what they need to know and have a BAQ / SQL query generated and run automatically. This is forward looking and may be impossible at this point, but we believe it will be extremely valuable for everyone if we can.

We need your help to capture example prompts you or your end users would be looking for and ideally if you already have BAQ’s that provide this data you can include the BAQ SQL definition such that we can use these to train a model and evaluate feasibility. Here is the link to provide examples or comments.

Thanks in advance!

6 Likes

So you want people to post a natural language question. Along with the SQL code for a BAQ that we created to answer that question? I want to make sure I understand the second box.

1 Like

image

Finally ! We get a picture of @Edge!

4 Likes

Are we talking something similar to PowerBI’s NLP?

Use natural language to explore data with Power BI Q&A - Power BI

Correct, the challenge is the BAQ’s people write often have limited descriptions / comments if we look to train a model on those as prompts they do not really represent what people are looking for.

Not exactly but close. Today EVA has some predefined skills for specific Natural Language prompts, this is more generic. Fine Tune a language model on ERP schemas, relationships and business context and allow for iterative refinements of the data.

So lets say your in App Studio and need to get data into a grid. What if you could describe what you needed.
Get Containers Shipment Details for a Purchase Order
Show me unpaid invoices for customer dalton
What is the average monthly billings
What is the average monthly billings by year and month

If I may, I’d think higher than the BAQ. Stealing a page from the Behavior Driven Development movement, if there were a way to capture company business rules and then link the implementation of the business rule to customizations (BAQs, Dashboards, Directives, etc), then you would have a lot of telemetry on what people have to do to successfully use Epicor in their businesses.

Taking the list above a bit higher, tell me why one wants all container shipment details for a PO, why unpaid invoices for Dalton, why average monthly billings, …

For example:

  • As a company, we want to average 10% more billing than last year to promote growth.
  • As a finance group, we want open receivables to stay under 60 days to improve cash flow.
  • As an inventory control person, I want all Aircraft product group parts to be serialize, to be airworthy compliant.
  • As a SOX compliant company, I want to see separation of concerns in A/R, A/P, and Purchasing, to protect against fraud.
  • As a company, we don’t want to expose part costs outside a predetermined group to keep a competitive advantage.

When these desires are linked to BAQs, Directives, Apps/Screen Customizations, Dashboards, etc, we’ll get the reason for the system changes which may lead to potential new features in the software - as well as the ability to do some ML. Learning that 10% of screen/app customizations are used to hide data from some users could lead to a masking solution that would eliminate those customizations that all of these companies have to do. Seeing how much customization goes into auditing could lead to improvements in that area. Knowing why people are asking the questions above would provide a real insight to Epicor’s customers.

EDIT

And what a tool this would be for implementations. Imagine Professional Services capturing requirements that leads to customization work…

5 Likes

Boy, I hate to push back on making something easier, but as the resident coding moron here, I find BAQs to be the easiest thing I do in Epicor.

I suppose the purpose is to let the non-admins (ordinary users) make queries with zero knowledge that sites are called plants in the database, etc. And I do hear requests for that where I work.

Maybe it’s me, but I’ve tried the Excel “Analyze Data” suggestions (similar to what @Mark_Wonsil mentioned with Power BI, I think) and it never helps.

I tend to find our data has too many subtleties (customers for site X have an ID that start with P; our MfgSys site has no costID associated so you have to use ‘1’ for them, etc.).

I’d like to see some more mundane improvements myself, to the BAQ designer.

  • Ability to copy subqueries
  • Better field search (I know that the JobFirm field is the 9th J in JobHead, but I wish I could just search it like I can in BPM designers)
  • If “Check Syntax” in the calculated field could check only the field and not the whole BAQ
  • List view of calc fields should allow paste-insert (especially for those pesky union subqueries)

These are all on Epicor Ideas, I think.

And for fun, I just tried one of Excel’s own suggestions and it didn’t understand what it meant. (I understood what it meant, though.)

image

6 Likes

I think the hardest thing about this whole project is going to be the specificity needed, and the fact that each company has a different definition for each term.

“Give me the average cost of Part A over the past year”

Did you mean material costs? Labor costs? overhead? Do you want the accounting version of average which is used to evaluate the value of your current inventory? or the actual average cost for every part? Should this include make to order parts as well as make to stock?

The list goes on… and on… and on.

Coming from a business with all kinds of caveats and special rules about what counts and what doesn’t, I don’t understand how this could ever be exact enough for anything except general ideas. Machine learning and natural language works for problems where room for error at 90% is acceptable. Most BAQ’s don’t have that much room for error, the data is either correct, or it isn’t.

It would be interesting if you can crack that nut, but I just don’t see how you can get past the tribal knowledge needed every company.

5 Likes

As a developer, I find the hardest part of my job is often trying to probe folks in the right way to arrive at an unambiguous articulation of what they’re looking for. Once I have a well-written, clear, and succinct description in English, it is often trivial to translate that into C# or SQL…

That said, it would be super cool if a Natural Language BAQ engine was good at doing that probing for us. It would nicer and more patient than I am after 10 rounds of email back and forth.

3 Likes

I’m skeptical but I still want to provide an example or two. (I mean, if you really want my poorly-formed SQL code.)

So do you want examples with quirks like we alluded to? (An example: by convention here, customer IDs in our PDC site start with a P - like P00001 - whereas the MfgSys site is… all others. Oh, except that one.)

Or do you want ones with less, um, fluff?

Examples with quirks are fine these are going to be reviewed / refined before any training is done.

2 Likes