Every product team is being asked the same question right now: where does AI fit in what we build? The answer rarely comes from a model alone or from a beautiful interface alone. It comes from someone who can hold both in their head at once. That is the job of a web and AI engineer, and this article breaks down what the role actually involves, day to day.
The short definition
A web & AI engineer designs and builds web products where the interface and the AI work as one system. They know enough about models to use them well, and enough about the web to make the result fast, accessible and pleasant to use.
The key word is product. A research team asks whether a model can get smarter. A web & AI engineer asks whether a person can get their task done faster, with fewer mistakes, because the model is there.
Where the role sits
It helps to picture a line from pure web work to pure AI research. Most engineers live somewhere on it, and the interesting products are built in the middle. Drag the slider to see how the work changes along the way.
Interactive · drag the slider
Web & AI engineer← this article
Builds: Products where the interface and the model work as one
Keeps asking: What should be AI, what should be plain software, and how does it feel to use?
ReactLLM APIsRAGStreaming UI
The middle position is not “a bit of both, done half-way”. It is its own discipline: the skills overlap, but the questions you ask are different from either end.
The three layers of the work
1. The interface people touch
AI features fail in the interface more often than in the model. A great answer that arrives after eight silent seconds feels broken. So the interface work includes streaming text as it is generated, showing sources, letting people stop or retry, and designing for answers that are sometimes wrong.
2. The intelligence behind it
This is choosing the model, writing the system prompt, deciding what context it needs and how to fetch it. Often that means RAGRetrieval-Augmented Generation: fetch relevant documents first, then let the model answer using them, so it relies on your data instead of memory., built on embeddingsLists of numbers that capture the meaning of text. Similar meanings end up close together, which makes search by meaning possible. stored in a vector database, so the model answers from your own facts instead of guessing.
3. The delivery that keeps it working
Keys stay on the server. Requests are rate-limited. Output is validated before anyone sees it. Costs are tracked per feature. Pages stay fast: the same Core Web Vitals that matter for any site matter even more when a page also talks to a model.
Anatomy of one AI feature
Here is what happens when someone asks a question inside an AI-powered web app. Press play, or step through it yourself.
Interactive · one AI request, six steps
The interface captures intent, not just text: the current page, selected item and conversation history travel with the question.
API keys never touch the browser. The route authenticates, rate-limits and shapes the request before any model is called.
The question is embedded and matched against your own content in a vector database, so the model answers from your facts.
A clear system prompt, the retrieved context and the question go to the model. Structured output keeps the reply predictable.
Cheap plain-code checks run first: schema validation, banned content, citations that must exist. AI output is input, not truth.
The UI renders the answer as it arrives, shows its sources and keeps the user in control with stop, retry and edit.
In code, the server side of that journey is surprisingly small. The helpers below are placeholders for whichever model provider and vector database you use; the shape stays the same.
// Server route: the browser never sees a key.
export async function POST(req: Request) {
const { question } = await req.json()
if (!question || question.length > 2000) return new Response('Bad request', { status: 400 })
const context = await retrieve(question, { topK: 5 }) // vector search over your content
const stream = await callModel({
system: 'Answer only from the context. If it is not there, say so.',
context,
question,
})
return new Response(stream, { headers: { 'Content-Type': 'text/plain; charset=utf-8' } })
}On the client, the answer is read as a stream with the browser’s own Streams API, so words appear as soon as they are generated:
export async function ask(question: string, onToken: (t: string) => void) {
const res = await fetch('/api/ask', { method: 'POST', body: JSON.stringify({ question }) })
const reader = res.body!.getReader()
const decoder = new TextDecoder()
for (;;) {
const { done, value } = await reader.read()
if (done) break
onToken(decoder.decode(value, { stream: true }))
}
}What changes compared to classic web work
Four things catch most web developers off guard when they start shipping AI features:
- Non-determinism. The same input can give different output. You test with sets of examples and acceptance criteria, not single snapshot assertions.
- Latency. Model calls take seconds, not milliseconds. Streaming, optimistic UI and honest loading states become core design work.
- Cost per request. Every call costs money. Caching, shorter prompts and choosing smaller models for simple tasks are engineering decisions with a budget attached.
- HallucinationsWhen a model states something confidently that is not true or not supported by its sources.. Output is input, not truth. Validate structure, require sources, and design the interface so a wrong answer is easy to spot and correct.
When not to use AI
A big part of the role is saying no. If a rule can be written in ten lines of code, write the ten lines: it is faster, free, testable and never makes things up. AI earns its place with fuzzy input (free text, messy documents, open questions), not with logic you can already express.
A useful test: would a skilled person need judgement to do this? If yes, AI might help. If they would just follow a checklist, plain software wins.
The toolkit
The stack I use for this work, grouped by layer:
Interface
HTML5, CSS3, TypeScript, React, Vite, responsive design, UI engineering, Figma
Intelligence
Python, OpenAI API, Claude API, LangChain, RAG pipelines, vector databases, Hugging Face, prompt engineering
Delivery
API integration, performance optimization, SQL, Git and GitHub, edge and serverless deploys
You do not need all of it on day one. The interface layer and one model API take you surprisingly far; the rest arrives as real problems demand it.
A 90-day path into the role
- Days 1–30: ship one AI feature end to end. A small assistant on content you already have, with a server route, streaming and a decent loading state.
- Days 31–60: add retrieval and checks. Embed your content, add a vector search, require sources, validate the output shape, and log what people actually ask.
- Days 61–90: make it production-grade. Rate limits, caching, cost tracking, an evaluation set of real questions, and a write-up of what you learned.
That last step matters more than it sounds: a clear write-up of a real build is the best portfolio piece in this field. It shows judgement, not just syntax.
FAQ
Is a web & AI engineer the same as an AI engineer?
They overlap. “AI engineer” often leans towards pipelines and evaluation; a web & AI engineer owns the whole product surface too, from the interface to the deploy.
Do I need machine learning theory?
Not to start. Understanding embeddings, context windows and why models hallucinate is enough to build well. Deep theory matters if you move towards training models yourself.
Which language should I learn first?
TypeScript for the product and Python for the AI ecosystem. Most features can be built end to end in TypeScript; Python opens up the wider tooling.
Quick checkpoint
Checkpoint · 3 questions
Where should an AI provider API key live?
Anything shipped to the browser is public. Keys stay on the server, behind a route you control.
What does RAG add to a model call?
Retrieval fetches relevant documents first, so the model answers from your facts instead of memory.
A rule can be written in ten lines of code. Use AI?
Plain code is faster, free, testable and never hallucinates. AI earns its place with fuzzy input.