If your agency has started fine-tuning large language models for client work, you have probably asked yourself one question: does this count as R&D for tax purposes? The short answer is yes, in the right circumstances. But HMRC does not hand out R&D relief for plugging in an API and calling it a day. You need genuine technical work that resolves uncertainty.
We are seeing more digital agencies, creative agencies, and AI-focused consultancies build fine-tuned models for specific use cases. Sentiment analysis for a PR agency. Content generation tailored to a brand voice for a marketing agency. Automated code review for a web design agency. Each of these can qualify, but the claim hinges on what you actually did, not what you built.
Let us work through the HMRC criteria with real agency scenarios.
What HMRC Actually Looks For in an R&D Claim
HMRC uses the same test for every R&D claim, whether you are a pharmaceutical company or a 15-person agency in Shoreditch. The work must be part of a specific project seeking an advance in science or technology. That advance must resolve scientific or technological uncertainty that a competent professional in your field could not readily resolve.
For a fine-tuning LLM R&D tax credit claim, you need to show three things:
- You attempted to achieve an advance in technology (not just applying existing techniques)
- You faced genuine technical uncertainty at the start of the project
- You undertook a systematic process of investigation to resolve that uncertainty
The key word is "uncertainty." If you knew how to achieve the outcome before you started, it is not R&D. If you tried something, it did not work, and you had to figure out a new approach, that starts to look like qualifying activity.
Where Fine-Tuning an LLM Can Qualify
Fine-tuning a pre-trained model like GPT-4, Llama 2, or Mistral is not inherently R&D. Hooking into an API and adjusting a few parameters is standard engineering work. But the moment you move beyond documented techniques into unknown territory, the picture changes.
Here are three agency scenarios where fine-tuning qualifies:
Scenario 1: Novel Training Data Preparation
A PR agency needed a model to identify subtle reputational risks in real-time news feeds. Off-the-shelf sentiment models failed because they could not handle industry-specific jargon, sarcasm, and context-dependent language. The agency had to develop a custom data pipeline, create novel labelling schemes, and experiment with different training architectures to get usable results. That involved technical uncertainty. The team did not know which approach would work. They ran multiple experiments, documented failures, and iterated. That is R&D.
Scenario 2: Optimising for Unusual Constraints
A digital agency building a client-facing chatbot for a regulated financial services firm needed the model to produce outputs within strict compliance boundaries. Standard fine-tuning techniques caused the model to lose accuracy on core tasks. The agency had to develop a multi-stage training approach, combining supervised fine-tuning with reinforcement learning from human feedback, all while maintaining latency under 200 milliseconds. The solution was not obvious at the start. That is technical uncertainty resolved through systematic investigation.
Scenario 3: Adapting Models for Low-Resource Languages
A recruitment agency operating across the Middle East and North Africa needed a model to screen CVs in Arabic dialects. Pre-trained models performed poorly because training data for these dialects is scarce. The agency developed a transfer learning approach, created synthetic training data, and built evaluation metrics from scratch. Each step involved trial and error. That qualifies.
Where Fine-Tuning an LLM Does NOT Qualify
HMRC is increasingly scrutinising AI-related claims. They have seen the marketing. They know agencies are excited about the potential. But they will push back on claims that amount to routine configuration.
These activities do not qualify:
- Downloading a pre-trained model and running it through a standard fine-tuning script from GitHub
- Adjusting hyperparameters within documented ranges
- Using a third-party platform like OpenAI or Anthropic with no modification to the underlying model
- Building a user interface around an existing model
- Creating prompt templates (prompt engineering alone is not R&D)
If a competent machine learning engineer could replicate your work by following a published tutorial, HMRC will reject the claim. The advance must be novel to the field, not just novel to your agency.
The Documentation You Need to Build
HMRC does not accept retrospective claims built on guesswork. You need contemporaneous evidence that shows the uncertainty you faced and the work you did to resolve it. As ICAEW qualified accountants, we advise every agency client to document as they go, not after the fact.
For a fine-tuning LLM R&D tax credit claim, keep records of:
- Project briefs that state the technical objective and the uncertainty at the start
- Experiment logs showing what you tried, what failed, and what you changed
- Version control history (Git commits are excellent evidence)
- Internal emails or Slack messages discussing technical problems
- Time records for the staff working on the R&D activity
- Cost records for compute, data acquisition, and any subcontractor work
One agency founder we worked with had a Notion database tracking every failed experiment across six months. That single document was worth more than a hundred pages of retrospective narrative. HMRC loves that kind of evidence because it is hard to fabricate.
What Costs Can You Claim?
For an agency using the SME R&D scheme, qualifying costs include:
- Staff costs (salaries, employer NI, pension contributions) for employees directly working on the R&D
- Consumables (cloud compute costs for training runs, API costs for testing, data purchase costs)
- Subcontractor costs (capped at 65% of the payment, or 100% if the subcontractor is a qualifying body)
- Software licences used directly in the R&D
Cloud compute costs are a significant line item for fine-tuning projects. Training a model on a GPU instance for weeks adds up. These costs qualify as consumables, but only if they are directly used in the R&D activity. Running inference on a trained model does not qualify.
Let us use a real example. A 12-person digital agency spent £14,700 on AWS GPU instances over four months while fine-tuning a model for a client in the legal sector. Two engineers earning £55,000 each spent 60% of their time on the project. The qualifying costs were roughly £18,000 in staff costs and £14,700 in compute, totalling £32,700. Under the SME scheme, the enhanced deduction (186% for expenditure after 1 April 2023) gave the agency a corporation tax saving of around £6,200. For a profitable agency, that is real cash back.
The Timing Trap
R&D claims must be made within two years of the end of the accounting period in which the qualifying expenditure was incurred. If you fine-tuned a model in your 2023/24 financial year, you have until the filing deadline for that year's CT600 to submit the claim. Miss that window and the relief is gone.
Many agencies wait until they file their year-end accounts to think about R&D. That is a mistake. If you are actively fine-tuning models now, start documenting today. Even if you are not sure whether the work qualifies, document it anyway. You can always decide not to claim later. You cannot go back and create evidence you did not keep.
HMRC's Growing Interest in AI Claims
HMRC has a dedicated team reviewing R&D claims in the software and AI space. They are asking harder questions. They want to see the technical narrative, not just a list of costs. They will push back on claims that describe fine-tuning as "enhancing model performance" without explaining the specific uncertainty that was resolved.
If you submit a claim for fine-tuning an LLM, expect HMRC to ask:
- What was the baseline performance before your work?
- What specific technical challenge could you not solve using existing methods?
- What experiments did you run, and what were the results of each?
- How did you know when you had achieved the advance?
If you cannot answer those questions clearly, your claim will likely be rejected. If you can, and you have the documentation to back it up, you have a strong case.
Should You Claim?
If your agency has done genuine technical work to fine-tune a model beyond standard techniques, and you have documented that work properly, a fine-tuning LLM R&D tax credit claim is worth pursuing. The relief can be significant, especially for agencies investing heavily in compute and engineering time.
But if your work involved standard fine-tuning with no technical uncertainty, do not claim. HMRC penalties for careless or fraudulent claims are severe. The reputational damage to your agency is worse.
If your contractor mix has changed or you have started taking on AI-focused projects, ask your accountant before year-end. They can help you assess whether your work qualifies and what documentation you need. Our team works exclusively with agency founders and understands both the technical and tax sides of these claims.
For more on how we help agencies with tax compliance, visit our services page. If you are a marketing or digital agency exploring R&D claims, we cover that in more detail on our marketing agency page and digital agency page.

