Back to chapters

Chapter 3B

Decisions with Chat Completions & Responses APIs

Workshop (AI Extensions) - Decisions with Chat Completions & Responses APIs

Decision Intelligence applied in this module:

  • Introduces the OpenAI Chat Completions API & Responses API as LLM AI interfaces
  • Chat Completions: Composing decisions with system and instruction prompts. Listing of various decision-making frameworks and with their descriptions
  • Chat Completions: Crafting a multi-turn decision scenario
  • Chat Completions: Inspecting the gathered intelligence (chat history)

OpenAI offers two main APIs for building with its models: Chat Completions and the Responses API. Chat Completions is the established interface for sending conversational messages and receiving model-generated replies, making it useful for chatbots, assistants, and straightforward text generation workflows. The Responses API is the newer, more flexible interface designed to support modern AI applications, including multimodal inputs, structured outputs, tool use, and stateful interactions.

Chat Completions commonly provides:

  • Message-based chat interactions using roles like system, user, and assistant
  • Stateless requests by default; your application sends prior messages each turn
  • Full control over what conversation history and context the model receives
  • Broad compatibility with existing OpenAI chat-based implementations

Responses API commonly provides:

  • A unified interface for text, multimodal inputs, tools, and structured outputs
  • Built-in stateful context using store: true and prior response chaining
  • Easier multi-turn interactions without always resending the full message history
  • Better support for deeper reasoning models (GPT-5.4+)

In this module, the Microsoft Extensions for AI (MEAI) ability to create a Chat experience will be introduced. This is a much richer experience than just sending simple prompts that are stateless and context is forgotten in subsequent requests.

MEAI has first-class support for chat scenarios, where the user talks back and forth with the LLM, the arguments get populated with the history of the conversation. During each new run of the decision chats, the arguments will be provided to the AI with content. This allows the LLM to know the historical context of the conversation.


Step 1 - Initialize Configuration Builder & Build the AI Orchestration

Execute the next two cells to:

  • Use the Configuration Builder to load the API secrets.
  • Use the API configuration to build the ChatCompletions orchestrator.
In [1]:
// Import the required NuGet configuration packages
#r "nuget: Microsoft.Extensions.Configuration, 10.0.10"
#r "nuget: Microsoft.Extensions.Configuration.Json, 10.0.10"
#r "nuget: System.Text.Json, 10.0.10"

using Microsoft.Extensions.Configuration.Json;
using Microsoft.Extensions.Configuration;
using System.IO;
using System;

// Load the configuration settings from the local.settings.json and secrets.settings.json files
// The secrets.settings.json file is used to store sensitive information such as API keys
var configurationBuilder = new ConfigurationBuilder()
    .SetBasePath(Directory.GetCurrentDirectory())
    .AddJsonFile("local.settings.json", optional: true, reloadOnChange: true)
    .AddJsonFile("secrets.settings.json", optional: true, reloadOnChange: true);
var config = configurationBuilder.Build();

// IMPORTANT: You ONLY NEED either Azure OpenAI or OpenAI connection info, not both.
// Azure OpenAI Connection Info
var azureOpenAIEndpoint = config["AzureOpenAI:Endpoint"];
var azureOpenAIAPIKey = config["AzureOpenAI:APIKey"];
var azureOpenAIModelDeploymentName = config["AzureOpenAI:ModelDeploymentName"];
// OpenAI Connection Info 
var openAIAPIKey = config["OpenAI:APIKey"];
var openAIModelId = config["OpenAI:ModelId"];
// AzureOpenAI or OpenAI selection flag
var useAzureOpenAI = bool.Parse(config["AzureOpenAI:UseAzureOpenAI"] ?? "true");
Installed Packages
  • Microsoft.Extensions.Configuration, 10.0.10
  • Microsoft.Extensions.Configuration.Json, 10.0.10
  • System.Text.Json, 10.0.10
In [2]:
// Import the Microdoft Extensions AI NuGet Packages
#r "nuget: Microsoft.Extensions.AI, 10.8.3"
#r "nuget: Microsoft.Extensions.AI.Abstractions, 10.8.3"
#r "nuget: Microsoft.Extensions.AI.OpenAI, 10.8.3"
// Import Azure & OpenAI NuGet Packages
#r "nuget: Azure.Identity, 1.21.0"
#r "nuget: OpenAI, 2.12.0"

