The Number Series Copilot Initiative

It all started as a demo during the Areopa webinar that I prepared over a weekend, almost a year ago. You can check it out here: Developing Generative AI. While the demo was limited, as any proof of concept (POC) tends to be, it showcased the exciting possibility of setting up the system using the Copilot.

The demo caught some attention, inspiring me to submit the idea to the Business Central Ideas at aka.ms/bcideas. To my delight, it was approved, and I decided to move forward with shipping it. This marked my very first contribution journey to the base product. Jesper recognized the potential, and we navigated the GitHub process, culminating in the issue being created: GitHub Issue #659. It was cold (not) February 29 (yes, I got a bonus day!), and the work began!

… Six Months Later

Here we are with the Number Series Copilot integrated into the base product of the new and fresh version 25.0! 🥳

And there is more! I am truly excited and honored to receive the 🏆 Contribution Hero Award 2024 for my work on this initiative!

A huge thank you to everyone in the community for your overwhelming support and congratulations. Wow, I didn’t receive this much love even on my birthday! 🫶 Your kind words were incredibly uplifting, and I genuinely appreciate it!

What is the Number Series Copilot?

The Number Series Copilot streamlines the process of creating and managing number series, making it easier than ever to set up unique identifiers for various company entities. Whether it’s master data like accounts, customers, and items, or documents such as orders, invoices, and posted documents—essentially everything that requires a number series—is supported by the Number Series Copilot.

It can accommodate scenarios where year-based numbering is necessary or where gaps in numbering are not allowed. You can also update existing number series and generate new number series lines on top of your existing ones.

Let’s consider how we maintain the number series? Three main scenarios emerge:

  • Create New Number Series
  • Modify Existing Number Series
  • Prepare for the Next Year (especially for number series with date patterns, such as PO-2400001 for 2024 and PO-2500001 for 2025)

All these scenarios are supported! And there’s more: when a new number series is generated and the user decided to keep it, it’s automatically added to the relevant setup table. For example, if you generate a Purchase Order number series, it seamlessly integrates into the Purchase & Payables Setup. It’s a completely end-to-end process!

If you scroll right in the suggestions window, you will see exactly where copilot will save the generated number series.

Still not amazed? 😊 How much time do you think it now takes to set up number series for a NEW EMPTY company?

1 minute and 55 seconds! Less than 2 minutes for the entire company, and you’re good to go! How long does it typically take you to set up number series manually? Half a day? A full day? That was the original idea behind this initiative—freeing up your time for what you really love!

Key Benefits:

  • Time-Saving: The Copilot can quickly generate number series, significantly reducing the time needed for setup and maintenance.
  • User-Friendly Prompts: With natural language input, you can easily instruct the Copilot to create or modify series, making the process intuitive and straightforward.
  • Consistency Across Entities: It ensures that your numbering remains consistent, which is crucial for effective data management and analysis.

Number Series Copilot for Your Extension

The Number Series Copilot isn’t just limited to standard functionality—it’s designed to work seamlessly with your own extensions! The Copilot intelligently knows which number series should be generated based on the setup tables and the corresponding No. Series fields.

To ensure that the Copilot can generate number series for your module, you simply need to meet the following criteria:

  • Have a Setup Table: Your setup table should include Setup in the name.
  • Include a Number Series Field: This field should have a direct relation to the “No. Series” table.

That’s it! If you fulfill these requirements, the Number Series Copilot will automatically work with your extension, making integration effortless and efficient.

Under the Hood

The following diagram illustrates the complete concept behind the Number Series Copilot, showcasing what happens behind the scenes.

The first step is to define the user intent. The user intent could be to generate a new number series, modify an existing one, or prepare for the next year.

User Intent and Tool Selection

Depending on the user’s input, the Azure OpenAI tool suggests different business logic to follow:

  1. Generate New Number Series: If the user specifies the entities for which number series need to be generated, we retrieve them from the setup tables and fields. If the tables are not specified, the system retrieves a list of all relevant setup tables and number series fields.
  2. Pattern Specification: If the user provides a specific pattern, the language model (LLM) will utilize that. If no pattern is specified, the LLM checks if there are any existing number series. If there are, it uses those as a reference for creating a new pattern. If none exist, default patterns will be applied.

Important Considerations

A crucial part of the process involves performing a full-text search to check for the existence of setup tables and number series fields. For instance, if a user wants to generate a number series for employees, we can find the relevant number series fields in the Payroll Setup table. However, if the user specifies “generate number series for payroll workers,” the LLM will not identify this field. Although “payroll worker” is semantically similar to “employee,” the full-text search limitations prevent the generation of a number series for the employee.

I hope that future versions of Business Central will enhance this process with embeddings to improve accuracy.

Handling Existing Number Series

If a user asks to generate a number series that already exists in the system, those number series will be displayed in the output but grayed out, along with a message indicating their existing status. When the user opts to keep these grayed-out series, they will be ignored and not replaced. However, if the user intends to modify them, that request will be honored.

Known Issues

As with any new feature, the initial version of the Number Series Copilot appeared to have a few known issues. Here are some of the key ones to be aware of:

  1. Tool Selection Based on Terminology: If you use the word “generate” instead of “create new,” the Copilot may not select the appropriate tool. This can lead to confusion and wrong outcomes.
  2. Existing Number Series Handling: If you have existing number series that lack a warning number or an increment number, the Copilot may mistakenly use these as a pattern. However, since these fields are mandatory, this can result in an error. You can experience this issue in a Cronus Demo environment.

The good news is that these issues have already been addressed in another pull request (PR-2111). These fixes should be implemented in version 25.1.

Launch Event Session

You can also check out the Microsoft launch event session focused on the Number Series Copilot

https://youtube.com/watch?v=MpDKjl7zzdk%3Fcontrols%3D1%26rel%3D0%26playsinline%3D0%26modestbranding%3D0%26autoplay%3D0%26enablejsapi%3D1%26origin%3Dhttps%253A%252F%252Fkatson.com%26widgetid%3D1

Upcoming Session at Directions EMEA 2024

Excited to announce that we will have a dedicated session at Directions EMEA 2024 in Vienna with Jesper Schultz. This session will focus on the open-source initiative in general, and Number Series Copilot in particular.

Session Details:

  • Date: Wednesday, November 6, 2024
  • Time: 2:00 PM – 2:45 PM (45 minutes)
  • Room: 0.49+0.50

We’ll dive into how the idea was born and the journey from concept to final product implementation in Business Central. You’ll learn about the differences in the process for AI features compared to traditional features that can be developed as open-source solutions.

Additionally, we’ll discuss the Microsoft workflow for approving your AI solution, and [SPOILER ALERT] yes, it goes directly to the head office in Redmond!

This is a sneak peek into what you can expect, and I would be thrilled to see you all at the session!

Final Thoughts

I want to take a moment to thank everyone for supporting me on this journey. This was my first experience contributing to an open-source project!

I hope that you, as a partner or a power user, will find the Number Series Copilot useful. I calculated that it could save around 30 years of work overall 🙂 !

Thank you again for all your support, and I can’t wait to see how you will benefit from this new feature!

About the Author:

Dmitry Katson

💻 Microsoft AI & Business Central MVP 🏆 Contribution Hero 2024 👨‍💼 Architect, Developer, and Team Leader 🌐 Creator of CentralQ.ai 🤖 Make BC smart with AI

Reference:

Katson, D (2024). The Number Series Copilot Initiative. Available at: Number Series Copilot – Katson.com | MVP [Accessed: 18th October 2024].

Share this on...

Rate this Post:

Share:

Topics:

Copilot

Tags: