Skip to content

AI integration

AI integration for software that already has users.

Most AI work fails at the boundary between a demo and a system with real traffic, real data and real consequences. That boundary is the whole job, and it is the part we do.

Start a projectSee pricing

Shark Labs is an AI integration studio that adds large language model features — retrieval, agents, extraction, classification and generation — to software that is already in production. An integration project covers model selection, the retrieval or tool layer the model needs, an evaluation suite that proves it works before release, guardrails against prompt injection and bad output, cost and latency budgets, and the monitoring to keep all of it honest afterwards. Projects start at $3,000 and most ship in three to six weeks.

3–6 weeks
Typical time to a shipped AI feature
From $3,000
Scoped feature into an existing product
Evals first
No release without a passing eval suite

The problem is almost never the model

Ask a language model to summarise a document and it works on the first try. That is why proofs of concept are easy and why so many of them never ship. The demo runs once, on data somebody chose, with a person watching. Production runs a thousand times a day on data nobody vetted, with nobody watching, and it has to be right, cheap and fast at the same time.

Everything between those two states is engineering, not prompting. What retrieval does the model need, and how do you know it retrieved the right thing. What happens when it is confidently wrong. What it costs per user per month at ten times the current volume. What you do when the provider deprecates the model in nine months. Those are the questions that decide whether an AI feature ships, and they are the ones a demo never has to answer.

What we build

Five shapes cover most of the work. Real projects mix them, and the scoping call is mostly about working out which mix you need.

Retrieval over your own content

Answering questions from your documentation, your ticket history, your product catalogue or your policies, with citations back to the source. This is the most common request and the one with the most ways to go quietly wrong. It is covered in full further down, under retrieval-augmented generation.

Agents that actually touch your systems

A model given tools — your API, your database, a payment provider, a ticketing system — and the authority to use them in sequence. The interesting engineering is not the loop, it is the blast radius: what the agent is allowed to do without a human, what gets logged, what is reversible, and what happens on the third retry.

Extraction and classification

Turning unstructured input — invoices, emails, CVs, support tickets, contracts — into typed records your existing code can use. Usually the highest return on effort of anything here, because it replaces manual data entry with something measurable, and because a schema gives you a natural way to check the output is right.

Generation inside the product

Drafting, rewriting, summarising and translating, embedded where the user already works rather than in a chat window bolted onto the corner of the screen. Streaming, cancellation and a sane empty state matter more here than model choice.

Evaluation and guardrails for AI you already shipped

Sometimes the feature exists and nobody can tell whether it is getting better or worse. We build the eval suite, the regression harness and the monitoring after the fact, which is less satisfying than building it first but a great deal better than continuing to guess.

Retrieval-augmented generation, in detail

Retrieval is the most requested AI feature and the one that most often ships broken, so it gets its own treatment here rather than a page of its own.

Retrieval-augmented generation

A pattern where a language model answers using material fetched from your own data at query time, rather than from what it memorised during training. It makes answers current and citable without retraining anything — and it moves the accuracy problem from the model to the search that feeds it.

Embedding a folder of PDFs, storing the vectors and asking a model a question over the top three matches is a genuinely small amount of code. It will work on the first question you try, and keep working for about a week — until somebody asks a question whose answer lives in a table on page 40, or spans two documents, or exists in three versions where only the newest is correct. At that point the system is not slightly wrong; it is confidently, fluently wrong, because the generation step did its job perfectly on whatever it was handed. Every hard problem in retrieval is a search problem wearing a generation costume.

Chunking is a decision, not a default

Splitting text every 500 characters with a 50-character overlap is the default in every tutorial. It is a reasonable starting point for prose and actively wrong for most real corpora: a chunk boundary through the middle of a table destroys the table, and a legal clause without its defined terms is worse than no chunk at all.

ContentApproach
Structured documentationSplit on headings, keep the heading path in the chunk. A section retrieved without knowing which product it documents is a wrong answer waiting to happen.
Tables and spreadsheetsNever split mid-table. Serialise each row with its column headers so a row retrieved alone is still readable.
Contracts and policiesChunk by clause, and attach the document's definitions section to every chunk. Expensive in tokens, correct in answers.
Support tickets and chatChunk by conversation, not by message. The resolution is meaningless without the problem.
CodeChunk by function or class with the file path and imports attached. A function body without its signature retrieves poorly.
What we actually do, by content type. Most real corpora need two or three of these at once.

Vector search alone is not enough

Embeddings are good at meaning and bad at exactness. Ask for error code E-4412, a part number, a surname or a version string, and pure vector search will cheerfully return five semantically similar passages that mention none of them. Keyword search finds those instantly and is hopeless at paraphrase, so we run both.

  1. 01Retrieve twice. BM25 keyword search and vector search, run in parallel, each returning its own candidates.
  2. 02Fuse the results, usually with reciprocal rank fusion — cheap, robust, and it needs no tuning per corpus.
  3. 03Re-rank the fused set with a cross-encoder, which reads the query and each candidate together rather than comparing two independent embeddings. This is usually the single biggest accuracy gain in the whole pipeline.
  4. 04Then generate, over a small number of high-confidence passages rather than a large number of mediocre ones.

Permissions are stored as metadata on each chunk, mirrored from the source system rather than re-implemented, and the index is re-synced when access changes — so revoking someone's access to a folder actually revokes it in search. Retrieval is scored separately from generation, on recall@k against a set of real questions, because if the right passage was never found then no amount of prompt rewriting recovers it. How to add RAG to an existing SaaS product is the practical walkthrough, and RAG versus fine-tuning covers when retrieval is the wrong tool entirely.

How we pick a model

Model choice is a cost and latency decision far more often than a capability one. The frontier models are all good enough for most product work; what separates them in practice is price per token, time to first token, context window, and whether the provider will still serve that exact version in a year.

ConstraintWhat it usually means
High volume, simple taskA small, cheap model with a tight prompt and a strong eval suite. Classification and extraction rarely need a frontier model.
Complex reasoning, low volumeA frontier model, cached aggressively. The per-call cost stops mattering when there are two hundred calls a day.
Strict latency budgetStreaming plus a smaller model, or a fast first pass that escalates only when it is unsure.
Data cannot leave your infrastructureAn open-weight model you host. Slower and more expensive per token than an API, and sometimes the only option — we will say so plainly rather than talk you out of a real constraint.
Provider riskAn abstraction thin enough to swap models in a day, and an eval suite that tells you whether the swap made things worse. Not a heavyweight framework.
How we actually decide. The right answer for most products is more than one model, routed by task.

We are not tied to a provider. Most of what we ship runs on Anthropic's Claude or OpenAI's models, some of it on open-weight models where the data can't leave, and plenty of it on a mix — routing the cheap high-volume calls to a small model and reserving the expensive one for the cases that need it.

Evals are the deliverable, not the demo

Evaluation suite

A repeatable, versioned test set that scores an AI feature's output against known-good answers, run on every prompt or model change. It is what turns "it seems better" into a number, and it is the only reason you can safely change anything after launch.

Nobody asks for evals. They ask for the feature, and then six weeks later somebody changes a prompt, something else gets worse, and there is no way to tell. We build the eval suite as part of the feature, not as a follow-up, because the alternative is a system nobody is allowed to touch.

  • A graded test set built from your real data, not synthetic examples — usually 50 to 200 cases, which is enough to catch regressions and small enough to stay maintained.
  • Task-appropriate scoring. Exact match where there is one right answer, retrieval metrics for RAG, and model-graded rubrics where the output is prose. We will tell you which of these is actually trustworthy for your case.
  • A regression gate in CI, so a prompt change that drops accuracy four points fails before it reaches users rather than after.
  • Production sampling, because the test set ages. A slice of real traffic gets scored continuously and feeds back into the set.

This is covered in more depth in the evals and guardrails we build before shipping an LLM feature.

Guardrails, and what they actually stop

Guardrails are usually discussed as a safety topic. In product work they are mostly a correctness and cost topic, and the honest framing is that they reduce risk rather than eliminate it.

  • Prompt injection. Any system where the model reads untrusted text — a web page, a user's uploaded file, an inbound email — can have its instructions overwritten by that text. The mitigation is architectural: least privilege on tools, no irreversible action without confirmation, and never trusting model output as a command.
  • Output validation. Structured output parsed against a schema, and a defined path for what happens when it doesn't parse. A retry, a fallback, or an honest error — decided deliberately, not left to whatever the code happens to do.
  • Cost and rate limits per user and per tenant, so one enthusiastic customer or one retry loop cannot produce a five-figure invoice.
  • PII handling. What gets sent to a third-party provider, what gets redacted first, what gets logged, and how long any of it is retained.
  • Graceful degradation. When the provider is down or slow, the feature degrades to something useful instead of the page hanging.

