← all articles

Managed retrieval service or rolling your own

Upload files, get answers

The pitch for a managed retrieval service is short. You upload your documents. The service parses them, splits them, embeds them, indexes them, and exposes an endpoint or a tool your model can call. You ask a question and get an answer grounded in your files, often with citations. No vector database to choose, no chunking strategy to argue about, no embedding model to pick.

These offerings come in a few forms. Model providers have file search or retrieval tools attached to their assistant APIs. Cloud platforms sell managed knowledge base products that sit on top of their storage. Specialist vendors sell retrieval as a standalone API. The details differ, and they change often enough that I won’t try to describe any one of them precisely. The shape is the same: someone else runs the pipeline.

The alternative is assembling it yourself. You pick a parser, write chunking logic, choose an embedding model, stand up an index, write the query path, and decide how retrieved text gets into the prompt. That’s more work. It’s also a pipeline where you can see every step.

We’ve covered vector databases and chunking strategies separately, and this piece doesn’t repeat them. The question here sits one level up: whether you want to own those decisions at all. The honest answer depends less on the technology than on what happens when an answer is wrong and someone asks you why.

What you’re actually buying

It helps to name the pieces a managed service takes off your hands, because each one is a decision you’d otherwise make and a component you’d otherwise run.

Parsing is the first. Turning PDFs, slide decks, spreadsheets and web pages into clean text is fiddly work, and a managed service does it for you with whatever parser it has chosen.

Chunking comes next. The service splits documents into pieces using its own rules, sometimes with a few settings exposed, such as chunk size or overlap.

Embedding follows. The service picks the embedding model, runs it, and re-runs it when documents change.

Then indexing and storage. The service keeps the vectors and usually some keyword index too, handles updates and deletions, and scales it.

Querying is the last piece. It takes the user’s question, maybe rewrites it, retrieves candidates, maybe reranks them, and hands the top results to the model.

Operations cover all of it. Uptime, backups, scaling and upgrades become someone else’s pager.

That’s a lot of work removed. For a team without anyone who wants to own a retrieval pipeline, that’s the whole value. It’s worth being clear-eyed that each of those pieces is also a place where quality is decided, and in a managed service, it’s decided by someone who has never seen your documents.

What you give up: visibility

The first thing you give up is the ability to see inside.

When a self-built pipeline returns a bad answer, you can trace it. You can look at the query that was embedded, the chunks that came back, their scores, and the exact prompt the model received. Nine times out of ten the problem is visible at one of those steps: the right chunk wasn’t retrieved, or it was retrieved but ranked too low, or it was split in a way that cut the answer in half.

A managed service may expose some of this. Many return the retrieved passages with the answer, and some return scores. Others return only the final answer and a list of source files. How much you can see varies a lot between offerings, and it’s the single most important thing to check before you commit.

The difference matters because debugging retrieval is mostly about looking. If you can’t see which chunks came back, you can’t tell whether a wrong answer is a retrieval failure or a generation failure. Those two have completely different fixes. One means changing how documents are split or searched. The other means changing the prompt or the model.

Without visibility, your only lever is rewording the question and hoping, which is a poor place to be when a customer is asking why the assistant quoted last year’s policy.

What you give up: control over chunking

The second loss is control over how documents are split.

Chunking decisions have a large effect on retrieval quality, and the right choice depends on your documents. Contracts with numbered clauses want different treatment from support articles with short sections, and both want different treatment from spreadsheets. Tables and code blocks need their own rules. Headings carry context that a chunk loses when it’s cut away from them.

Managed services make these decisions with general-purpose defaults. Some expose chunk size and overlap as settings. Few let you plug in your own splitting logic or attach custom metadata to each chunk at split time. If your documents are ordinary prose, the defaults may be fine. If they’re structured in ways a generic splitter doesn’t understand, you’ll see it in the answers.

