PROGRAM ZERO 18-month live AI, LLM & full-stack programme · ₹17,999 for all 18 months · Starts 9 January 2027
Explore Program Zero →
Careers Ninza — business and startup leadership training
JOIN ZERO NINZA KIDS
JOIN ZERO NINZA KIDS
See all programs → Free live masterclass → Guides & articles → Newsletter →
Careers Ninza
AI & AUTOMATION 10 min read · Updated 13 October 2026

How to evaluate an LLM application: test sets, metrics and red teaming

Without evaluation, every change to a prompt or model is a guess. How to build a test set, choose metrics, use human and model graders, red-team for safety and track quality over time.

CN
Careers Ninza AI faculty
Careers Ninza · Kolkata, India
Learn this live in Program Zero

To evaluate an LLM application, build a test set of real inputs with expected outcomes, decide what “good” means for your use case, score outputs with a mix of automatic checks, human review and carefully used model graders, red-team for safety, and rerun the whole set every time you change a prompt, model or retrieval setting.

Evaluation is the most underrated skill in applied AI. Demos look impressive; production reveals the long tail of strange inputs, missing documents and confident mistakes. Teams that evaluate systematically ship faster, because they know when a change actually helped.

Why is evaluating LLMs harder than normal software?

Traditional software has exact expected outputs. LLM outputs vary in wording, may be partly right, and can change when the model provider updates a model. Quality has several dimensions at once: correctness, faithfulness to sources, helpfulness, tone, safety, cost and speed. You need to measure the ones that matter for your product.

How do you build a good test set?

—Collect real questions or tasks from users, logs or support tickets.
—Include easy, typical and hard cases, plus edge cases and inputs that should be refused.
—Write the expected answer or the facts a good answer must contain.
—Start with 30 to 50 examples, then grow it with every bug you find.
—Keep a held-out set you do not tune against, to avoid fooling yourself.

Which metrics should you use?

DimensionHow to measureExample
CorrectnessMatch against expected facts or answersDoes the answer give the right fee?
FaithfulnessCheck claims are supported by retrieved sourcesNo invented policy details
Retrieval qualityWas the right document retrieved?Correct chunk in the top results
FormatAutomatic checks on structureValid JSON, required fields present
SafetyRed-team prompts and refusal checksResists prompt injection
Cost and latencyTokens and time per requestUnder target cost per answer

For retrieval-augmented systems, measure retrieval and generation separately; most RAG failures are retrieval failures. Program Zero’s explainer on how RAG works shows where each step can go wrong.

Should you use an LLM to grade another LLM?

Model graders, sometimes called LLM-as-a-judge, scale well for subjective qualities such as helpfulness or tone. Use them carefully: give the grader a clear rubric, check its judgements against human ratings on a sample, watch for bias towards longer or more confident answers, and never let it be the only check on correctness for important facts.

What is red teaming?

Red teaming means deliberately trying to make the system fail: prompt injection hidden in documents, requests for harmful content, attempts to leak the system prompt or private data, and inputs designed to trigger expensive loops. The OWASP Top 10 for LLM Applications is a good checklist of risks to test against.

Re-run your full evaluation whenever anything changes: prompt, model version, retrieval settings, tools or documents. A small, unnoticed change in one place is the most common cause of quality dropping in production.

How does evaluation work in practice?

—Store test cases in version control alongside the code.
—Run the suite automatically on every change, like unit tests.
—Track scores over time on a simple dashboard.
—Review a sample of real production conversations every week.
—Turn every reported failure into a new test case.

What does an evaluation run look like?

Picture a fee-enquiry assistant for a coaching institute. The test set has 50 real questions: fees, EMI, batch dates, eligibility, refunds and a few attempts to make it promise a job. Each run scores correctness against the current fee sheet, checks that answers cite the right document, confirms the job-guarantee prompts are refused politely, and records cost and response time. A change is accepted only if scores hold or improve.

Who should own evaluation in a team?

Everyone contributes, but someone must own it. Engineers maintain the harness, product and support teams supply real cases and judge what good looks like, and domain experts review sensitive answers. Without an owner, test sets go stale and teams slide back into judging changes by impressions.

What about benchmark scores for models?

Public benchmarks, and broad frameworks such as holistic evaluation of language models, help compare models in general, but they rarely predict performance on your specific task. Always test candidate models on your own data before choosing one.

Which tools help with evaluation?