What it costs to run, not just to build

The build price is the part everyone asks about and the smaller number over three years. An AI feature has a running cost that scales with usage, and it is worth modelling before you launch rather than discovering it on an invoice.

We build a cost model during scoping: expected calls per user, tokens per call, cache hit rate, and what all of that becomes at your current volume and at ten times it. It is an estimate, and we say so, but an estimate with the working shown beats a surprise. What it actually costs to build an AI feature walks through the same arithmetic.

40–80%
Typical token cost cut by prompt caching
10–30×
Price gap between small and frontier models
3 years
Horizon we model running costs over

And then somebody has to own it

An AI feature is not a static thing you install. Models get deprecated, providers change pricing, your data drifts, and the eval suite that passed in March starts failing in September because the world moved. Most studios hand over a repository and disappear at exactly this point.

We stay. That is the actual differentiator, and it is why our retainers are a named service with published prices rather than something we improvise after the invoice clears.

What you get

Everything below is in the price.

A shipped feature

Running in your production environment, in your repository, in your stack. Not a prototype in ours.

An eval suite

Versioned, wired into CI, built from your real data. The thing that lets you change a prompt without holding your breath.

Guardrails and limits

Output validation, per-tenant rate and cost limits, injection-resistant tool design, and a defined failure path.

A cost model

Per call, per user, per month, at today's volume and at ten times it — with the assumptions written down so you can argue with them.

Monitoring

Latency, error rate, token spend and eval scores on a dashboard, with alerts that fire before your users tell you.

Documentation your team can use

How it works, how to change it, what to do when it breaks, and what we would build next. Written for the engineer who inherits it.

How it runs

From first call to shipped.

From $3,000 for a scoped feature

A single AI feature into an existing product runs $3,000–8,000 and ships in three to six weeks. A full AI-first product or MVP runs $8,000–25,000 over eight to sixteen weeks. Discovery is $600–1,200 and comes off the project price.

Full pricing breakdown
  1. 01

    Scoping call — free, 45 minutes

    What you have, what you want, what the data looks like. We will tell you on this call if we think the thing you are asking for is the wrong thing to build, which happens often enough to be worth saying up front.

  2. 02

    Paid discovery — 3 to 5 days

    We go into the code and the data. It ends in a written plan: what gets built, the eval criteria, the cost model, a fixed price and a date. Roughly $600–1,200, and it comes off the project price if you go ahead.

  3. 03

    Build — 3 to 6 weeks

    In slices, on a branch you can see, with something working in front of you every week. The eval suite is written alongside the feature, not after it.

  4. 04

    Ship and hand over

    Behind a flag, to a slice of traffic first. Then documentation, a walkthrough with your engineers, and everything running on your infrastructure and your accounts.

  5. 05

    Keep it running — optional

    A retainer for monitoring, model migrations, eval maintenance and the next feature. Most projects turn into one; none are obliged to.

Stack

The specific things we build with.

Models

  • Anthropic Claude
  • OpenAI GPT
  • Google Gemini
  • Open-weight models (Llama, Qwen, Mistral) where data can't leave

Retrieval

  • pgvector
  • Qdrant
  • Pinecone
  • Hybrid BM25 + vector search
  • Cross-encoder re-ranking

Application

  • TypeScript
  • Next.js
  • Node and Bun
  • Python
  • Postgres
  • Supabase

Operations

  • Structured tracing of every model call
  • Eval harnesses in CI
  • Token and cost dashboards
  • Vercel, Cloudflare, AWS

FAQ

Questions people actually ask

What does an AI integration company actually do?

It takes a language model — which on its own only turns text into text — and builds everything around it that makes it a product feature: the retrieval layer that gives it your data, the tools that let it act, the evaluation suite that proves it works, the guardrails that contain it when it doesn't, the cost controls, and the monitoring. Shark Labs does that work inside software you already run, rather than building a separate AI product beside it.

How long does AI integration take?