A common workaround is pre-processing: split or restructure the documents yourself before uploading, so the service’s chunker has less to get wrong. That works, and it’s worth knowing about. It also means you’re now doing half the pipeline yourself, while still not controlling the other half. At some point that hybrid stops being simpler than owning the whole thing.

The practical test is to take your five ugliest documents, the ones with tables, nested lists or odd formatting, upload them, and ask questions whose answers sit in the awkward parts.

What you give up: model and ranking choices

The third loss is control over the models in the retrieval path.

A managed service chooses the embedding model. That matters because embedding models differ in how well they handle your domain vocabulary, your languages and your document lengths. It also matters when the service upgrades its embedding model, because every document may be re-embedded and retrieval behaviour can shift under you without any change on your side.

Reranking is a similar story. Some services rerank retrieved candidates with a second model before passing them on, some don’t, and some let you toggle it. You rarely get to choose which reranker, or tune how many candidates it sees.

Query handling is another hidden layer. Some services rewrite the user’s question before searching, expand it with synonyms, or split it into sub-queries. That can help. It can also mean the search that ran isn’t the one you think ran.

None of this is a flaw in managed services. Choosing sensible defaults is the product. The cost is that when the defaults don’t suit you, you have limited room to move, and when they change, you may find out from your users.

If you do go managed, ask the vendor, or read their documentation, about how they handle embedding model changes and whether they give notice.

What you get back: time

Against all that, the main thing you get back is time, and it’s easy to underestimate how much.

A self-built pipeline keeps costing after the first version: parser upgrades when a new file format turns up, re-chunking when you learn your first strategy was wrong, re-embedding when you switch models, index maintenance, monitoring, and the on-call rota for the whole thing. For a small team, that ongoing work can easily cost more engineering attention than the feature it supports.

A managed service collapses most of that into a bill and a set of API calls. You can have something working in a day. You can hand it to a product team without also handing them an infrastructure project.

That speed has real value early on. If you don’t yet know whether users even want a document assistant, spending weeks building a pipeline is a poor bet. A managed service lets you find out cheaply. If it works, you can decide later whether to build. If it doesn’t, you’ve lost a few days instead of a quarter.

The mistake is treating that early decision as permanent. Starting managed and moving to self-built once you understand your documents and your failure modes is a perfectly good path. So is staying managed forever, if the answers are good enough.

What you get back: fewer moving parts to break

The second thing you get back is a smaller surface to maintain.

A self-built retrieval pipeline has several components that can fail independently. The parser can choke on a file. The embedding API can rate-limit or time out. The vector store can fall behind on writes. The sync job that watches for document changes can silently stop. Each of those needs monitoring and each can page someone.

A managed service turns that into one dependency. When it breaks, it’s one status page to check and one vendor to contact. You lose control over the fix, but you also lose the responsibility for it.

Whether that’s a good trade depends on your team. If you already run databases, queues and background workers comfortably, a few more components aren’t a big deal. If your team is mostly product engineers who’d rather not think about infrastructure, a single managed dependency is much easier to live with.

There’s a subtler benefit too. A managed service has presumably been hardened against a wider range of documents than your first pipeline will see. Odd PDF encodings, huge spreadsheets, files with embedded images. You get the benefit of their bug fixes without having hit those bugs yourself. That’s hard to quantify, and it’s real.

The middle ground most people end up in

The choice is rarely all or nothing. There’s a spectrum between uploading files to a black box and writing every component yourself, and a lot of working systems sit somewhere in the middle.

One common arrangement is a managed vector database with your own pipeline around it. You write the parsing and chunking, call an embedding API, and store the results in a hosted vector store. You keep control of the decisions that most affect quality, how documents are split and what metadata travels with each chunk, while handing off the part that’s most tedious to operate.

Another is the reverse: your own storage, usually Postgres with a vector extension because you already run Postgres, with a managed parsing service in front of it. Document parsing is one of the most annoying pieces to get right across many file types, and it’s a reasonable thing to buy even if you build the rest.