using Azure;
using Microsoft.Extensions.AI;
using Microsoft.Extensions.Configuration;
using OpenAI;
using System.ClientModel;
using System.ComponentModel;
using System.Text.Json;


// Create the IChatClient based on the selected service
IChatClient chatClient;

// Create a new MEAI ChatClient instance
if (useAzureOpenAI)
{
    Console.WriteLine("Using Azure OpenAI Service");

    var apiKeyCredential = new ApiKeyCredential(azureOpenAIAPIKey!);

    var azureOpenAIClient = new OpenAIClient(
        apiKeyCredential,
        new OpenAIClientOptions
        {
            Endpoint = new Uri($"{azureOpenAIEndpoint!.TrimEnd('/')}/openai/v1")
        });

    chatClient = azureOpenAIClient.GetChatClient(azureOpenAIModelDeploymentName).AsIChatClient();
}
else
{
    Console.WriteLine("Using OpenAI Service");

    var apiKeyCredential = new ApiKeyCredential(azureOpenAIAPIKey);
    var openAIClient = new OpenAIClient(apiKeyCredential);

    // #pragma warning disable OPENAI001
    chatClient = openAIClient.GetChatClient(openAIModelId).AsIChatClient();
}
Installed Packages
  • Azure.Identity, 1.21.0
  • Microsoft.Extensions.AI, 10.8.3
  • Microsoft.Extensions.AI.Abstractions, 10.8.3
  • Microsoft.Extensions.AI.OpenAI, 10.8.3
  • OpenAI, 2.12.0
Using Azure OpenAI Service

Step 2 - Chat Completions: Decisions with Prompt Execution Settings

Using the Microsoft Extensions AI ChatCompletion service is very similar to inovoking a prompt for basic LLM interactions. The chat completion service will provide very similar results to invoking the prompt directly.

In [3]:
// Simple prompt to list some decision frameworks this GenAI LLM is familiar with 
// LLMs are trained on a diverse range of data and can provide insights on a wide range of topics like decision frameworks
// SLMS (smaller LLMs) are trained on a more specific range of data and may not provide insights on all topics
var simpleDecisionPrompt = """
Provide a list of 5 decision frameworks that can help improve the quality of decisions.

Output Format Instructions:
When generating Markdown, do not use any headings higher than ###. 
Avoid # and ## headers. Use only ###, ####, or lower-level headings if necessary. 
All top-level section headers should start at ### or lower. 
Never use ---, ***, or ___ for horizontal lines. There should be no horizontal lines in the output.
For separation, use extra extra spacing. Do not any render horizontal lines.
""";

// Execute the prompt against the AI model
var simpleDecisionPromptResponse = await chatClient.GetResponseAsync(simpleDecisionPrompt);
var simpleDecisionPromptResponseText = simpleDecisionPromptResponse.Text;

// Display the response string as Markdown
simpleDecisionPromptResponseText.DisplayAs("text/markdown");
  1. Weighted Decision Matrix
    Compare options against defined criteria, assign weights based on importance, and score each option. Useful for structured choices with multiple trade-offs.

  2. Expected Value Analysis
    Estimate the potential outcomes, probabilities, and impacts of each option, then calculate the expected value. Helpful when decisions involve uncertainty or measurable risks.

  3. OODA Loop
    Observe the situation, orient by interpreting the information, decide on a course of action, and act. Reassess continuously as new information emerges. Effective in fast-changing environments.

  4. Premortem Analysis
    Assume the decision has failed, then identify the reasons why it failed. This reveals hidden risks, faulty assumptions, and overlooked obstacles before committing.

  5. RAPID Decision Framework
    Clarify who Recommends, provides input, agrees, makes the final decision, and performs the decision. Useful for preventing ambiguity and improving accountability in teams.


Step 3 - Chat Completions: Decision Chat with a System Prompt & Chat History

In the previous examples, simple decision prompts were used. In more sophisticated scenarios, a conversational history and state is required to be maintained. The Chat Completions API definition includes mechanisms to maintain state.

Microsoft Extensions for AI includes a ChatHistory object that can be used with the ChatCompletionService to provide historical chat context to the LLM. Notice that the ChatHistory object differentiates between the different types of chat messages:

  • System Message - System or MetaPrompt. These are usually global instructions that set the "overall rules" for interacting with the LLMs.
  • User Message - A message from the user
  • Assistant Message - A message from the LLM. This is a message generated from an assistant or an agent.

