Build a Training Needs Analysis Agent with Claude
AI & L&DAugust 202612 min read

Build a Training Needs Analysis Agent with Claude

By CTH Editorial · August 2026 · Corporate Training Hub L&D Desk

Training needs analysis is one of those exercises everyone agrees is essential and almost nobody does properly. The reason is straightforward: done thoroughly, it takes weeks. You are pulling headcount data, reading survey free-text, interviewing function heads, mapping capability against strategy, and by the time you have finished, the business has moved and half of it is stale.

So most organisations skip it. They repeat last year's plan with adjustments, or they respond to whichever department head asked loudest. Then in the budget meeting they cannot explain why these programmes and not others — because there was never any analysis to point at.

This article gives you a working alternative. Three levels, from something you can use in the next ten minutes to a functioning agent that runs the whole analysis. All of it built with Claude, all of it usable by an HR or L&D team without a developer.

Before Anything Else: The Data Rule

One thing to settle before you start, because it matters more than any prompt below.

Never
Put identifiable employee data into a public AI tool. Strip names, employee numbers and anything that identifies an individual before it goes anywhere near a chat window. Aggregate to role and function level. If you need individual-level analysis, that requires an enterprise deployment with a data processing agreement in place — a conversation with your legal and IT teams, not something to work around.

Everything in this article works fine on anonymised, aggregated data. Roles, headcount, tenure bands, performance distributions, survey themes. You do not need names to run a good TNA, and including them creates risk with no analytical benefit.

Level One: Five Prompts, No Setup

These work in Claude today with nothing configured. Run them in sequence — each builds on the last. Replace the bracketed sections with your own material.

1. Translate Strategy Into Required Capability

Most TNAs start by asking people what training they want. That produces a wish list. Start instead from the business objectives and work backwards to what people must be able to do.

Prompt 1 — Strategy to capability
You are helping me run a training needs analysis for 2027.

Here are our business objectives for next year:
[PASTE YOUR OBJECTIVES]

For each objective, tell me:
1. What the workforce must actually be ABLE TO DO to deliver it
2. Which functions or teams that capability sits with
3. Whether this is realistically a training need, or whether it is a
   structural problem that training will not fix

Be direct about the third point. I would rather hear that a problem is
about unclear ownership or broken process than commission training that
cannot solve it.

Note the third instruction. It is deliberate, and it is the one that makes this genuinely useful. A great deal of what gets classified as a training need is actually unclear ownership, broken process or misaligned incentives. Training will not fix those, and commissioning it anyway is how L&D budgets get spent with nothing to show.

2. Assess the Gap Against Your Actual Workforce

Prompt 2 — Gap assessment
Here is our current workforce data:
[PASTE ROLES, HEADCOUNT, TENURE, PERFORMANCE BANDS]

And the capabilities we established are required:
[PASTE OUTPUT FROM PREVIOUS PROMPT]

Assess the gap per function. For each gap give me:
- Current state, based only on the data I have given you
- Gap size: critical / significant / moderate / minor
- Headcount affected
- What evidence in my data supports that conclusion

Where the data is insufficient to judge, say so rather than estimating.
Tell me what additional data would let you answer properly.

The line asking Claude to flag insufficient data matters. Without it, you will get confident-sounding conclusions drawn from thin evidence — which is worse than no analysis, because you will act on it.

3. Synthesise Your Survey Free-Text

This is where the time saving is largest. Reading 340 free-text responses properly takes a day. Themed and quoted, it takes about four minutes.

Prompt 3 — Survey synthesis
Here are 340 free-text responses from our annual engagement survey,
specifically the question "what would help you perform better in your role?"

[PASTE RESPONSES]

Identify the recurring themes. For each theme:
- How many responses touch on it
- Representative quotes, unedited
- Whether it points to a capability gap, a management gap, or a
  process/tooling problem
- Which function it concentrates in, if any

Do not smooth over uncomfortable findings. If the data suggests management
quality is the issue, say that plainly.

4. Prioritise Against Budget

Prompt 4 — Prioritised plan
Using the gaps we identified, build a prioritised 2027 training plan
against a budget of AED [X].

Our group rates: 2 days AED 35,000 | 3 days AED 51,500 | 4 days AED 69,750,
each covering up to 12 delegates, excluding VAT.

For each recommendation give me:
- Priority order and the business rationale for that position
- Suggested duration and delegate numbers
- Estimated cost
- The success metric we should commit to
- The baseline we must capture BEFORE delivery

