What's New: Extending Copilot Using AL Code (2024 Release Wave 1)
Extending Copilot in Business Central with AL code, 2024 release wave 1: prompt dialog instructional text and prompt guides, Copilot actions on lists, token counting in the AOI Token codeunit, and function calling with tool choice. Also covers how Microsoft keeps models current with latest/preview versions and the announced managed, shared AI resources with AI credit governance (private preview in 24.x, public preview in 25.x, GA TBD). Ends with partner Q&A on data privacy, using your own data via prompts, and choosing GPT-3.5 Turbo where it fits.
- Developer Tools Recap and AI Module Overview
- Prompt Dialog Enhancements
- Copilot Actions and Implementation
- Token Counting Fundamentals
- Token Counting Methods and Implementation
- Function Calling Concepts and Scenarios
- Function Calling Technical Details
- Function Calling Implementation in AL
- Tool Choice Modes and Validation
- Keeping Current with Model Versions
- Model Version Rollout Process and Managed AI Resources
- AI Credit System and Resource Governance
- Roadmap and Timeline for AI Resources
- Developer Toolkit, Data Privacy and Resources
Overview
The session covers new AL capabilities for building Copilot features. It starts with prompt dialog changes (instructional text, prompt guides) and copilot actions on lists, list parts, worksheets and dialogs. It then covers counting input tokens before calling Azure OpenAI, and function calling, including the tool choice modes and the validation each one needs.
The second half covers keeping up with model versions using version-agnostic strings and the latest and preview model versions. It also covers managed and shared AI resources, the AI credit, limits and quotas, and the roadmap, which depends on preview feedback. It ends with data privacy answers, a model recommendation and the open source AL toolkit on GitHub. The demo code is not production ready.
Key points
- Set the instructional text property on prompt area fields to show general instructions in the prompt dialog. It is not meant for example prompts.
- Prompt guides are prompt templates opened from a book icon on the prompt dialog. They are added as a new prompt guide area in actions on a prompt dialog page and can be grouped.
- Copilot actions on lists, list parts, worksheets and standard dialogs go in a new prompting area in actions.
- Token counting covers input tokens only, not output. Methods in the AOI Token codeunit cover GPT 3.5, GPT 4 and other models, take SecretText input, and do not yet include the system meta prompt.
- Function calling: describe functions to the model and it returns which to call with arguments. Do not hardcode function descriptions in text. Keep them in isolated storage or Azure Key Vault because they are IP.
- Tool choice auto can return either a function call or a normal chat reply, so handle the error case. Setting a specific function guarantees it is called, but you must validate the arguments.
- Two versions of each model are kept, latest and preview. Use version-agnostic strings such as turbo-latest and test your feature, since versions may perform differently.
Features
| Feature | Status | At | Evidence |
|---|---|---|---|
| Instructional Text in Prompt Dialog | status not stated, demoed | 2:51 | |
| Prompt Guides | status not stated, demoed | 3:32 | |
| Copilot Actions on Lists and Dialogs | status not stated, demoed | 4:41 | |
| Token Counting | status not stated, demoed | 5:41 | |
| Token Counting Methods in AOI Token Code Unit | status not stated, demoed | 7:36 | |
| Function Calling | status not stated, demoed | 9:13 | |
| Function Calling in Copilot | status not stated, demoed | 13:33 | |
| Function Calling Tool Choice | status not stated, demoed | 14:13 | |
| Tool Choice Auto Mode | status not stated, demoed | 16:14 | |
| Tool Choice Specific Function Mode | status not stated | 16:55 | |
| Model Version Management | status not stated, demoed | 18:16 | |
| Version Agnostic Model Strings | status not stated, demoed | 18:36 | |
| Managed and Shared AI Resources | preview | 20:54 | “private preview will happen pretty soon after the business centrer launch event” (26:13) |
| AI Credit Resource Governance | status not stated | 24:11 | |
| Operational Limits for Fair Use | status not stated | 24:51 | |
| AI Quota Entitlements | status not stated | 25:12 | |
| Capacity-based resource governance and pricing | announced | 26:13 | “capacity based resource governance and pricing will be modeled and finalized through simulated limit and quota enforcement in private or public preview” (26:13) |
| Responsible AI process for non-OpenAI accounts | status not stated | 27:14 | |
| Limit and quota publishing and enforcement | announced | 27:14 | “in public preview we will also make sure that the proper limit will be published and enforced while the proper quota might also be” (27:14) |
| Developer toolkit for Copilot in Business Central | status not stated | 28:16 | |
| Azure OpenAI data access control | status not stated | 29:57 | |
| Data source capability for Azure OpenAI | status not stated | 31:10 | |
| GPT-3.5 Turbo model recommendation | status not stated | 31:30 | |
| AL toolkit open source on GitHub | status not stated | 33:47 | |
| Data privacy and AI model training | status not stated | 34:07 |
AL objects mentioned
As heard in the captions. A name that matches one object page by exact type and name links to it; the others stay as named.
- codeunit “AOI Token” at 7:56
- codeunit “get weather co-pilot function” at 13:33
- other “get weather co-pilot function” at 13:33
- other “get current weather” at 14:13
- other “Azure OpenAI data sources capability” at 29:17
- other “GPT 3.5 turbo model” at 31:30
- other “GPT 4 model” at 31:51
- other “GPT 4 Turbo model” at 31:51
Not found in BC28-30: codeunit “AOI Token”, codeunit “get weather co-pilot function”.
Quotes
- 2:51 “now we can provide concise instructions to help users get started they will be displayed”
- 5:41 “token accounting allows you to count the number of tokens that will be used by your input before sending a request to Azure open”
- 6:56 “you would like to evaluate how many tokens are going to be used because then you can estimate what your potential cost is um”
- 7:16 “a model has a limit to how many tokens there are uh that it can actually take in as input and now if you”
- 7:56 “agnostic so whether you’re using um gpt 4 uh january version or gpt 4 june version it does not matter”
- 8:37 “the input is of type secret text and why is that uh and that the reason for that is because your input we consider”
- 9:34 “it allows you to describe functions to the assistant model uh and have it return uh the functions that should be called along with”
- 13:53 “you should always retrieve that from isolated storage or Azure key volt for example uh because your description as I had mentioned these we”
- 16:35 “if you use it with functions the response can either be a function or it can be a regular chat response so you do”
- 16:55 “if you set a specific Tool uh specific function it will guarantee that response will always call that function however if your user inputs”
- 17:56 “we keep two versions of each model available latest and preview not that we don’t really specify if the latest is the June model”
- 21:29 “when it’s time to bring this AI infused solution into production at scale especially when they are combining multiple copilot features built by different”
- 22:50 “partners and isv can simply focus on satisfying responsible AI requirement to access our shared resources building their calet features based on their intellectual”
- 26:13 “capacity based resource governance and pricing will be modeled and finalized through simulated limit and quota enforcement in private or public preview”
- 26:53 “this 24x release so either 24.0 in April or 24.1 in May right next public preview we will introduce a new process to satisfy”
- 26:53 “the ETA for priate review is pretty soon so this 24x release so either 24.0 in April or 24.1 in May”
- 27:35 “General availability is when the proper limits and qu will be both published and enforced the ETA still to be determined or TBD depending”
- 27:35 “so the ETF for public preview will be the next release around 25th uh 25x version”
- 29:57 “which business Central data does Asia open AI have access to the answer is none our commitment is that your data is your data”
- 30:29 “what if I need to give my data to the model how can I use my data with aure open Ai and the answer”
- 31:30 “our recommendation is to use GPT 3.5 turbo whenever it fits your needs because it’s faster first of all it’s also cheaper for you”
- 33:47 “the AL part of our toolkit is actually open source is part of our aka.ms /bc apps Repro in GitHub and you can contribute”
- 34:07 “Microsoft cloud runs on trust AI is no exception your data is only yours it’s your data the AI models are not trained on”
Disclaimers in the video
- 8:37 coming-later: these methods do not include our um provided system meta prompt um but that will be coming
- 26:13 preview: private preview will happen pretty soon after the business centrer launch event
- 26:33 preview: the ETA for priate review is pretty soon so this 24x release so either 24.0 in April or 24.1 in May
- 26:53 coming-later: the ETA for priate review is pretty soon so this 24x release so either 24.0 in April or 24.1 in May
- 27:14 preview: public preview we will introduce a new process to satisfy responsible AI requirement
- 27:35 subject-to-change: General availability ETA still to be determined or TBD depending on the preview feedbacks and result
- 27:35 coming-later: the ETF for public preview will be the next release around 25th uh 25x version
- 29:17 preview: some of these cap abilities are considered previous specifications on Asia and AI side and in the toolkit we will not support any preview specification um at all
- 35:12 preview: these are not production ready code but they just to show you how you can interact with the toolkit
Presenters (as heard): Derek Jew, Julia Sandy, Enrio, Derek, Julia, Sandy, Sarco.
