<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Oliver Jones on Medium]]></title>
        <description><![CDATA[Stories by Oliver Jones on Medium]]></description>
        <link>https://medium.com/@olliejones619?source=rss-c1bc632525c6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*KowNZvSbg9cHCDBWR7uiIA.jpeg</url>
            <title>Stories by Oliver Jones on Medium</title>
            <link>https://medium.com/@olliejones619?source=rss-c1bc632525c6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 17:13:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@olliejones619/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Our First Time Using an AI Model in Production]]></title>
            <link>https://medium.com/villa-plus-engineering/our-first-time-using-an-ai-model-in-production-55e4ddae82fd?source=rss-c1bc632525c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/55e4ddae82fd</guid>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[azure-foundry]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[azureopenai]]></category>
            <dc:creator><![CDATA[Oliver Jones]]></dc:creator>
            <pubDate>Mon, 16 Feb 2026 08:43:04 GMT</pubDate>
            <atom:updated>2026-02-16T08:43:04.471Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction</strong></p><p>Last year, we took the plunge and integrated an AI chat model directly into our production code for the first time. The goal was simple, automate professional responses to customer reviews from platforms like Trustpilot and Airbnb.</p><p>This post outlines what we built, how we integrated the AI, key challenges we faced, and what we learned with practical insights for developers considering a similar path.</p><p><strong>What We Built</strong></p><p>We created a tool that generates suggested responses to customer reviews:</p><ul><li>Multiple review sources feed a review event into our system.</li><li>An Azure Function App receives the event, analyses the text and rating, then generates a reply and identifies topics discussed using an AI model.</li><li>The reply is saved to our database.</li><li>A web UI dashboard displays the review and suggested response for quick human review before manual posting.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*hWreT2a32d1jNnfzcPJAQg.png" /><figcaption>Simplified overview of system.</figcaption></figure><p>This setup reduced manual work while keeping quality control in human hands.</p><p><strong>How We Integrated AI</strong></p><p>We chose to integrate OpenAI models hosted on Azure OpenAI, mainly because Azure Foundry was not available at the time this feature was developed. This fits our Azure-first infrastructure and provides enterprise-friendly authentication, security, and billing options. In the future we plan on migrating over to Foundry.</p><p><strong>Key steps in our integration:</strong></p><ul><li>Provision an Azure OpenAI / Foundry resource and deploy a chat model (e.g., GPT-4.1-mini) using the Azure Portal / BICEP templates.</li><li>Authenticate securely using Managed Identity for our Azure Function App, avoiding long-lived API keys.</li><li>Interact with the model using the Azure.AI.OpenAI NuGet package.</li></ul><p>Here’s a simplified example of how we generated a completion:</p><blockquote>var client = new ChatClient(endpoint, credential);</blockquote><blockquote>var response = await client.GetChatCompletionsAsync(</blockquote><blockquote>deploymentName,</blockquote><blockquote>new ChatMessage[]</blockquote><blockquote>{</blockquote><blockquote>new SystemMessage(systemPrompt),</blockquote><blockquote>new UserMessage(reviewText)</blockquote><blockquote>});</blockquote><blockquote>var reviewResponse = response.Choices[0].Message.Content;</blockquote><p><strong>Prompt Design &amp; Data Validation</strong></p><p>The biggest challenge wasn’t writing the code it was getting the model to return consistent results.</p><p>Early responses varied in tone, structure, and length. To fix this we focused on:</p><ol><li><strong>Prompt clarity:</strong> Clearly defined instructions including tone, constraints, and examples. (We found the model often ignored guidelines went off script, it took multiple testing to get consistent results).</li><li><strong>Structured output:</strong> We enforced JSON or schema-based output using the model’s structured output support so we could reliably parse and validate responses.</li><li><strong>Validation:</strong> All model outputs were validated before being saved or displayed.</li></ol><p><strong>Lessons from prompt design:</strong></p><ul><li>Be explicit about output requirements (e.g., exact JSON fields).</li><li>Provide examples for both good and bad responses.</li><li>Avoid overly long or mixed instructions.</li></ul><p>We relied heavily on Azure Chat Playground when developing the system instructions used by the model. This helped us quickly iterate though versions and refine out prompt.</p><p><strong>Cost Management</strong></p><p>AI costs scale with prompt size and model choice. We found it critical to:</p><ul><li>Keep prompts minimal but precise</li><li>Split tasks when possible (e.g., topic analysis from response generation).</li><li>Avoid unnecessarily long context history unless needed.</li></ul><p>Mixing models for different subtasks can further optimise quality vs cost if your platform supports it.</p><p><strong>What We’d Improve</strong></p><p>This project works well, but if we built it again we would:</p><ul><li>Introduce more advanced structured prompts with schema enforcement for tighter control</li><li>Improve validation on model completion, making to check any structured response e.g. JSON.</li><li>Introduce model switching depending on the task to reduce on costs.</li><li>Introduce POML, Microsoft’s prompting language which is designed to bring more structure and organisation to prompting LLM’s</li></ul><p><strong>Final Thoughts</strong></p><p>The technical hurdles especially around prompt design and consistent output were far more complex than the actual API integration. But with careful prompt planning and solid testing, we ended up with a reliable and useful feature that delivers business value.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=55e4ddae82fd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/villa-plus-engineering/our-first-time-using-an-ai-model-in-production-55e4ddae82fd">Our First Time Using an AI Model in Production</a> was originally published in <a href="https://medium.com/villa-plus-engineering">Villa Plus Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Guide to Domain Refactoring: Part 2]]></title>
            <link>https://medium.com/villa-plus-engineering/a-guide-to-domain-refactoring-part-2-8dfd651c25bf?source=rss-c1bc632525c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/8dfd651c25bf</guid>
            <category><![CDATA[cloud-architecture]]></category>
            <category><![CDATA[microsoft-azure]]></category>
            <category><![CDATA[refactoring]]></category>
            <category><![CDATA[azure-devops]]></category>
            <category><![CDATA[testing]]></category>
            <dc:creator><![CDATA[Oliver Jones]]></dc:creator>
            <pubDate>Tue, 18 Nov 2025 06:01:13 GMT</pubDate>
            <atom:updated>2025-11-18T06:02:41.364Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Part 2: Testing — From Risk to Release</strong></p><p><strong>1. Introduction</strong></p><p>In <a href="https://medium.com/villa-plus-engineering/a-guide-to-net-domain-redefinition-bad77fe06590">Part 1</a>, we covered how to refactor a .NET domain and align resources, repositories, and governance at a high level. This chapter focuses on the testing process when migrating across resource groups, assuring a successful migration of resources.</p><p><strong>2. Risk Management</strong></p><p>Start by identifying where failure would have the biggest impact. Focus on:</p><ul><li>Critical business workflows</li><li>Fragile integrations</li><li>High-value resources</li></ul><p>Prioritise high-risk areas first, validate them thoroughly, and only then move to medium and low-risk areas. This keeps effort focused where it matters.</p><p><strong>3. Black Box Testing</strong></p><p>Begin with black box tests that treat the domain as a complete system. Provide inputs, check outputs, and ignore internal implementation.</p><p>This approach verifies behaviour as an end user or external system would experience it. Remember to prioritise testing by most critical functionality to least. Black box testing also ensures that logic and integration work correctly before you examine internal components.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*lNP4aKnNOwic0YJqYWUW-g.png" /><figcaption>Black box testing diagram</figcaption></figure><p><em>Example:</em></p><p>Suppose a function app in your test environment is migrated to a new resource group. It receives events from a service, processes them internally (details unimportant for this test), and writes data to a database. To perform a black box test, manually trigger an event on the service bus (the input) and verify that the resulting database entries (the output) match expectations.</p><p><em>Tip:</em> Capture the expected database output before migration to use as a reference afterward.</p><p><strong>4. Monitoring Using Azure Portal</strong></p><p>Use the Azure Portal as an monitoring tool.</p><p>Monitor:</p><ul><li>Resource deployments for failures or unexpected changes</li><li>Pipeline runs for full and successful execution</li><li>Application insights for any exceptions occurring after the migration.</li></ul><p>This real-time visibility helps catch issues automated tests might miss.</p><p><strong>5. Testing Alert Rules Are Working</strong></p><p>Test alerts before trusting them. Trigger known issues in the test environment, such as removing a role or blocking a connection, and confirm alerts fire with the correct severity and routing.</p><p>For example an ‘Application Insights down’ scenario can be simulated by temporarily disable the APPLICATIONINSIGHTS_CONNECTION_STRING environment variable (e.g. by prefixing it with disabled).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*Ykm-rHo4p3-4ATMYDDzPvQ.png" /><figcaption>Disabling app insights</figcaption></figure><p>Other similar approached can be taken to test all alert rules.</p><p><strong>6. Moving Live Resources Only After Test Environment Is Fully Tested</strong></p><p>Do not move production resources until the test environment is proven stable.</p><p>· Checklist before migrating live:</p><p>· Black box tested</p><p>· Alerts working</p><p>· Monitored on test</p><p>· Have a revert plan for worst case scenarios</p><p>· Double check provisioning pipelines</p><p>It is not possible to move just a staging slot of an application to the new resource group for testing without its associated production slot, therefore both slots must be moved at the same time. This makes it critical that you ensure the test environment has no problems.</p><p>Keep in mind any environmental differences between live and test and factor them in.</p><p><strong>7. Summary</strong></p><p>Successful testing of domain migration involves assessing risks, validating behaviour through black-box tests, monitoring in the Azure Portal and reviewing alerts. Only when all of the steps have been completed should changes to production be made. This ensures minimal change for problems in what can be a risky process.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8dfd651c25bf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/villa-plus-engineering/a-guide-to-domain-refactoring-part-2-8dfd651c25bf">A Guide to Domain Refactoring: Part 2</a> was originally published in <a href="https://medium.com/villa-plus-engineering">Villa Plus Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Guide to .Net Domain Redefinition]]></title>
            <link>https://medium.com/villa-plus-engineering/a-guide-to-net-domain-redefinition-bad77fe06590?source=rss-c1bc632525c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/bad77fe06590</guid>
            <category><![CDATA[azure-portal]]></category>
            <category><![CDATA[azure-devops]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[domain-driven-design]]></category>
            <category><![CDATA[provisioning]]></category>
            <dc:creator><![CDATA[Oliver Jones]]></dc:creator>
            <pubDate>Tue, 01 Jul 2025 09:28:06 GMT</pubDate>
            <atom:updated>2025-11-18T09:18:15.085Z</atom:updated>
            <content:encoded><![CDATA[<h3>A Guide to Domain Refactoring</h3><h3>Introduction</h3><p>New needs emerge as a business grows and changes, leading to evolving architecture. Over time, this can blur the boundaries between domains in a solution. Refining these domains can be complex and time-consuming. This blog covers key points to consider, major challenges we faced, and most importantly how to make smart domain decision. The context of these challenges and decisions is based on our experience with Azure DevOps and the Azure Portal.</p><h3>What is a Domain and Why it Matters</h3><p>In this context, a domain refers to a clear boundary that groups key business functionality in an application, often based on real-world business logic. Each domain maps directly to an Azure resource group and an Azure DevOps repo, following a business-centric structure.</p><p>Well-defined domains improve security by isolating services — each has its own service principals, Key Vault access, and controls. This setup also simplifies resource governance, team ownership, scalability, cost tracking, and maintenance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*ouaoOMxBN_HcJXWpWW_5LA.png" /><figcaption>Example domain diagram</figcaption></figure><h3>Key Terms</h3><p>When talking about domains there are some key terms that should be understood.</p><p>· <strong>Domain</strong></p><p>A logical boundary that groups related business functionality, mapped to an Azure resource group and DevOps repo.</p><p>· <strong>Access Control</strong></p><p>Permission settings that restrict or grant access to Azure resources and DevOps components.</p><p>· <strong>Service Principal</strong></p><p>A security identity used by applications or pipelines to access Azure resources.</p><p>· <strong>Resource Governance</strong></p><p>The process of managing access, compliance, and cost for cloud resources.</p><p>· <strong>Branch Policies</strong></p><p>Rules applied to pull requests, like requiring reviewers or successful builds.</p><p>· <strong>Business-Centric Architecture</strong></p><p>An architectural model that aligns technical structure with business functions and domains.</p><h3>Migration Checklist</h3><p>This section covers a high-level overview of how to migrate a resource to a new domain. For this example, we will consider an app service along with its supporting resources (insights, app service plan, alert rules) which we will be moving to a new domain.</p><p><strong>Update Provisioning Templates</strong><br>When moving resources to a new domain, update all related provisioning templates to reflect the new resource group. Ensure no boundary violations (e.g., references to Key Vaults or Storage Accounts in the old domain).</p><p><strong>Create New DevOps Project</strong><br>Set up and configure a new DevOps project. You’ll need “Project Collection Administrators” permission at the organization level.</p><p><strong>Create New Resource Group</strong><br>Create the new resource group manually, since there will always be a manual step to assign access control, this cannot be fully automated.</p><p><strong>Create New Pipeline Service Principals</strong><br>Create service connections/principals through DevOps for pipeline access to the new resource group. You’ll need “User Access Administrator” permissions. Rename these in Azure Portal for clarity, as default Entra names are generic.</p><p><strong>Clone Pipelines and Repositories</strong><br>Clone pipelines and export/import repositories into the new project. Some manual updates are required; reset default branches for repositories and update each pipeline stage to use the new service principal.</p><p><strong>Configure Pipeline Policies</strong><br>Reapply branch policies manually, including reviewer requirements, vote resets, and build validations, as they don’t transfer automatically.</p><p><strong>Move Test Resources</strong><br>Use the Azure Resource Move tool to transfer test resources. Some, like Alert Rules, must be recreated manually.</p><p><strong>Testing</strong><br>Run test provisioning, verify traces in App Insights, and test alerts and APIs to ensure functionality before migrating live resources. (check <a href="https://medium.com/villa-plus-engineering/a-guide-to-domain-refactoring-part-2-8dfd651c25bf">part 2</a> for more information)</p><p><strong>Move Live Resources</strong><br>Migrate live resources, run provisioning, and test. Alert rules may be hard to verify in live, but successful pipeline runs usually indicate correct setup. Monitor APIs closely post-migration to confirm stability.</p><p><strong>Clean Up</strong><br>Remove outdated resources, including old alerts, Key Vault secrets, repositories, and pipelines from the previous project.</p><h3>Key Challenges and Learnings</h3><p><strong>Webspaces</strong></p><p>Azure webspaces are region and resource group-specific containers automatically created when an App Service Plan is made. Because they’re tied to the resource group, issues arise when using Azure Resource Mover. After moving an App Service to a new resource group, you can’t link it to an App Service Plan in that group due to a Webspace mismatch. There are two resolution to this challenge, you can either keep it as part of the old app service plan as there are generally not tied in with domain relationships. Or if you want to switch app service plans, it is required to re-provision it from scratch.</p><p><strong>Setting Key Vault Access Policies</strong></p><p>You can set Key Vault access policies in each app service’s ARM template using the resourceId() function. This avoids hardcoding resource IDs when assigning these policies in the Key Vault provisioning template. If a resource is re-provisioned and its ID changes, the reference updates automatically, so there’s no need to manually update Key Vault access policies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*rorrJ_jGIVKOahbY9YmpBA.png" /><figcaption>Example ARM template</figcaption></figure><p><em>This blog is part of a larger series. More stories are coming soon that explore each step in this process in greater depth — including provisioning strategies, migration pitfalls, pipeline management, and domain alignment best practices. Stay tuned!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bad77fe06590" width="1" height="1" alt=""><hr><p><a href="https://medium.com/villa-plus-engineering/a-guide-to-net-domain-redefinition-bad77fe06590">A Guide to .Net Domain Redefinition</a> was originally published in <a href="https://medium.com/villa-plus-engineering">Villa Plus Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>