AI Feature Architectures: RAG, Agents and Fine-Tuning
When your engineers propose retrieval, an agent or fine-tuning, the useful question is not which technique is best but what the model is missing. Each design fills a different gap and carries its own effort, running cost and risk. A manager who can name the gap and ask seven plain questions can approve the simplest design that works.
After this chapter you can
- Match a plain prompt, retrieval, an agent loop or fine-tuning to the gap it fills.
- Compare the four designs on team effort, running cost and main risk.
- Ask seven design-review questions on freshness, evaluation, failure modes, permissions, latency, cost and ownership.
- Explain why evaluation, not the architecture choice, tends to set the schedule.
- Walk a team-sized proposal through the choice and decide what to hold back.
In April 2024, LinkedIn’s engineers described how they built a generative AI feature that answers members’ questions about jobs and people. The first month went well. The team reached about 80 percent of the experience it had in mind. Then it took four more months to attempt to get past 95 percent1. The design was not exotic: a router, a retrieval step and a generation step. The calendar was driven by something else, and it is a pattern worth carrying into every design review. The architecture choice was quick. Proving that it worked well enough was not.
That is the manager’s position when a proposal arrives. Your engineers say “we need RAG,” or “this should be an agent,” or “we should fine-tune a model.” You will not build it, but you will approve the plan, staff it and own the date. You do not need to argue about embeddings. You need enough literacy to ask what each design costs the team and what can go wrong, and to notice when a proposal is more complicated than the problem.
Start from the gap, not the technique
A model arrives with general knowledge and general skill. A feature fails because something specific is missing. Naming what is missing is the whole decision, because each design supplies a different thing.
If the model already knows enough and only needs clear instructions and a few examples, a plain prompt is the design. If it lacks knowledge, usually your own and usually changing, retrieval supplies it at question time. If the task needs several steps and the path depends on what turns up along the way, an agent loop lets the model choose the next step. If the model has the knowledge but cannot hold a format, a tone or a behavior, or a smaller model has to do the job, fine-tuning adjusts the model itself.
Level 1 introduced two of these, in RAG and Enterprise Knowledge and From AI Assistants to AI Agents; here they sit next to the other two options, priced.
The order of the figure is deliberate. Anthropic’s engineering team, in its widely read guide to building agents, advises finding the simplest solution possible and adding complexity only when needed, and observes that for many applications a single model call with retrieval and in-context examples is usually enough2. That is a provider’s view, but it matches what teams report, and it gives a manager a clean default: the burden of proof sits on the more complicated proposal.
The plain prompt: cheap to try, hard to skip
A plain prompt is the instruction and the examples the team sends with each request. It fits when the task is stable, the needed facts fit in the request or are already known to the model, and the output format can be described. Summarizing a ticket in a fixed structure, classifying messages into five categories and drafting a reply in house style are typical.
The effort is days, and the running cost is the lowest of the four, though a long prompt is paid for on every call. Its risks are quiet ones. Prompts drift as people patch them, and a prompt cannot give the model facts it does not have.
Managers underrate the prompt for a practical reason. A team that tries a clear prompt with examples, and measures it against a fixed set of test cases, learns what it needs the fancier design for. A team that skips this step cannot say what the fancier design bought. So the first review question for any proposal is simple: what did the plain prompt score?
Retrieval: when the knowledge is yours and it moves
Retrieval fits when answers must come from documents the model was never trained on, such as policies, manuals, contracts and tickets, and when those documents change. The design adds a pipeline: ingest the documents, split and index them, find the relevant passages for each question, and give them to the model with instructions to answer from them.
Research supports the choice for knowledge. Ovadia and colleagues compared fine-tuning with retrieval as ways of putting facts into a model and found that retrieval consistently outperformed unsupervised fine-tuning (the study’s setting), for knowledge the model had met in training and for entirely new knowledge3. Retrieval also lets the knowledge be updated by changing the index instead of retraining the model.
The effort is weeks, because most of the work is not the model. It is the pipeline: getting documents out of their home systems, keeping the index current, and making sure each user retrieves only what that user may see. The running cost is moderate. The risks sit in the pipeline too. The index can be stale, the system can retrieve the wrong passage and answer confidently from it, and a permission mistake can show one person another person’s document. The manager’s questions are about freshness and permissions, and they are covered below.
The agent loop: more reach, more of everything
An agent fits when the task cannot be written as a fixed sequence: the model has to look something up, decide what to do next, call a tool, check the result and continue. Investigating a failed deployment across logs and tickets is a good example. Answering a policy question is not, because one lookup is enough.
An agent pays for its flexibility in three currencies. The first is tokens and time. Anthropic reported, from its own multi-agent research system, that its agents used about four times the tokens of a chat interaction and its multi-agent system about fifteen times4. The second is evaluation. A single answer can be checked against a reference; an agent must be judged on the whole job it did, including steps nobody predicted. The third is risk. An agent acts, so its permissions are the permissions of whoever it acts for, and a wrong step can be an action in a real system, not just a wrong sentence.
The same post is honest about where multi-agent designs do not pay. Domains in which all agents need the same context, or in which the steps depend heavily on each other, are not a good fit today, and coding tasks have fewer parallel pieces than research does. For a manager the practical reading is that “agent” is not a quality level. It is a design for a particular shape of task, and a single agent with a few well-bounded tools should be the proposal’s starting point.
Fine-tuning: it teaches behavior, not facts
Fine-tuning continues a model’s training on examples your team prepares. It fits when the model has the knowledge but cannot reliably hold an output format, a house tone or a classification scheme, and when a smaller, cheaper model must match a larger one on a narrow task at high volume.
It is a risky tool for teaching the model your documents, and this is the most common confusion in proposals. Gekhman and colleagues, fine-tuning with supervised examples on closed-book question answering, found that examples introducing new knowledge are learned significantly slower than familiar ones, and that as the model eventually learns them, they linearly increase its tendency to hallucinate5. Those results come from one setup and do not prove that no fine-tuning recipe can add facts; they are a reason to try retrieval first.
The effort is the highest of the four in a way that is easy to miss. The model is not the hard part. The examples are: the team must collect, label and review them, hold some back as a test set, and repeat the work when the base model changes. The running cost per request can be low, which is why the option stays attractive at scale. The risks are a model frozen at a point in time and a dependence on the base model it was built from.
Cost, effort and risk side by side
Put the four designs in one table and the trade-offs become visible. The ratings below are relative planning judgments for a typical feature, not measurements, and your own numbers will differ. What matters is the ordering and the kind of risk.
Two points follow. Designs combine: a feature can retrieve policies, follow a fine-tuned format and call two tools. But each added piece should be there because a measured gap demanded it. And effort is not the same as risk. Retrieval is moderate in effort but carries the permission risk that most often embarrasses teams; fine-tuning is a heavy effort whose risks are quiet. Reading the table by one column hides the others.
Seven questions for the design review
Whatever the proposal, the same seven questions expose most weak plans. You are not checking the engineers’ technical choices. You are checking that the team has thought about the things that decide whether the feature survives contact with users.
Some of these points deserve a sentence each. Permissions is the question that most often has a wrong answer, because a prompt that says “only show the user their own documents” is a request, not a control. Access has to be enforced where the documents are fetched. Evaluation is the question that most often has no answer at all. Cost should be asked per finished task, not per model call, because retries, tool calls and human review belong in the number. And ownership matters because an index or a prompt without an owner decays quietly.
Case: LinkedIn and the last stretch
Return to the opening. LinkedIn’s account of its job and people assistant is useful because it is candid about where the time went1. The design was a retrieval-based pipeline: a routing step decided which capability should handle a question, a retrieval step called internal services, and a generation step wrote the answer. Internal APIs were wrapped as skills the model could call.
The lessons are about the plan, not the pipeline. The first hurdle was agreeing what a good answer looks like. The team wrote evaluation guidelines, trained annotators and reviewed around 500 conversations a day, and it described automatic evaluation as a work in progress. It also said it had underestimated how hard hallucinations were to detect and reduce. If your engineers show you a working demo of a retrieval feature, treat it as the 80 percent point. The date you approve should include the months that follow.
Case: Shopify’s assistant and the tool count
Shopify’s engineers wrote in August 2025 about Sidekick, the assistant that helps merchants run their stores6. It is an agent in the sense used here: the model decides which tool to call, the system runs it, and the loop continues until the job is done. The post is a record of what happened as the system grew.
As capabilities multiplied, the system prompt filled with special cases, which the team called death by a thousand instructions. Its fix was to deliver instructions just in time, alongside the data a tool returns, instead of keeping every rule in one prompt. Two other points matter to a manager. The engineers advise staying simple and avoiding multi-agent designs early, because a single agent can handle more than people expect. And they say plainly that informally trying the system is not enough. They built evaluation sets from real conversations and a model-based judge that agreed with human graders almost as well as the humans agreed with each other (a kappa of 0.61 against 0.69).
Neither post is an independent audit; both are companies describing their own projects. They are useful because they agree with each other and with the research: the design choice is the quick part, and evaluation and growth are what consume the schedule.
A team-sized worked example
What follows is a constructed scenario rather than a documented one, and the figures in it are placeholders. A team of six engineers is asked to build an assistant that lets support staff ask questions about internal policy and get answers with a source. The policy pages, a few thousand of them, change weekly. Staff may only see policies for their own region.
The team lead walks the choice in order, with every figure here illustrative. Plain prompt: one week of work, tried on a set of 100 real questions. It answers fluently, scores 40 of 100 correct and cited, and cites policies that do not exist, because the model has never seen them. The gap is knowledge, so a prompt alone fails, and 40 becomes the baseline. Retrieval: the gap is exactly “your documents, changing weekly,” so the team plans six weeks, including two for evaluation. It builds an index with a weekly refresh, filters results by the asker’s region at retrieval, and requires every answer to cite a passage. The prototype scores 86 and the release gate is 90. Agent: a policy question needs one lookup, not a path to discover, so an agent adds cost and failure modes for no gain, and the lead declines it. Fine-tuning: the answers are accurate but the tone varies, so the lead asks for a measured tone score first; if a gap remains after better prompt examples, fine-tuning is a later option for behavior, not facts.
The lead’s review pack answers the seven questions in a page, with illustrative thresholds. Freshness: sources under 7 days old, removed pages disappear from the index. Evaluation: the 100 real questions, the plain-prompt baseline of 40, and a release gate of 90. Failure mode: the assistant says it cannot find a policy and points to the owner. Permissions: region filter at retrieval, with zero cross-region results in 20 test probes. Latency: under 5 seconds for 9 in 10 answers, with a message if it is exceeded. Cost: a measured 0.06 per answered question against a limit of 0.10. Ownership: one engineer for the pipeline and a named policy owner for the pages.
What this means for engineering managers
Check yourself
- Fine-tuning is the best way to teach a model your company’s current policy documents.
- Retrieval lets you update what the feature knows by changing the index, without retraining the model.
- An agent is simply a better version of a retrieval feature.
- Telling the model in the prompt to show users only their own documents is a sufficient permission control.
- A working demo at 80 percent of the target means the feature is nearly done.
- Teams should start with the simplest design that passes the evaluation and add pieces only for a measured gap.
Reflection
What comes next
Choosing the architecture settles what the feature is made of. It does not settle how it behaves, because the same input can produce different outputs on different days. The next chapter, Designing for Non-Determinism, covers how to design for that variation with constraints, fallbacks and clear signals to users.
Laws referenced
Not legal advice. Laws change; verify before relying on this, and consult counsel for decisions.
General Data Protection Regulation · EU
Regulation (EU) 2016/679
Personal data is any information relating to an identified or identifiable person, directly or indirectly, including by an identifier such as an online ID (Art. 4(1)). Lawful basis and purpose limitation (Arts. 5-6); processing special-category data, including biometric data used to identify a person, health data and data revealing ethnicity, is prohibited unless a specific exception applies (Art. 9); data protection by design and by default (Art. 25); processors such as AI vendors may act only under a written contract with required terms and sufficient guarantees (Art. 28); transparency to data subjects (Arts. 13-14); right not to be subject to a decision based solely on automated processing with legal or similarly significant effects (Art. 22); breach notification to the supervisory authority within 72 hours (Art. 33) and to individuals without undue delay when the risk is high (Art. 34); data protection impact assessment for high-risk processing (Art. 35). Fines up to EUR 20 million or 4% of global turnover.
- 2018-05-25 — Applies
Last verified 2026-10-08 · official text
References
- LinkedIn Engineering. Musings on building a generative AI product. LinkedIn Engineering blog. 2024.
- Erik Schluntz and Barry Zhang. Building effective agents. Anthropic Engineering. 2024.
- Oded Ovadia, Menachem Brief, Moshik Mishaeli and Oren Elisha. Fine-Tuning or Retrieval? Comparing Knowledge Injection in LLMs. Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing (EMNLP 2024), 237-250. 2024.
- Anthropic. How we built our multi-agent research system. Anthropic Engineering blog. 2025.
- Zorik Gekhman, Gal Yona, Roee Aharoni, Matan Eyal, Amir Feder, Roi Reichart and Jonathan Herzig. Does Fine-Tuning LLMs on New Knowledge Encourage Hallucinations?. EMNLP 2024 (arXiv:2405.05904). 2024.
- Shopify Engineering. Building production-ready agentic systems: Lessons from Shopify Sidekick. Shopify Engineering blog. 2025.
Further reading
- Erik Schluntz and Barry Zhang. Building effective agents. Anthropic Engineering. 2024.
- LinkedIn Engineering. Musings on building a generative AI product. LinkedIn Engineering blog. 2024.
Sources last verified 2026-10-12.