Skip to content
JOURNAL / SOFTWARE ENGINEERING

Python or .NET for an AI application? Ask a better question

How to choose a stack around deployment, team skills, data and integration needs instead of treating languages as a contest.

Two distinct software systems joining at a secure API boundary
Original editorial illustration · 2026

Python dominates many AI tutorials; C# and .NET are deeply useful in organizations with established services, identity systems and operational practices. The choice looks like a language question, but a production AI feature has more parts: an interface, application API, model integration, document pipeline, storage, permissions, monitoring and a team that will support it next year.

THE FIELD GUIDE / 01

The stack is a product decision

Imagine an internal contract assistant for a company whose access control and customer data already live in .NET services. Rewriting the whole application in Python for a model call would create new maintenance and security work. Equally, a research-heavy workflow that depends on a particular Python library may deserve a small Python service. Both can be true in the same system.

  • Identify the team that owns the feature after launch.
  • List the systems and permissions it must integrate with.
  • Check which runtime actually has the required libraries and hosting support.
THE TAKEAWAYPick the architecture for the organization, then place each language where it helps.
THE FIELD GUIDE / 02

Find the boundaries first

Draw a boundary between the user-facing API, long-running or asynchronous work, and the data sources. A .NET API can authenticate users, enforce business rules and call a model provider directly. If a specialized Python pipeline is needed for document processing or evaluation, isolate it behind a narrow interface or a queue rather than making every page request wait for it.

This separation keeps responsibilities visible. The application API owns identity and authorization; the processing worker handles jobs; a storage service records durable results. Give each boundary explicit inputs, timeouts and retry behavior. Both Python and .NET offer tools for web APIs and asynchronous programming; operational fit decides which arrangement is easiest to run well.

An editorial diagram illustrating find the boundaries first
A visual model of the decisions described in this section.
THE FIELD GUIDE / 03

A small decision exercise

Take one real request, such as “summarize the latest contract for this account.” Trace where the account identity is checked, where the document is loaded, which content is permitted, what text goes to the model and where the answer is stored. Now ask which part is difficult for your current stack. If almost everything already belongs to a stable .NET application, keep the model call there unless a proven need appears.

If ingestion involves specialized Python tooling, put that work in a separately monitored job. Share the minimal document reference and a scoped identity rather than duplicating user databases. If the feature is only a prototype, choose the path that produces a valid test quickly while leaving an upgrade path for permissions and monitoring.

  • Keep authentication and authorization on the server.
  • Define an explicit contract between services.
  • Measure deployment complexity as well as development speed.
THE TAKEAWAYThe best stack is the one the team can secure, operate and change.
THE FIELD GUIDE / 04

An architecture sketch in words

A browser sends a request to the application API. The API checks the account and records a job. A worker obtains the permitted document, produces a summary and records a result linked to that job. The browser polls or subscribes for completion. This design works whether the worker is written in Python or C#, and it keeps a slow model call away from a fragile page request.

If the workload is small, the extra worker may be unnecessary. The point is to understand the boundary before choosing tools. Start with a synchronous vertical slice when latency allows it; introduce the job boundary when measured workload and failure patterns justify it. The shape of the problem should pull the architecture into place.

  • Identity and authorization belong at the entry point.
  • The job carries only the minimal permitted references.
  • Results are durable and have clear ownership.
THE FIELD GUIDE / 05

Where the choice becomes visible

Users never ask which language handled their request. They notice whether the correct document was used, whether the result arrived on time and whether their information stayed within the right boundary. Those are architecture outcomes.

Choose one narrow vertical slice and ship it through the real environment before generalizing. You will learn more from the first dependable path than from a month of framework comparisons.

THE TAKEAWAYUse Python and .NET as tools, not identities.
✳End of field note 05