Identifying the messages from which role (user) it came from can help the LLM improve its own reasoning and decision responses. This is a more sophisticated approach than passing chat history in a long dynamic string. ChatHistory objects can be serialized and persisted into databases as well. This allows a system architect to load chat history dynamically, branch history conversations, re-run or simulate different conversation paths. For decision scenarios, these tools are super helpful.

In [4]:
// Set the overall system prompt to behave like a decision intelligence assistant (persona)
var systemPrompt = """
You are a Decision Intelligence assistant. 
Assist the user in exploring options, reasoning through decisions, problem-solving, and applying systems thinking to various scenarios. 
Provide structured, logical, and comprehensive advice.

Output Format Instructions:
When generating Markdown, do not use any headings higher than ###. 
Avoid # and ## headers. Use only ###, ####, or lower-level headings if necessary. 
All top-level section headers should start at ### or lower. 
Never use ---, ***, or ___ for horizontal lines. There should be no horizontal lines in the output.
For separation, use extra extra spacing. Do not any render horizontal lines.

Format the response using only a Markdown table. Only return a Markdown table. 
Do not enclose the table in triple backticks.
""";

// Simple instruction prompt to list 5 (five) decision frameworks this GenAI LLM is familiar with
var simpleDecisionPrompt = """
Provide five Decision Frameworks that can help improve the quality of decisions.
""";

// Create a new chat history object with proper system and user message roles
var chatMessages = new List<ChatMessage>();
// Add system and user messages to the chat history
var systemMessage = new ChatMessage(ChatRole.System, systemPrompt);
var userMessage = new ChatMessage(ChatRole.User, simpleDecisionPrompt);
chatMessages.Add(systemMessage);
chatMessages.Add(userMessage);


// Execute the chat messages against the AI model
var chatHistoryResponse = await chatClient.GetResponseAsync(chatMessages);
var chatHistoryResponseText = chatHistoryResponse.Text;

// Display the response string as Markdown
chatHistoryResponseText.DisplayAs("text/markdown");

// Capture the Assistant response and add it to the chat history
// This will persist the full conversation for future interactions
var assistantChatMessage = new ChatMessage(ChatRole.Assistant, chatHistoryResponseText);
Decision framework How it improves decision quality Core steps Best used when Common pitfall
Expected Utility Analysis Compares options by weighting potential outcomes by their probability and value, making trade-offs explicit. 1. Define options and outcomes.
2. Estimate probabilities.
3. Assign value or utility to outcomes.
4. Calculate expected value.
5. Test sensitivity to assumptions.
Decisions involving uncertainty, measurable outcomes, financial trade-offs, or risk. Treating uncertain estimates as precise facts.
OODA Loop Promotes rapid learning by repeatedly updating decisions as new information becomes available. 1. Observe the situation.
2. Orient by interpreting information and context.
3. Decide on an action.
4. Act, then repeat.
Fast-moving, competitive, or changing environments where waiting for perfect information is costly. Acting quickly without adequately interpreting the situation.
Pre-Mortem Analysis Reduces overconfidence and surfaces risks before committing to a plan. 1. Assume the decision has failed.
2. Ask why it failed.
3. List causes independently.
4. Identify preventive actions.
5. Add mitigations to the plan.
Project planning, strategy, major investments, and decisions with significant downside. Focusing only on dramatic risks while overlooking ordinary execution failures.
Weighted Decision Matrix Creates a transparent comparison of options across multiple criteria rather than relying on intuition alone. 1. Define evaluation criteria.
2. Weight each criterion by importance.
3. Score each option.
4. Calculate weighted totals.
5. Review whether results change under different weights.
Vendor selection, hiring, product choices, prioritization, and other multi-criteria decisions. Using subjective scores without clear definitions or evidence.
Reversible vs. Irreversible Decision Framework Prevents over-analysis of decisions that can easily be changed while encouraging caution for high-commitment choices. 1. Determine whether the decision is reversible.
2. Estimate cost and speed of reversal.
3. For reversible decisions, act and learn quickly.
4. For irreversible decisions, gather more evidence and obtain broader review.
5. Define a review or exit point.
Resource allocation, experiments, organizational changes, and strategic commitments. Misclassifying a decision because indirect consequences or switching costs are underestimated.