A third is using a managed retrieval service for the bulk of your content while routing a few special document types, such as spreadsheets or code, through a path you control. Queries can hit both and merge the results.

Each hybrid has its own seams, and seams are where bugs live. Two systems means two sets of document IDs to keep in sync, two places a deletion must happen, and two latency budgets. The upside is that you spend engineering effort only where it changes the answers.

If you’re unsure, starting with a hybrid that keeps chunking in your hands is a sensible default. Chunking is the decision you’re most likely to want to change, and it’s the one managed services give you least say over.

Pricing shapes to compare

Pricing for managed retrieval varies widely, and I’m not going to quote figures that would be out of date by the time you read this. The shapes are worth understanding, because they determine where costs grow.

Storage-based pricing charges for the volume of documents or vectors kept in the service, often per gigabyte per day or per month. This grows with your corpus, whether or not anyone queries it.

Query-based pricing charges per retrieval call, sometimes per tool call when the retrieval is attached to a model API. This grows with usage.

Token-based costs usually sit on top. Retrieved passages get inserted into the model’s prompt, and you pay input tokens for them on every query. A service that retrieves generously can add a lot of input to each call.

Ingestion costs sometimes apply, charging for parsing or embedding when documents are added or updated.

For a self-built pipeline, the equivalent costs are embedding API calls or your own compute for embedding, the vector store’s hosting, and the same prompt tokens. Plus engineering time, which rarely makes it into the comparison but usually dominates.

The comparison that matters is total monthly cost at your expected corpus size and query volume, including the prompt tokens. Build a small spreadsheet with both shapes and your own numbers.

Lock-in and getting your data back out

Before committing to a managed service, find out what leaving would involve.

Your source documents are yours, and you presumably keep copies. That part is easy. What’s harder to take with you is everything the service built from them: the chunks, the embeddings, any metadata it extracted, and the tuning you did through its settings. Most services don’t export embeddings in a form you can load elsewhere, and even if they did, you’d need the same embedding model to query them.

So leaving usually means rebuilding the index from scratch in the new system. That’s not terrible for a small corpus. For a large one, the re-embedding cost and time are real, and you’ll need to validate that the new system retrieves as well as the old one did.

There’s also integration lock-in. If your application calls a vendor-specific retrieval tool, the calling code, the response format and any citation handling are tied to that vendor. A thin wrapper of your own around the retrieval call, so the rest of your code sees a simple function that takes a question and returns passages, makes switching much less painful.

The best time to plan an exit is before you need one. Keep the source documents organised, keep your own list of test questions with known answers, and keep the retrieval call behind your own interface.

Keeping answers fresh after documents change

Wrong answers from a retrieval system are often stale answers, and freshness is where the two approaches behave very differently.

In a self-built pipeline, you write the sync. Something watches your document source for changes, re-parses changed files, re-chunks them, re-embeds the new chunks, then removes the old ones from the index. It’s work, and it’s often the part that breaks quietly. A sync job that stops running doesn’t throw an error anyone sees. The assistant just keeps answering from last month’s documents.

In a managed service, you usually push updates through its API or connect it to a storage bucket or a document platform it syncs from. The service handles re-processing. What you need to find out is how long that takes, whether there’s a window where the old and new versions both exist in the index, and what happens to a document you delete. Does it disappear from retrieval immediately, within minutes, or on the next scheduled sync?

The deletion question deserves particular care. If a document was withdrawn for a reason, such as an outdated policy, a leaked draft or a customer asking for their data to be removed, you need confidence it has stopped being retrieved. Test it directly: upload a document with a distinctive phrase, confirm it’s retrievable, delete it, and check how long before it stops coming back.

Whichever path you pick, add a freshness check to your evaluation set. Include questions whose answers changed recently and confirm the system gives the new answer.

When the vendor changes something

A managed service is a moving target, and that’s one of the least discussed costs of using one.

