To build a custom evaluation dataset for local model testing, start with your own task, not a public leaderboard. Define the behavior you need, collect representative prompts, write reference answers or a scoring rubric, validate the examples by hand, version the set, and run your local model with fixed settings so you can compare changes. The result is a small, maintained test suite that tells you whether a model, quantization, prompt, or runtime change actually helped your use case.
This guide is a synthesis of published evaluation guidance, not a report of a controlled benchmark. It is aimed at technically curious beginners and intermediate practitioners running models locally with tools such as llama.cpp, Ollama, LM Studio, or vLLM.
Why standard benchmarks are not enough
Public benchmarks such as MMLU, HellaSwag, and ARC are useful for general capability comparisons, but they are not a substitute for task-specific testing. As the Arsturn guide puts it, relying only on standard industry benchmarks for real-world business applications is like using a standardized high school exam to hire a specialist heart surgeon: it may show general knowledge, but it says nothing about the specific procedure you need.
The Hugging Face evaluation guidebook makes the same point from the dataset side: your evaluation result will only be as good as your evaluation dataset. A local model can score well on a general benchmark and still fail your prompt format, your domain vocabulary, your JSON schema, or your context-length limits. Local testing also adds variables that leaderboards rarely capture: quantization level, runtime version, hardware, and sampling settings.
What a custom evaluation dataset contains
A custom evaluation dataset is a structured collection of test cases for a defined task. At minimum, each case should include:
- A prompt or input that represents a real request.
- A reference answer, a set of acceptable answers, or a scoring rubric.
- Metadata such as category, difficulty, source, language, and any special constraints.
- Enough context to reproduce the run: model name, quantization, runtime, context length, and sampling parameters.
It is not training data. You use it to measure behavior, not to teach the model. Keep it separate from fine-tuning data to avoid leakage and overfitting. The Hugging Face guidebook notes that you can either select an existing dataset or design your own; in both cases, the quality of the samples determines the value of the result.
Choose an existing dataset or build your own
Existing datasets can save time, but they must be inspected before use. The Hugging Face guidebook recommends looking at the creation process: who created the samples, whether other annotators or the authors examined them, whether inter-annotator agreement was high, and whether annotators had clear data-creation guidelines. It ranks expert-created datasets above paid annotator, crowdsourced, and MTurked datasets in general reliability, while noting that a data card can reveal annotator demographics and language diversity.
Then inspect the samples themselves. The guidebook suggests taking 50 random samples and checking them manually for quality and relevance. Look for ambiguous prompts, incorrect answers, missing information, and examples that do not match your use case. It gives concrete examples: TriviaQA can contain several gold answers in an aliases field, sometimes conflicting, and MMLU can miss reference schematics in some questions. Those are exactly the kinds of defects that can make a local model look wrong when the dataset is wrong.
If existing datasets do not match your task, build your own. A custom set is usually smaller, more focused, and easier to maintain.
A practical build workflow
The following workflow is a recommended protocol, not a tested benchmark. Adapt it to your environment.
1. Define the task and success criteria
Write one sentence that describes what the model must do. For example: Given a customer support message, classify the request into one of five categories and extract the product name. Then define what counts as success: exact category match, valid JSON, correct extraction, no hallucinated product names, or a rubric score for tone and completeness. Without this step, you will collect interesting prompts that do not answer a decision.
2. Collect representative prompts
Use real inputs where possible: support tickets, logs, documents, chat transcripts, or user questions. Redact secrets, credentials, personal data, and anything you do not have permission to store. Add edge cases deliberately: short inputs, long inputs, mixed languages, ambiguous requests, formatting errors, and prompts that should be refused. Keep a note of where each sample came from so you can audit licensing and privacy later.
3. Write reference answers or a rubric
For closed tasks, write the correct answer and, where multiple answers are valid, list acceptable variants. For open-ended tasks, write a rubric with dimensions such as factual correctness, completeness, format compliance, and citation quality. The Hugging Face guidebook warning about conflicting gold answers is a reminder to define acceptable answers explicitly rather than assuming one perfect string.
4. Balance coverage and reduce bias
Do not let one easy category dominate. Include typical, edge, and adversarial cases. If your local model will run in a specific language or domain, make that language and domain visible in the dataset. The Arsturn guide identifies bias as a common pitfall in custom evaluation datasets, so review categories, phrasing, and expected answers for systematic skew.
5. Validate by hand
Before you trust any score, inspect a random sample manually. The Hugging Face guidebook recommends 50 random samples as a practical check. Ask:
- Is the prompt clear and unambiguous?
- Is the answer correct, and are all acceptable answers listed?
- Is any information missing that the model would need?
- Is this the kind of question you actually want to evaluate?
- Is the example relevant to your use case?
If multiple people annotate, measure agreement. If agreement is low, the prompt or rubric is probably too vague. Fix or remove weak samples.
6. Format and version the dataset
Use a simple, machine-readable format. JSONL is common because each line is an independent example. Include a stable ID and a version field so you can compare runs over time.
{"id":"support-001","version":"1.0","category":"classification","prompt":"Customer says: My invoice shows the wrong VAT number. What should I do?","reference":"billing","acceptable_answers":["billing","invoice","tax"],"rubric":"Must select billing; no extra categories.","metadata":{"difficulty":"easy","language":"en"}}
{"id":"support-002","version":"1.0","category":"extraction","prompt":"Extract the product name and order number from: I need a replacement for the Acme Widget, order A-1042.","reference":{"product":"Acme Widget","order":"A-1042"},"acceptable_answers":[],"rubric":"Both fields must be present and exactly match.","metadata":{"difficulty":"medium","language":"en"}}Store the dataset in version control. Treat changes as new versions, not silent edits, because a changed dataset changes the meaning of every score.
7. Run the local model with fixed settings
Record everything that can affect output: model name and version, quantization, runtime and version, context length, temperature, top_p, top_k, seed, and hardware. Run the same dataset against each configuration. If you change the prompt template, quantization, or runtime, treat it as a new experiment. This is basic reproducibility, and it is especially important for local models because small configuration changes can shift behavior.
8. Score, inspect failures, and iterate
Start with deterministic checks where possible: exact match, regex, JSON schema validation, or required-field checks. For open-ended outputs, use a rubric and human review; automated judges can help scale, but they should be validated against human labels. Group failures by category. A model that fails 20% of extraction cases may still be usable if the failures are concentrated in one rare format. A model that fails randomly across categories is not ready.
After each change, re-run the full dataset. Keep a small holdout set that you do not use for prompt tuning, so you can detect overfitting.
Limitations and tradeoffs
Custom datasets are not automatically better. A small, biased, or poorly written set can produce confident but misleading scores. The Hugging Face guidebook emphasis on creation process, annotator agreement, and manual inspection exists because dataset defects are common. The Arsturn guide warning about bias applies here too.
There is also a maintenance cost. Models, prompts, and business tasks change. A dataset that was valid six months ago may contain outdated answers or missing categories. Schedule periodic reviews and version every change. Finally, do not treat open weights, open source, and commercial-use permission as interchangeable. Check the model and dataset licenses before you redistribute or use them in production.
A useful next action
Pick one narrow task you already run locally. Write ten representative prompts, five edge cases, and a simple rubric. Validate them by hand, run your current model with fixed settings, and record the failures. That small set will teach you more about your local model than another general leaderboard. If you share your goal, environment, result, or error in the community, include the model, quantization, runtime, and dataset version so others can reproduce the discussion.
FAQ
How many examples do I need in a custom evaluation dataset?
There is no universal number. The Hugging Face guidebook recommends manually inspecting 50 random samples for quality, but the right size depends on task diversity and decision stakes. Start small, validate, and expand.
Can I use an existing dataset instead of building one?
Yes. The Hugging Face guidebook says you can select an existing dataset or design your own, but you must inspect its creation process and sample quality first.
Do I need reference answers for every prompt?
Not necessarily. Closed tasks benefit from reference answers or acceptable variants; open-ended tasks can use a rubric. The key is to define what counts as success before scoring.
Should I use an LLM as a judge for local model testing?
It can help scale open-ended scoring, but validate it against human labels and keep the rubric explicit. Dataset quality remains the limiting factor.