In the next step, an additional prompt instruction will be added to the chat history. From the 5 decision frameworks provided in the chat history, Generative AI is asked to recommed a decision framework best suited for the militaty intelligence community. Notice that the previous chat history is automatically provided to provide additional intelligence context.

In [ ]:
// Add the assistant message to the decisoin chat history
chatMessages.Add(assistantChatMessage);

// Note: No reference is made to what previous frameworks were listed.
// Note: Previous context is maintained by the MEAI ChatHistory object 
var simpleDecisionPromptFollowupQuestionPartTwo = """
Which of the 5 decision frameworks listed above is best suited for the military intelligence community?  
Think carefully step by step about what decision frameworks are needed to answer the query.  
Select only the single best framework. 
""";

// Add User message to the chat history
var userFollowupChatMessage = new ChatMessage(ChatRole.User, simpleDecisionPromptFollowupQuestionPartTwo);
chatMessages.Add(userFollowupChatMessage);

// Execute the chat messages against the AI model
var chatHistoryResponseMilitaryIntelligence = await chatClient.GetResponseAsync(chatMessages);
var chatHistoryResponseMilitaryIntelligenceText = chatHistoryResponseMilitaryIntelligence.Text;

// Display the response string as Markdown
chatHistoryResponseMilitaryIntelligenceText.DisplayAs("text/markdown");
Best-suited framework Why it is the strongest fit for military intelligence How it applies
OODA Loop (Observe–Orient–Decide–Act) Military intelligence operates in fast-changing, adversarial environments where information is incomplete, deceptive, and continuously updated. OODA supports rapid adaptation, iterative assessment, and maintaining an advantage by understanding and responding to changing conditions faster than an opponent. Observe: collect and validate intelligence.
Orient: assess context, adversary behavior, uncertainty, and competing explanations.
Decide: recommend or select a course of action.
Act: implement it, monitor outcomes, and feed new information back into the loop.

Step 4 - Chat Completions: Decision Conversation with a Multi-Turn Conversation Scenario

The list of Chat Messages persists the state. This allows for natural converations between the user and AI to be persisted for future use. It can be saved for future reference, it can be replayed, it can be forked in certain spots to try different scenarios, it can be used as a starting point for other conversations etc.

In the scenario below, let's build a multi-turn conversation about a decision over a purchase for a fitness tracker. Notice that each turn the appropriate Chat History roles are populated with the appropriate User prompts and assistant (AI) responses. This in effect acts as the Gathering Intelligence step of the Decision Intelligence framework as the conversation information has been persisted and can be re-used as context for the decision scenario.

In [6]:
// Set the overall system prompt to behave like a decision intelligence assistant (persona)
var systemPromptDecisionConversation = """
You are a Decision Intelligence assistant. 
Assist the user in exploring options, reasoning through decisions, problem-solving, and applying systems thinking to various scenarios. 
Provide structured, logical, and comprehensive advice.
""";

// User prompt to start a decision conversation about buying a fitness tracker
var userPromptDecisionConversationTurn1 = """
I am considering buying a fitness tracker but I am not sure which features really matter. 
Could you explain the main considerations? 
""";

var assistantResponseDecisionConversationTurn1 = """
Absolutely! Key considerations for choosing a fitness tracker often include: 
- Fitness Features (e.g., step counting, heart-rate monitoring, workout tracking)
- Health Monitoring (like sleep tracking or advanced ECG capabilities)
- Battery Life
- Comfort and Fit
- Compatibility with your smartphone's operating system
- Price Range
- Knowing which of these you value most will help narrow down your options.
""";

var userPromptDecisionConversationTurn2 = """
Got it. Battery life and sleep tracking are both important to me. 
What's a typical battery life range for trackers, and how good is their sleep tracking?
""";

var assistantResponseDecisionConversationTurn2 = """
Different fitness trackers have varying battery lives, typically anywhere from 2-3 days (for more feature-rich or bright-display devices) 
up to about 10-14 days (for more minimalist trackers). 

Regarding sleep tracking:
- Many modern devices can track different sleep stages (light, deep, REM).
- High-end devices even track breathing rate and oxygen saturation during the night.
- Some also offer insights about sleep quality and tips for improvement.

If battery life is a priority, you may want to consider trackers with a more conservative display and fewer power-hungry features.
""";