Vendors improve their products. They switch embedding models, change default chunk sizes, add reranking, adjust how many passages get returned, or rework how queries are rewritten. Most of these changes are meant to improve average quality. Your documents and your questions aren’t the average, so any given change might help you, do nothing, or make things worse.

Some vendors version their retrieval behaviour or announce changes in advance. Others ship improvements continuously. Check the changelog and the documentation for how changes are communicated, and whether you can pin a version.

The defence is the same evaluation set you built for the initial decision. Run it on a schedule, weekly if the feature matters, and compare the results with the last run. If retrieval accuracy on your own questions drops, you’ll see it before your users complain, and you’ll have concrete examples to send the vendor.

A self-built pipeline changes only when you change it, which is both its virtue and its burden. Nothing shifts under you, but nothing improves unless you do the work either. Many teams find the managed service’s upgrades are a net benefit over time. The point is to know, rather than assume.

Data handling and where documents live

Retrieval services store your documents, which puts them squarely in data-governance territory.

With a self-built pipeline, you choose where documents, chunks and vectors live. They can stay in your own cloud account, in your own region, under your own access controls and retention policies. When a document must be deleted, you delete it from your store and you know it’s gone.

With a managed service, the documents live on the vendor’s infrastructure, under their retention and deletion rules. Before uploading anything sensitive, read the service’s documentation and terms on a few specific points: where data is stored and whether you can pick a region, whether uploaded files are used for anything beyond serving your queries, how long deleted files persist in backups, and who at the vendor can access them.

I’m not going to characterise any particular vendor’s answers, because they differ and they change. The point is that these questions have answers, and you should have them in writing before the first sensitive file goes in.

Access control inside the service matters too. If different users should see different documents, check whether the service can filter retrieval by user or group. Some can, some can’t, and bolting permission checks on afterwards is much harder than choosing a service that supports them.

Testing either option on your own documents

Whichever way you lean, the decision should rest on a test with your own documents, not on anyone’s benchmark.

Start by building a small evaluation set. Collect twenty to fifty real questions users have asked or will ask, and for each one, note which document and which passage contain the answer. This takes a few hours and is the most valuable thing you’ll do in the whole project.

Load the same documents into the managed service and into a simple self-built pipeline. The self-built one doesn’t need to be clever: a standard parser, a basic recursive splitter, a mainstream embedding model and a vector store or even Postgres with a vector extension.

Run every question through both. For each, record whether the right passage was retrieved in the top results, and whether the final answer was correct. Where you can see retrieved passages, record those too.

Look at the failures by type. If both fail on the same questions, the problem is probably your documents, and neither option will fix it alone. If the managed service fails on questions involving tables or specific formatting, that’s a chunking limitation. If the self-built one fails on paraphrased questions, that may point at the embedding model or missing query rewriting.

That test gives you a decision based on your own material. It also gives you a regression suite you can re-run whenever anything changes.

Latency and where the time goes

Response time is another place the two diverge, and it’s often forgotten until a product manager asks why answers take so long.

A retrieval step adds time before generation starts. In a self-built pipeline, you can see and control each part: embedding the query, searching the index, optionally reranking, then assembling the prompt. If your index sits close to your application, those steps can be quick, and you can tune them, for example by retrieving fewer candidates or skipping the reranker for simple questions.

With a managed service, retrieval happens on the vendor’s side, and you see it as one call. If the retrieval is attached to a model API as a tool, the model may decide to search, wait for results, and then generate, which adds a round trip. Some agents search several times per question. Each search adds latency and, often, a per-call fee.

You also have less room to optimise. You can’t move the index closer to your application or cache query embeddings yourself. What you can do is measure end-to-end latency on your own questions during the evaluation test, and check it against what your interface can tolerate.

For internal tools where a few extra seconds don’t matter, this rarely decides anything. For customer-facing chat where people are waiting, it can.

A worked decision

To make this concrete, here’s how the reasoning plays out for a common case, described in general terms rather than with measured results.