Then tell me what did not make the cut and why. I need to defend the
exclusions as much as the inclusions.

5. Convert It Into a CFO Business Case

Prompt 5 — The business case
Turn the plan below into a one-page business case for our CFO.

[PASTE PLAN]

Constraints:
- Open with the business problem, not the training
- Include full cost, not just the delivery fee: add participant time at a
  fully-loaded daily rate, and manager reinforcement time
- Every line needs a metric and a named executive sponsor
- Separate into three tiers: mandatory, business-critical, developmental
- End with what happens if this is cut by 30%

Write it for someone who is sceptical that training returns anything.

If you only use one prompt from this article, use this one. The gap between a training plan and a fundable business case is where most L&D submissions die, and it is largely a translation problem.

Level Two: A Claude Project That Remembers Your Organisation

The prompts above work, but you re-explain your organisation every time. A Project solves that — it holds persistent context and files across every conversation, so Claude already knows your headcount, your objectives and your rates.

Create a Project called TNA 2027. Upload your anonymised org data, your strategic objectives, and last year's training evaluation. Then set these custom instructions.

Project instructions
You are a Training Needs Analysis specialist working with the HR team at
[COMPANY], a [SECTOR] business operating in [UAE / KSA / MENA] with [X] employees.

Context you should assume:
- Our 2027 strategic objectives are in the project files
- Our org structure and headcount by function are in the project files
- Group training rates: 2 days AED 35,000 | 3 days AED 51,500 | 4 days AED 69,750
  (up to 12 delegates, excluding VAT)
- We have Emiratisation / Saudization obligations that make national talent
  development non-discretionary

How you must work:
- Ground every conclusion in the data provided. Never invent headcount,
  scores or survey findings.
- Where evidence is insufficient, say so and tell me what data would help.
- Always separate capability gaps (training can solve) from structural
  problems (training cannot solve). Name the second group explicitly.
- Prioritise by business impact, not by ease of delivery.
- When you recommend an intervention, state the success metric and the
  baseline we need to capture before it runs.
- Be direct. I would rather hear a finding I do not like than a comfortable one.

The final line does real work. Without it you get a diplomatic assistant. With it you get an analyst — and for TNA specifically, diplomacy is not what you need.

Level Three: An Agent That Runs the Whole Analysis

If you run this analysis quarterly, or across multiple business units, it is worth automating. The script below takes a CSV of your roles and a text file of objectives, and runs the full three-stage analysis end to end.

You need Python and an Anthropic API key. If your organisation has an IT team, this is a twenty-minute job for them.

1
Install the SDK. Run pip install anthropic in your terminal.
2
Set your API key as an environment variable named ANTHROPIC_API_KEY. Never paste it into the script itself.
3
Prepare two files. roles.csv with columns for function, role, headcount, average tenure and performance band. objectives.txt with your 2027 business objectives in plain text.
4
Run it: python tna_agent.py 400000 — where the number is your indicative budget in AED.
tna_agent.py
"""
Training Needs Analysis Agent
Reads role data + strategic objectives, returns a prioritised capability gap analysis.
"""

import os, json, csv, sys
from anthropic import Anthropic

client = Anthropic(api_key=os.environ["ANTHROPIC_API_KEY"])
MODEL = "claude-sonnet-5"

SYSTEM = """You are a Training Needs Analysis specialist working with an HR team
in the UAE/KSA private sector.

Rules:
- Base every conclusion on the data provided. Never invent headcount or scores.
- If evidence is insufficient for a conclusion, say so explicitly.
- Distinguish capability gaps (training solves) from structural problems
  (training does not solve: unclear roles, bad process, wrong incentives).
- Prioritise by business impact, not by how easy the training is to deliver.
- Output valid JSON only. No commentary outside the JSON.
"""

def ask(prompt, max_tokens=4000):
    r = client.messages.create(
        model=MODEL, max_tokens=max_tokens, system=SYSTEM,
        messages=[{"role": "user", "content": prompt}],
    )
    text = "".join(b.text for b in r.content if b.type == "text")
    return json.loads(text[text.find("{"):text.rfind("}") + 1])

def load_csv(path):
    with open(path, newline="", encoding="utf-8") as f:
        return list(csv.DictReader(f))

def step1_capabilities(objectives):
    return ask(f"""Business objectives for 2027:
{objectives}

For each objective, identify the workforce capabilities required to deliver it.

Return JSON:
{{"capabilities":[{{"objective":"...","capability":"...",
"functions_affected":["..."],"criticality":"high|medium|low"}}]}}""")