A single well-scoped feature into an existing product takes three to six weeks from the end of discovery. A full AI-first product takes eight to sixteen. Anyone quoting you three days has not looked at your data, and anyone quoting nine months is selling you a transformation programme.

Can you work with legacy systems?

Usually, yes — an AI feature needs an interface to your data, not a modern architecture. A twelve-year-old Postgres database with a REST API in front of it is a perfectly good starting point. Where it genuinely gets expensive is when there is no API at all and no safe way to read the data, and we will tell you that during discovery rather than after.

What's the difference between AI integration and AI development?

AI development usually means building or fine-tuning models. AI integration means using existing models to build product features. Almost every company asking for the first one needs the second: training your own model is rarely the constraint, and the frontier models are already better at general tasks than anything you would train on your data volume.

How do you stop the model making things up?

You reduce it, you don't eliminate it, and anyone promising otherwise is overselling. The three things that move the number most are grounding the model in retrieved source material with citations, validating output against a schema so malformed answers fail loudly instead of quietly, and running an eval suite that measures the rate so you know whether a change made it better or worse.

Is our data used to train anyone's model?

Not on the enterprise API tiers we build on — Anthropic and OpenAI both contractually exclude API traffic from training by default. Where that is not good enough, because of a regulator or a customer contract, we build on open-weight models running on your own infrastructure. That costs more per token and we will show you the difference before you decide.

Why hire a studio instead of building it in-house?

Often you shouldn't. If you have engineers with production LLM experience and the roadmap space, in-house is cheaper and better. The case for a studio is speed on the first one — you get the patterns without paying for the learning curve, and your team inherits a working system to build on. The full cost comparison is here, including the cases where hiring wins.

What happens if the model provider deprecates the version we use?

Everything we build keeps the provider behind a thin abstraction and keeps an eval suite that can score a new model against the old one. Migration becomes a day of work plus a test run, rather than an archaeology project. On a retainer we handle the migration; off one, the documentation tells your team how.

How much does a RAG system cost to build?

A production retrieval system over one corpus — ingestion, hybrid retrieval, re-ranking, citations and an eval suite — runs $4,000–10,000 with Shark Labs and ships in four to eight weeks. What pushes it up is the number of separate sources, strict per-user permissions, and a requirement to run the model on your own infrastructure.

What are the disadvantages of RAG?

Three real ones. It adds latency, because you search before you generate. It adds a running cost per query on top of the model call. And it can only be as good as your content — retrieval over documentation that is out of date produces confident, well-cited, wrong answers, and the citations make them more persuasive rather than less. If your corpus is a mess, fixing the corpus is the higher-return project.

Is fine-tuning better than RAG?

For factual questions over changing content, no — fine-tuning bakes knowledge in at training time, so anything that changes weekly is stale immediately, and the model can't cite a source. Fine-tuning wins on format, tone and specialised task behaviour. They also combine: retrieval for the facts, fine-tuning for how the answer is shaped. The full comparison is here.

Does our data leave our infrastructure?

That's your call, and it's a cost decision. Using hosted embedding and language model APIs is cheaper and faster; running open-weight models on your own infrastructure keeps everything in-house at a higher cost per query and more operational work. We build either, and we'll show you the difference in real numbers before you choose.

Keep reading

Related work and reading

Service

Web development

Fast, accessible, search-visible sites and web apps on Next.js — built so your team can edit them without calling us.

Service

Retainers

Monthly engineering after launch: monitoring, patching, incident response and new features, at a price published on the page.

Service

App development

Web and mobile products from first screen to store listing, and the backend underneath — scoped so version one ships in months, not quarters.

Article

Why your AI proof of concept never shipped

The demo worked. Four months later it's still a demo. Here are the six things that actually block the gap, in the order they usually bite.

Article

In-house AI team vs agency: the arithmetic, including when we lose

Real salary numbers, real agency numbers, and the crossover point where hiring wins. Written by an agency, which should tell you how the last section goes.

Article

Five patterns for putting an LLM into software that already exists

A decision framework rather than a tutorial: which of five integration shapes fits your problem, what each costs, and the failure modes that show up in month three.

Next step

Tell us what stalled.

Most conversations start with a proof of concept that impressed everyone and then stopped moving. Send us what you have and we'll tell you what it would take to ship it — on a call, before any money changes hands.

Start a projectSee pricing