A small company wants an internal assistant that answers staff questions from its policy documents and handbooks. There are a few hundred documents, mostly prose with some tables. Nobody on the team has built a retrieval pipeline before. The main risk is the assistant quoting an outdated policy.

The corpus is small and mostly ordinary prose, which suits a managed service’s defaults. The team has no appetite for running infrastructure. Time to first version matters, because they want to know whether staff will use it. That all points to managed.

The outdated-policy risk points the other way, because it’s a freshness and visibility problem. They’ll need to know which document an answer came from and when it was last updated. So the selection criterion becomes: pick a managed service that returns the retrieved passages and their source documents, and that handles document updates and deletions promptly.

They run the evaluation-set test on their twenty most common questions, including a few where the policy changed recently. If the service passes, they ship it with a thin wrapper around the retrieval call. If it fails on the changed policies, they look at how the service handles updates before going further.

When building your own is clearly right

Some situations tip firmly toward owning the pipeline.

Your documents are unusual in structure, such as legal contracts where clause numbering matters, technical manuals full of tables, or code, and generic chunking visibly fails on them.

You need to explain every answer. Regulated settings, or products where a wrong answer has real consequences, need full traces of what was retrieved and why, and a managed service may not expose enough.

You need fine-grained access control, where each user should only retrieve from documents they’re allowed to see, and the service can’t filter that way.

Your corpus is very large or changes very fast, so storage or re-indexing costs on a managed service get uncomfortable, and you have the engineering capacity to run it yourself more cheaply.

Data must stay in your own infrastructure for legal or contractual reasons.

Retrieval quality is your product’s core differentiator. If the whole value of what you sell is better answers from documents, handing the retrieval layer to a vendor means handing over your advantage.

In any of those cases, the extra work of building is the cost of doing the job properly.

When managed is clearly right

The opposite cases are just as clear.

You’re testing whether users want the feature at all. Speed to a working version matters far more than perfect retrieval.

Your documents are mostly ordinary prose: help articles, handbooks, wikis, meeting notes. Generic defaults tend to handle these acceptably.

Your team doesn’t want to run infrastructure, and the feature is a supporting part of the product rather than its heart.

The corpus is small to medium and changes at a manageable pace.

You don’t have strict requirements about where data lives, or the service’s terms and regions meet the ones you do have.

In those cases, building your own is often engineering for its own sake. The retrieval quality you’d gain may be small, and the maintenance you’d take on is certain.

My position, for what it’s worth: most teams starting a document assistant should begin with a managed service, keep the retrieval call behind their own small interface, and build an evaluation set from day one. Those two habits make it cheap to switch later if the service turns out to be the bottleneck. Teams that start by building their own pipeline often spend their first month on infrastructure and only then discover what their users actually ask.

What to do next

If you’re deciding this week, here’s a sequence that works.

Write down the five questions you most need the system to answer correctly, and the document each answer lives in. Then expand that to twenty or more.

Shortlist one managed service that returns retrieved passages with its answers, and read its documentation on chunking settings and embedding model changes, then on retention and access control.

Load your ugliest documents first, not your cleanest. Run the questions. Look at what was retrieved, not just at the answers.

If the managed service handles your real documents acceptably, ship with it behind a thin wrapper, keep the evaluation set, and re-run it monthly. If it doesn’t, you’ll know exactly which failures you’re building your own pipeline to fix, which is a much better starting point than a blank page.

We track retrieval services and the pricing shapes behind them, alongside the vector stores and embedding models you’d use to build your own, at AI Tool Gazette.

for builders
Running agents or scrapers at scale?

AI pipelines that crawl, research, or automate the web hit rate limits and geo-blocks fast. Singapore Mobile Proxy runs real 4G/5G mobile IPs that carriers still trust.

see plans →
read on
More from the Gazette

Tool reviews, model and pricing news, and build guides for people shipping real things with AI.

browse all articles →