def step2_gaps(roles, capabilities):
    return ask(f"""Current workforce:
{json.dumps(roles, indent=2)}

Required capabilities:
{json.dumps(capabilities, indent=2)}

Assess the gap between current and required capability per function.
Flag anything that looks structural rather than a training need.

Return JSON:
{{"gaps":[{{"function":"...","capability":"...","current_state":"...",
"gap_size":"critical|significant|moderate|minor","headcount_affected":0,
"is_training_solvable":true,"evidence":"...","note_if_structural":""}}]}}""")

def step3_prioritise(gaps, budget_aed):
    return ask(f"""Capability gaps:
{json.dumps(gaps, indent=2)}

Indicative 2027 training budget: AED {budget_aed:,}
Group rates: 2 days AED 35,000 | 3 days AED 51,500 | 4 days AED 69,750
(each covers up to 12 delegates, excluding VAT)

Build a prioritised plan that fits the budget. Show what is excluded and why.

Return JSON:
{{"recommendations":[{{"priority":1,"function":"...","capability":"...",
"intervention":"...","suggested_duration_days":3,"delegates":12,
"estimated_cost_aed":51500,"business_rationale":"...","success_metric":"...",
"baseline_to_capture":"..."}}],
"total_cost_aed":0,"excluded":[{{"capability":"...","reason":"..."}}],
"structural_issues_for_leadership":["..."]}}""", max_tokens=8000)

def run(roles_csv, objectives_file, budget):
    roles = load_csv(roles_csv)
    objectives = open(objectives_file, encoding="utf-8").read()

    print("1/3  Deriving required capabilities...")
    caps = step1_capabilities(objectives)

    print("2/3  Assessing gaps against current workforce...")
    gaps = step2_gaps(roles, caps["capabilities"])

    print("3/3  Prioritising against budget...")
    plan = step3_prioritise(gaps["gaps"], budget)

    out = {"capabilities": caps, "gaps": gaps, "plan": plan}
    with open("tna_output.json", "w", encoding="utf-8") as f:
        json.dump(out, f, indent=2, ensure_ascii=False)

    print(f"\nDone. {len(plan['recommendations'])} recommendations, "
          f"AED {plan['total_cost_aed']:,} of AED {budget:,}")
    for r in plan["recommendations"]:
        print(f"  {r['priority']}. {r['function']} - {r['capability']}"
              f" (AED {r['estimated_cost_aed']:,})")
    if plan.get("structural_issues_for_leadership"):
        print("\nFlagged as NOT training problems:")
        for s in plan["structural_issues_for_leadership"]:
            print(f"  - {s}")
    return out

if __name__ == "__main__":
    run("roles.csv", "objectives.txt", int(sys.argv[1]) if len(sys.argv) > 1 else 400000)

The output lands in tna_output.json with the full working shown at each stage, plus a console summary of the recommendations and their costs. Critically, it also prints anything Claude flagged as a structural problem rather than a training need — which is often the most valuable thing on the page.

Where to Take It Next

This is deliberately a simple linear agent: three steps, no tools, no external connections. The obvious extensions, roughly in order of value:

That last point is worth dwelling on. The moment an agent moves from reading data to writing or sending anything, it needs a human approval step before every irreversible action. An agent that drafts a plan is useful. An agent that emails that plan to your CFO without you reading it first is a liability.

What This Does Not Replace

Two things, and being honest about them is what makes the rest credible.

Conversations with your function heads. The agent works from the data you give it. It cannot tell you that the sales director is quietly planning a restructure, or that the operations team lost confidence in their manager six months ago. That comes from talking to people, and the analysis should sharpen those conversations rather than replace them.

Your judgement on what is politically deliverable. Claude will prioritise on business impact, exactly as instructed. It does not know which executive will block which programme. That calibration is yours.

The value here is not that AI does your training needs analysis. It is that the analysis stops taking three weeks, which means you can actually do it — and do it again when the business changes.

Start Small

If this feels like a lot, take one prompt. Run the survey synthesis on last year's engagement free-text this week. It takes four minutes and it will tell you something you did not know about your own organisation.

Then decide whether the rest is worth building.

Build These Skills Across Your Team

Claude AI Mastery for Business covers the prompting and Projects work above in depth. Building AI Agents with Claude takes technical teams from prototype to production — both delivered across UAE, KSA and MENA.

View Our AI Programmes
← Back to All Insights

Ready to Develop Your Team?

Talk to our training consultants about your specific needs. We’ll design a programme that delivers real business impact — not just a training day.

Contact Us