var userPromptDecisionConversationTurn3 = """
Are there any popular models you would recommend for that balance of battery life and sleep tracking?
""";

var assistantResponseDecisionConversationTurn3 = """
Popular options that strike a balance between robust sleep tracking and good battery life include:
- Fitbit Inspire 3 or Fitbit Charge 5: Both have solid sleep tracking, multi-day battery, and strong app support.
- Garmin Vivosmart 5: Offers decent fitness and sleep insights, plus better-than-average battery life.
- Xiaomi Mi Band 7: Budget-friendly, surprisingly robust health metrics, and a long-lasting battery.

Each varies in price and features, so consider your budget and the specific metrics youd like to track.
""";

var userPromptDecisionConversationTurn4 = """
That is great infor. 
I also have a friend who said I should consider an Apple Watch. 
Does that have comparable battery life and sleep tracking?
""";

var assistantResponseDecisionConversationTurn4 = """
The Apple Watch is known for its extensive feature set, including advanced health monitoring, 
but its battery life tends to be shorterusually around 18-24 hours on a single charge 
(or possibly a bit more in low-power mode). While its sleep tracking features have improved over time, 
you might find you need to charge it daily or almost daily, which could conflict with your goal of 24/7 tracking. 
""";

// Create a new chat history with a multi-turn conversation about buying a fitness tracker
// Notice how the conversation flow uses different roles (user and assistant) to simulate a realistic decision-making dialogue
var chatHistoryMessages = new List<ChatMessage>();

chatHistoryMessages.Add(new ChatMessage(ChatRole.System, systemPromptDecisionConversation));
chatHistoryMessages.Add(new ChatMessage(ChatRole.User, userPromptDecisionConversationTurn1));
chatHistoryMessages.Add(new ChatMessage(ChatRole.Assistant, assistantResponseDecisionConversationTurn1));
chatHistoryMessages.Add(new ChatMessage(ChatRole.User, userPromptDecisionConversationTurn2));
chatHistoryMessages.Add(new ChatMessage(ChatRole.Assistant, assistantResponseDecisionConversationTurn2));
chatHistoryMessages.Add(new ChatMessage(ChatRole.User, userPromptDecisionConversationTurn3));
chatHistoryMessages.Add(new ChatMessage(ChatRole.Assistant, assistantResponseDecisionConversationTurn3));
chatHistoryMessages.Add(new ChatMessage(ChatRole.User, userPromptDecisionConversationTurn4));
chatHistoryMessages.Add(new ChatMessage(ChatRole.Assistant, assistantResponseDecisionConversationTurn4));

Using the above conversation history as the "Gathered Intelligence" betweeen the user and the AI assistant, let's make a final decision and ask for final feedback and a decision evaluation. This "Gathered Intelligence" for the decision can be persisted, re-loaded, simulated multiple times, applied to different AI systems to optimize decisions further.

In [7]:
var userPromptDecisionConversationFinalDecision = """
Thank you for all of that information, I think I'll go with a Fitbit. 
The Fitbit Inspire 3 seems like a good fit for my budget and needs. 

Any quick final thoughts or insights on my decision? 
""";

// Add User message to the chat history
chatHistoryMessages.Add(new ChatMessage(ChatRole.User, userPromptDecisionConversationFinalDecision));

// Execute the chat messages against the AI model
var fitnessTrackerResponse = await chatClient.GetResponseAsync(chatHistoryMessages);
var fitnessTrackerResponseText = fitnessTrackerResponse.Text;

// Add the response to the chat history (Chat Messages)
chatHistoryMessages.Add(new ChatMessage(ChatRole.Assistant, fitnessTrackerResponseText));

// Display the response string as Markdown
fitnessTrackerResponseText.DisplayAs("text/markdown");

The Fitbit Inspire 3 sounds like a sensible choice for your priorities:

  • Battery: Up to about 10 days under typical conditions, though frequent workouts, notifications, and the always-on display—if enabled—can reduce that.
  • Sleep tracking: Good for basic sleep duration, consistency, sleep stages, and trends. Treat sleep-stage and “sleep score” estimates as directional rather than medical-grade measurements.
  • Comfort: Small and lightweight, making it well suited to overnight wear.
  • Trade-offs: It lacks built-in GPS, so it relies on your phone for route tracking, and some deeper insights require a Fitbit Premium subscription.
  • Practical tip: Wear it consistently and charge it during a shower or another brief daily routine so you do not lose overnight data.

