Design and evaluation of AI copilots - case studies of retail copilot templates

Michal Furmakiewicz, Chang Liu, Angus Taylor, Ilya VengerarXiv 2024 · DOI

Abstract

As Large Language Models (LLMs) transition from experimental novelties to core business components, the challenge shifts from model training to system engineering. This paper presents a systematic architectural and evaluative framework for building production-ready AI "copilots," using Microsoft’s retail templates as primary case studies. By integrating Retrieval-Augmented Generation (RAG), sophisticated orchestration via function calling, and a hybrid human-AI evaluation "meta-system," the authors demonstrate a blueprint for deploying scalable, safe, and high-quality AI assistants in complex domain-specific environments.

Introduction

While foundation models like GPT-4 possess remarkable reasoning capabilities, they are not turnkey business solutions. In the retail sector, developers face significant hurdles: LLMs lack access to proprietary real-time data, struggle with multi-step task management, and present risks regarding ungrounded outputs ("hallucinations") or adversarial vulnerabilities. To bridge this gap, a shift in perspective is required—viewing the LLM not as the application itself, but as the reasoning engine within a broader, orchestrated system.

Architectural Pillars of the Copilot

The proposed architecture moves beyond simple prompting, relying on four foundational pillars to ensure business utility and reliability:

1. Retrieval-Augmented Generation (RAG)

To overcome the knowledge gaps of static training data, the system utilizes RAG. This allows the copilot to query internal databases or document repositories, providing the LLM with relevant, up-to-the-minute context before generating a response. This ensures that answers regarding store operations or inventory are grounded in fact rather than model weights.

2. Orchestration and Function Calling

Real-world retail tasks often require interacting with external tools. The framework utilizes GPT function calling to allow the LLM to act as an orchestrator. Instead of hard-coding logic, the model "decides" which plugin to invoke based on user intent, managing conversation state and tool parameters dynamically. This flexibility allows the system to handle ambiguous queries that a traditional decision tree would fail to process.

3. System Prompting and RAI Guardrails

System prompting defines the copilot’s persona, tone, and operational boundaries. To mitigate risks, the authors implement Responsible AI (RAI) guardrails, including automated content filters and specific instructions designed to prevent "jailbreaking" or the generation of harmful content.

The Evaluation Meta-System: Human-AI Teaming

Traditional evaluation methods—manual review or unit testing—are insufficient for non-deterministic LLM outputs. Manual review is too slow to scale, while unit tests cannot capture the nuance of natural language. The paper introduces a "human-centric evaluation pyramid" to solve this bottleneck.

In this hybrid model, a high-performing LLM serves as a first-pass evaluator, classifying responses into "high-confidence" or "uncertain" categories. Human annotators then focus their cognitive efforts on validating the high-confidence labels and manually labeling the uncertain cases. This "virtuous cycle" allows developers to perform error analysis, identifying whether failures stem from poor document retrieval or flaws in the LLM's reasoning, thereby improving both the copilot and the evaluation tool simultaneously.

Key Insights and Paradigm Shifts

The research highlights several critical shifts in software development:

  • The Schillace Laws: The authors observe that in the age of AI, "the model improves, but the code doesn't." The boundary between logic and model is fluid, allowing system intelligence to be upgraded by swapping or refining the underlying model without rewriting the application logic.
  • The Safety-Quality Trade-off: There is an inherent tension between a model's creative utility and its safety constraints. The authors suggest using a Pareto frontier to identify the optimal balance between business value and risk tolerance for a specific use case.
  • Metrics for Success: The study identifies five key metrics for retail copilot performance: Groundedness, Relevance, Clarity, Completeness, and Acceptability.

Results and Observations

Case studies involving retail partners demonstrated that red-teaming is essential for identifying sophisticated vulnerabilities, such as prompt injections that attempt to bypass safety filters. Furthermore, the hybrid evaluation model significantly reduced human fatigue while maintaining high accuracy. A key finding was that many perceived "intelligence failures" were actually data failures—specifically, poor retrieval from source documents—highlighting the importance of the RAG pipeline's quality.

Limitations and Future Directions

Despite the framework's success, challenges remain. The non-deterministic nature of LLMs means that identical inputs may not always yield identical outputs, complicating causal analysis. Additionally, AI evaluators can exhibit "self-bias" (preferring their own linguistic style) or "position bias."

Future work will focus on multi-agent architectures, where specialized copilots collaborate to solve complex, multi-turn automation loops, further extending the capabilities of AI in the enterprise.

Summary updated

BibTeX
@misc{furmakiewicz2024design,
  author = {Michal Furmakiewicz and Chang Liu and Angus Taylor and Ilya Venger},
  title = {{Design and evaluation of AI copilots - case studies of retail copilot templates}},
  year = {2024},
  eprint = {2407.09512},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.09512},
}
Figure