How tinestaric/evaluateaitoolkit works
Project type and purpose
• This is a set of Microsoft Dynamics 365 Business Central (BC) AL-based extensions:
• EvaluateAIToolkit: a toolkit that adds prompt testing, validation, schema extraction, and parallel execution of AI prompts within BC.
• SendEmailToCustomer: a sample AI feature extension that uses the toolkit to generate customer emails from posted sales invoices.
• SendEmailToCustomer-Test: a test harness showing how to plug SendEmailToCustomer into the Evaluate AI Framework for large-scale evaluation.
• Purpose: enable rapid prototyping and large-scale validation of AI prompts (e.g., OpenAI completions) inside Business Central, with full history and schema checks.
File structure
• Top-level apps under the solution:
• EvaluateAIToolkit/
• SendEmailToCustomer/
• SendEmailToCustomer-Test/
• In EvaluateAIToolkit:
• “PromptDialogs” & “PromptingTesting” & “ResultLog” folders → UI pages & tables for test setup and results.
• “GPTInteractions” → codeunits to build, execute, and validate prompts.
• “CompletionTesters” → pluggable schema testers (JSON, XML, none).
• “Helpers” → AOAIWrapper (the low-level HTTP client to OpenAI) and “Deployments” (implementations for various GPT models).
• “Plugin” & “Registration” → interfaces/enums and codeunits to register new AI features into the toolkit.
• In SendEmailToCustomer:
• “Implementation” → CustEmailGenerationImpl and GPTTokensCountImpl implementing IAIFeature interface.
• “PromptDialog” → pages and table extensions on Sales Invoice to trigger the feature.
• “Register” → registers the feature with the BC Copilot capability and toolkit.
• In SendEmailToCustomer-Test:
• Mirrors “Plugin” & “Test” codeunits to hook the sample feature into the toolkit for automated testing.
README for additional insights
• Confirms it’s not a web full-stack but a BC extension suite.
• Emphasizes capabilities: prompt validation, schema inference, alternate user prompts, parallel execution, history tracking.
• Mentions external dependency: OpenAI API (keys supplied at runtime via “Helpers/Deployments” or direct codeunit settings).
Be detailed—capture all essential layers
• Major folders as grouped components
• Data flow end-to-end: from “Run Prompt” page to “PromptTestResult” table
• Parallel execution flow (e.g., multiple sessions hitting the wrapper concurrently)