You can start with nothing more than a spreadsheet of test cases and a script that runs them, then move to open-source evaluation frameworks and tracing tools as volume grows. Whatever you use, keep test cases in version control, store every run’s results with the prompt and model version, and make it easy for non-engineers to add new cases they find.

How does this connect to choosing between fine-tuning and RAG?

Evaluation is what makes that decision objective: measure the baseline, try a better prompt, then retrieval, then fine-tuning, and keep whatever improves your scores at acceptable cost. Our guide to fine-tuning vs RAG vs prompt engineering explains each option, and why companies want engineers who understand models shows why evaluation skills stand out.

Evaluation is taught alongside building in Program Zero’s LLM phase, which covers perplexity, BLEU and ROUGE, benchmarks and RAG pipelines.

Program Zero runs live online, so you can learn this from anywhere in India: metros such as Kolkata, Bengaluru, Mumbai, Delhi NCR and Hyderabad, growing cities such as Pune, Ahmedabad, Jaipur and Lucknow, and smaller towns such as Asansol, Durgapur, Siliguri and Guwahati. Every learner joins the same evening classes, at the same fee.

Want to learn this live, with mentors?

Program Zero teaches LLMs, RAG, evaluation and AI security as one engineering discipline, over 18 months of live evening classes. ₹17,999 for all 18 months; the batch starts 9 January 2027.

PROGRAM ZERO · 18-MONTH LIVE PROGRAMME
Program Zero: AI, LLM & Full-Stack Developer Programme

Learn AI, large language models and full-stack development live with mentors: from your first line of code to building and deploying your own language model.

₹17,999 for all 18 monthsStarts 9 January 2027Mon–Fri, 9:00–10:30 PM ISTEvery class recorded

Frequently asked questions

How do you evaluate an LLM application?+

Build a test set of real inputs with expected outcomes, define what good means for your use case, score outputs with automatic checks, human review and carefully used model graders, red-team for safety, and rerun everything whenever you change a prompt, model or retrieval setting.

How many test cases does an LLM evaluation need?+

Start with 30 to 50 real, varied examples covering typical, hard and edge cases, then add a new case for every failure you find. A small, relevant test set is far more useful than a large generic one.

What metrics are used for LLM evaluation?+

Common dimensions are correctness, faithfulness to sources, retrieval quality for RAG, output format, safety and refusals, plus cost and latency per request. Choose the ones that matter for your product and track them over time.

What is LLM-as-a-judge?+

It is using a language model to grade another model's outputs against a rubric. It scales well for subjective qualities, but should be checked against human ratings and never be the only check on important facts, because graders have biases.

How do you evaluate a RAG system?+

Measure retrieval and generation separately: check whether the right documents were retrieved, then whether the answer is correct and supported by those documents. Most RAG problems are retrieval problems, so measuring them separately shows where to fix.

What is red teaming in AI?+

Red teaming is deliberately trying to make an AI system fail, for example with prompt injection, requests for harmful content, attempts to leak private data or prompts that trigger expensive loops, so weaknesses are found before users find them.

Are public benchmarks enough to choose a model?+

No. Benchmarks give a general comparison but rarely predict performance on your specific task and data. Always test candidate models on your own evaluation set before deciding.

Where can I learn LLM evaluation in India?+

Program Zero by Careers Ninza teaches evaluation together with building LLMs, RAG and AI security, within an 18-month live programme for Rs 17,999 with weekday evening classes.

Related reading

AI & AUTOMATION LLM Course: What You Should Learn to Build Large Language Models Most LLM courses teach you to call an API. Building and adapting language models needs more: tokenisers, transformers, training, fine-tuning, alignment, evaluation and serving. Here is the full syllabus, in order. 10 min read AI & AUTOMATION Agentic AI Course: The Skills You Need to Build AI Agents in 2027 Building reliable AI agents takes more than chaining prompts. The skills an agentic AI course should teach, from tool use and memory to evaluation, security and deployment, and how to judge a course. 10 min read AI & AUTOMATION What Is Tokenization in LLMs? BPE, WordPiece and SentencePiece Explained Before a language model reads a word, a tokenizer chops text into pieces. How BPE, WordPiece and SentencePiece work, why tokens decide cost and context, and why Indian languages are affected most. 9 min read

We teach this, live

Every article here comes from something we teach. Sit in on a free masterclass and judge the mentors yourself.