Overall, it is a good fit if you want straightforward health and sleep tracking without the shorter battery life or higher cost of a smartwatch.


Step 5 - Chat Completions: Inspect & Optimize Gathered Intelligence of Chat Completion History

The ChatMessage list is a transparent construct that can be inspected and written out. Because it is a simple list, the chat messages object can be manipulated to replay chats from middle interactions to simulate different outcomes.

Execute the cell below to write out entire decision conversation.

📝 Note: In the Decision Intelligence framework, chat history can serve as a form of gathered intelligence. Interactions among users, AI models, processes, and agents provide valuable context for effective decision-making. It’s highly recommended to persist chat history objects (agent threads), especially during decision optimization, to ensure critical information is retained and accessible.

In [9]:
// Print the number of chat interactions and the chat history (turns)
Console.WriteLine("Number of decision chat interactions: " + chatHistoryMessages.Count());

// Change this to a string builder and show as markdown
var stringBuilderChatHistory = new StringBuilder();
foreach (var message in chatHistoryMessages)
{
    // add a new line for each message
    stringBuilderChatHistory.AppendLine($"**{message.Role.ToString().ToUpper()}**:");
    stringBuilderChatHistory.Append($"{message.Text.Replace("#", string.Empty)}");
    stringBuilderChatHistory.AppendLine("\n");
}

// Display the chat history as Markdown
stringBuilderChatHistory.ToString().DisplayAs("text/markdown");
Number of decision chat interactions: 11

SYSTEM: You are a Decision Intelligence assistant. Assist the user in exploring options, reasoning through decisions, problem-solving, and applying systems thinking to various scenarios. Provide structured, logical, and comprehensive advice.

USER: I am considering buying a fitness tracker but I am not sure which features really matter. Could you explain the main considerations?

ASSISTANT: Absolutely! Key considerations for choosing a fitness tracker often include:

  • Fitness Features (e.g., step counting, heart-rate monitoring, workout tracking)
  • Health Monitoring (like sleep tracking or advanced ECG capabilities)
  • Battery Life
  • Comfort and Fit
  • Compatibility with your smartphone's operating system
  • Price Range
  • Knowing which of these you value most will help narrow down your options.

USER: Got it. Battery life and sleep tracking are both important to me. What's a typical battery life range for trackers, and how good is their sleep tracking?

ASSISTANT: Different fitness trackers have varying battery lives, typically anywhere from 2-3 days (for more feature-rich or bright-display devices) up to about 10-14 days (for more minimalist trackers).

Regarding sleep tracking:

  • Many modern devices can track different sleep stages (light, deep, REM).
  • High-end devices even track breathing rate and oxygen saturation during the night.
  • Some also offer insights about sleep quality and tips for improvement.

If battery life is a priority, you may want to consider trackers with a more conservative display and fewer power-hungry features.

USER: Are there any popular models you would recommend for that balance of battery life and sleep tracking?

ASSISTANT: Popular options that strike a balance between robust sleep tracking and good battery life include:

  • Fitbit Inspire 3 or Fitbit Charge 5: Both have solid sleep tracking, multi-day battery, and strong app support.
  • Garmin Vivosmart 5: Offers decent fitness and sleep insights, plus better-than-average battery life.
  • Xiaomi Mi Band 7: Budget-friendly, surprisingly robust health metrics, and a long-lasting battery.

Each varies in price and features, so consider your budget and the specific metrics you’d like to track.

USER: That is great infor. I also have a friend who said I should consider an Apple Watch. Does that have comparable battery life and sleep tracking?

ASSISTANT: The Apple Watch is known for its extensive feature set, including advanced health monitoring, but its battery life tends to be shorter—usually around 18-24 hours on a single charge (or possibly a bit more in low-power mode). While its sleep tracking features have improved over time, you might find you need to charge it daily or almost daily, which could conflict with your goal of 24/7 tracking.

USER: Thank you for all of that information, I think I'll go with a Fitbit. The Fitbit Inspire 3 seems like a good fit for my budget and needs.

Any quick final thoughts or insights on my decision?

ASSISTANT: The Fitbit Inspire 3 sounds like a sensible choice for your priorities:

  • Battery: Up to about 10 days under typical conditions, though frequent workouts, notifications, and the always-on display—if enabled—can reduce that.
  • Sleep tracking: Good for basic sleep duration, consistency, sleep stages, and trends. Treat sleep-stage and “sleep score” estimates as directional rather than medical-grade measurements.
  • Comfort: Small and lightweight, making it well suited to overnight wear.
  • Trade-offs: It lacks built-in GPS, so it relies on your phone for route tracking, and some deeper insights require a Fitbit Premium subscription.
  • Practical tip: Wear it consistently and charge it during a shower or another brief daily routine so you do not lose overnight data.

Overall, it is a good fit if you want straightforward health and sleep tracking without the shorter battery life or higher cost of a smartwatch.

By persisting the Decision Intelligence chats and making them available for inspection, can further help the decision-making process. For example you can load the Chat History summarize it or even have AI recommend optimizations for it based on the conversation.

📝 Note: The process below is simplified to illustrate the power of Gathering Intelligence with user <--> AI interactions. More advanced best practices will be introduced in further sections.

In [10]:
var userPromptSummarizeTheDecisionChat = """
Briefly summarize the chat conversation about buying a fitness tracker.
""";

chatHistoryMessages.Add(new ChatMessage(ChatRole.User, userPromptSummarizeTheDecisionChat));

// Execute the chat messages against the AI model
var fitnessTrackerDecisionSummaryResponse = await chatClient.GetResponseAsync(chatHistoryMessages);
var fitnessTrackerDecisionSummaryResponseText = fitnessTrackerDecisionSummaryResponse.Text;

// Display the response string as Markdown
fitnessTrackerDecisionSummaryResponseText.DisplayAs("text/markdown");

The conversation focused on choosing a fitness tracker based primarily on battery life and sleep tracking. We discussed typical battery ranges of roughly 2–3 days to 10–14 days, and noted that most modern trackers estimate sleep stages, duration, and related metrics, though these are not medical-grade. Popular options included Fitbit, Garmin, and Xiaomi models, while the Apple Watch was noted for stronger smartwatch features but shorter, roughly daily battery life. The user ultimately chose the Fitbit Inspire 3 for its affordable price, long battery life, lightweight design, and solid basic sleep tracking, while accepting trade-offs such as no built-in GPS and some premium features requiring a subscription.

The chat history messsage can further be manipulated by looking at the user to AI interactions and getting feedback for future decision interactions.

In [11]:
// Optimize the chat history for any future decision interactions
// Prompt to look at the chat history and provide recommendations for optimizing decision-making
var userPromptOptimizeTheDecisionChat = """
Based on the chat conversation so far...
Provide some recommendations on how the decision interactions could be optimized for decision-making.
What are some considerations for the AI to help the use make even better decisions?
""";

// Remove the last message to avoid redundancy
chatHistoryMessages.RemoveAt(chatHistoryMessages.Count - 1);

chatHistoryMessages.Add(new ChatMessage(ChatRole.User, userPromptOptimizeTheDecisionChat));

// Execute the chat messages against the AI model
var decisionOptimizationResponse = await chatClient.GetResponseAsync(chatHistoryMessages);
var decisionOptimizationResponseText = decisionOptimizationResponse.Text;

// Display the response string as Markdown
decisionOptimizationResponseText.DisplayAs("text/markdown");

The conversation was helpful, but it could have supported a stronger decision by moving from general product descriptions to a more explicit, personalized decision process.

What was done well

  • It identified the user’s two primary criteria: battery life and sleep tracking.
  • It explained the central trade-off between long-battery fitness bands and feature-rich smartwatches.
  • It highlighted practical considerations such as comfort, smartphone compatibility, GPS, and subscription costs.
  • It ended with a recommendation that broadly matched the user’s stated priorities.

How the decision interaction could be improved

1. Clarify priorities before recommending models

The AI should ask a few targeted questions, such as:

  • What phone do you use—iPhone or Android?
  • What is your maximum budget?
  • Do you need built-in GPS, or is phone-connected GPS sufficient?
  • Do you want notifications, calls, apps, or payments?
  • How important are workout metrics compared with sleep tracking?
  • Are you willing to pay for a premium subscription?
  • Do you have any medical or accessibility needs?

These questions could materially change the recommendation. For example, an iPhone user who wants smartwatch features may prefer an Apple Watch, while someone wanting simple tracking and infrequent charging may prefer a Fitbit or Garmin band.

2. Define what “good sleep tracking” means

“Sleep tracking” is not one feature. The AI should distinguish between:

  • Total sleep duration
  • Bedtime and wake-time consistency
  • Night awakenings
  • Sleep stages such as light, deep, and REM
  • Breathing disturbances or oxygen trends
  • Sleep coaching and long-term trend analysis

It should also explain that consumer wearables generally estimate sleep stages using movement and heart-rate signals. They are useful for trends, but they are not equivalent to a clinical sleep study and should not be relied on for diagnosing sleep disorders.

3. Use a decision matrix rather than a simple recommendation

A compact comparison would make the trade-offs clearer:

Criterion Fitbit Inspire 3 Apple Watch Garmin vivosmart-type device
Battery life Strong Usually much shorter Generally strong
Sleep tracking Good for trends Good, with ecosystem integration Good, depending on model
Smartwatch functions Limited Excellent Limited to moderate
Built-in GPS Typically no Available on many models Varies
Subscription concerns Some features may require subscription Usually fewer recurring fitness fees, but higher purchase price Varies
Best for Simple, lightweight tracking Broader smartwatch use Fitness-oriented users wanting battery life

The exact specifications should be verified for the current model and region before purchase.

4. Account for total cost, not just purchase price

The analysis should include:

  • Device price
  • Optional subscription fees
  • Replacement bands and chargers
  • Warranty and repairability
  • Expected lifespan and software support
  • Whether the user already owns a compatible phone

A lower-priced tracker may become less attractive if its most useful insights require a recurring subscription.

5. Verify current product information

The prior responses presented model and battery information somewhat broadly. A better interaction would explicitly check:

  • Whether the model is still sold and supported
  • Current battery estimates under realistic use
  • Whether features differ by country
  • Current subscription terms
  • Compatibility with the user’s phone
  • Whether the device supports the desired health metrics

For example, battery claims are usually “up to” figures and may fall with frequent workouts, notifications, bright displays, or continuous measurements. Some previously mentioned models may also be older or discontinued, so current availability matters.

6. Discuss user experience and data continuity

For sleep tracking, comfort and consistency may matter more than having the most advanced sensors. The AI should ask or advise about:

  • Whether the device is comfortable enough to sleep in
  • Charging routines that avoid losing overnight data
  • Band materials and skin sensitivity
  • App quality and ease of interpreting trends
  • Exporting or retaining health data if changing brands
  • Privacy, account requirements, and how health data is handled

7. Test the recommendation against realistic scenarios

The AI could ask the user to imagine:

  • “Would I remember to charge a device every night?”
  • “Would I wear a small band more consistently than a watch?”
  • “Would I miss built-in GPS?”
  • “Would a subscription annoy me after six months?”
  • “Do I want sleep information, or do I want medical-grade answers?”

This helps prevent choosing based only on a specification sheet.

A stronger recommendation style

Instead of simply saying “the Inspire 3 sounds sensible,” the AI could say:

Given your stated priorities—long battery life, overnight comfort, basic sleep trends, and budget—the Fitbit Inspire 3 is a reasonable fit. Before buying, confirm that you are comfortable with its lack of built-in GPS, any subscription limitations, and its compatibility with your phone. If you want more advanced training metrics, built-in GPS, or fewer Fitbit-specific ecosystem constraints, compare it with a current Garmin or another tracker in the same price range.

That preserves the recommendation while making its conditions explicit.

General principles for the AI

To help users make better decisions, the AI should:

  1. Elicit goals before listing products.
  2. Separate must-haves from nice-to-haves.
  3. Expose trade-offs instead of presenting one “best” choice.
  4. Distinguish measured facts from estimates and marketing claims.
  5. Flag uncertainty and information that may have changed.
  6. Consider total cost and long-term usability.
  7. Avoid implying medical accuracy where none exists.
  8. Offer a short list of alternatives, including a cheaper and a more capable option.
  9. Use a weighted comparison when the user has clear priorities.
  10. End with a practical next step, such as checking compatibility, subscription requirements, and return policies.

In this case, the decision was directionally sound, but a few targeted questions and a current, criteria-based comparison would have made the recommendation more reliable and more personalized.