A configurable dataset generation, refinement, and evaluation system built for the Agentoom ecosystem.
Originally developed while building Agentoom after repeatedly encountering unreliable tool-calling behavior and fragmented dataset workflows. What started as a collection of disconnected tools and CLI commands became the first version of a unified dataset engineering system.
Website: https://agentoom.com
This project runs inside Laravel Sail, a Docker-based development environment for Laravel. You do not need PHP, Composer, or Node installed locally — everything runs inside containers.
# Optional: create a convenient alias so you can type `sail` instead of `./vendor/bin/sail`
alias sail='sh $([ -f sail ] && echo sail || echo vendor/bin/sail)'
# Install PHP dependencies (requires local Composer or use the Docker bootstrap)
composer install
# Copy the environment file and start the containers
cp .env.example .env
./vendor/bin/sail up -d
# Generate the application key, run migrations, and install the default superadmin
./vendor/bin/sail artisan key:generate
./vendor/bin/sail artisan migrate --seed
./vendor/bin/sail artisan agentoom-train:installThe install command creates a default superadmin account and imports the bundled example datasets:
- Email:
superadmin@agentoom.com - Password:
changeme
Change the password after first login
Before generating datasets you need to connect at least one AI provider.
Open the application, go to AI Providers in the sidebar, and add your API key.
| Provider | Status | Notes |
|---|---|---|
| OpenRouter | ✅ Tested | Recommended. Gives access to hundreds of models via a single API key. |
| Generic OpenAI-compatible | ✅ Tested | Any endpoint that speaks the OpenAI API format (e.g. local Ollama, vLLM, LM Studio). |
| OpenAI | Should work — uses the same OpenAI SDK driver. | |
| Anthropic | Claude models via the Anthropic API. |
Note: OpenRouter and generic OpenAI-compatible endpoints have been validated end-to-end. OpenAI and Anthropic direct integrations are wired up but have not been extensively tested in production workflows. If you encounter issues, please open an issue.
The system uses Typesense as a vector search engine to compute semantic similarity between dataset rows.
- When dataset rows are indexed, each row's
payload_textfield (a normalised text representation of the row content) is automatically embedded by Typesense using the built-ints/all-MiniLM-L12-v2sentence-transformer model. - The resulting embedding is stored in the
payload_embeddingfield (a float vector) alongside the original text. - During evaluation and duplicate detection, the system queries Typesense using vector nearest-neighbour search on
payload_embeddingto find rows that are semantically similar — even if they use different wording. - The returned similarity scores are stored on each row as
source_similarity_scoreand consumed by theEdgeCaseEvaluatorandDistributionDriftEvaluatorto measure dataset diversity and detect near-duplicate content.
This means duplicate detection goes beyond exact string matching — two rows that express the same idea in different words will still be flagged as similar.
Typesense connection settings live in config/scout.php and are controlled via environment variables:
SCOUT_DRIVER=typesense
TYPESENSE_HOST=localhost
TYPESENSE_PORT=8108
TYPESENSE_API_KEY=your-key
TYPESENSE_EMBEDDING_MODEL=ts/all-MiniLM-L12-v2The embedding model runs inside Typesense — no external embedding API call is made.
Building reliable AI systems is not only about choosing the right model.
In practice, most failures happen because of:
- inconsistent datasets
- poor data quality
- weak edge-case coverage
- unbalanced examples
- lack of evaluation
- no structured refinement process
The Agentoom Train was created to solve this problem.
Instead of simply generating synthetic data, it provides a complete dataset engineering workflow:
Define → Generate → Critique → Refine → Evaluate → Improve → Version
The system is designed to support virtually any structured dataset, using:
- prompts
- JSON schemas
- configurable generation pipelines
- critic/refiner stages
- evaluation systems
- feedback loops
This system was originally built as part of the Agentoom ecosystem to support:
- AI agent training
- workflow intelligence
- automation systems
- structured reasoning datasets
- conversational datasets
- evaluation datasets
- fine-tuning preparation
Over time, it evolved into a reusable dataset engineering platform.
It is now being opened to the community for testing and collaboration.
Most synthetic dataset tools work like this:
Prompt → Generate → Export
This engine follows a different approach:
Objective
↓
JSON Schema
↓
Configurable Generation
↓
Critic Pipeline
↓
Refinement Pipeline
↓
Evaluation
↓
Failure Analysis
↓
Improvement Signals
↓
Dataset Versioning
The goal is not simply to generate data.
The goal is to create higher quality, measurable, improvable datasets.
The system is intentionally open-ended.
There are no predefined dataset types.
You define what you want through:
- prompts
- instructions
- JSON schemas
- pipeline settings
Examples include:
- conversational datasets
- instruction-following datasets
- classification datasets
- extraction datasets
- synthetic business scenarios
- benchmark datasets
- agent simulations
- evaluation datasets
- edge-case datasets
- structured reasoning examples
- domain-specific datasets
If it can be represented as structured data, it can be generated.
Describe the dataset you want to create.
Examples:
- customer support simulations
- business workflow scenarios
- legal extraction datasets
- medical classification examples
- agent tool-calling datasets
- structured QA systems
- adversarial or edge-case examples
The system is prompt-driven and intentionally flexible.
Provide a JSON schema describing the expected structure of each dataset row.
Example:
{
"customer_message": "string",
"intent": "string",
"sentiment": "string",
"response": "string"
}The engine uses schema constraints to keep outputs structured and consistent.
The dataset generation process is highly configurable.
Configure:
- generation instructions
- synthetic generation behavior
- dataset size
- batch behavior
- prompt strategies
- schema enforcement
Generated rows can pass through a quality control system.
The pipeline includes:
Responsible for:
- detecting low-quality rows
- identifying inconsistencies
- validating structure
- detecting weak examples
- flagging failures
Responsible for:
- correcting weak outputs
- rewriting invalid rows
- improving consistency
- refining examples
- increasing overall quality
This creates a more reliable dataset than simple one-shot generation.
Supports:
- configurable negative example ratios
- balanced positive/negative examples
- difficult examples
- adversarial examples
- robustness-oriented datasets
Upload real-world examples to:
- improve realism
- reduce synthetic drift
- inject domain-specific behavior
- augment generated data
- improve edge-case coverage
Supports:
- single-row datasets
- multi-turn conversations
- dialogue simulation
- structured conversational datasets
The system includes two separate evaluation layers that serve different purposes.
During dataset generation, each row is evaluated by an AI model (LLM).
This evaluation is configured per dataset project. You can set the evaluation_model and minimum_quality_score in the dataset settings.
How it works:
- A prompt is built asking the LLM to score the row (0–100) and return structured JSON with
score,reasoning, andissues - The configured AI provider (e.g. GPT-4o-mini, Claude, etc.) is called
- Rows that score below
minimum_quality_scoreare rejected and optionally regenerated
This is a per-row, real-time quality gate that runs automatically during generation.
After generation, you can run a dataset-level governance evaluation from the Evaluation page in the sidebar.
This evaluation is entirely deterministic and rule-based — no AI model is called.
- Open the application and click Evaluation in the sidebar
- Select a dataset version from the dropdown
- Click Run Evaluation
DatasetVersion (read-only)
↓
DatasetBatchDTO (all rows loaded)
↓
EvaluationPipeline (5 evaluators run in sequence)
↓
BatchEvaluationResultDTO (aggregated scores)
↓
DatasetEvaluationReport (persisted to database)
Each evaluator declares a weight and an applicability rule. Evaluators that are not applicable to the dataset type are skipped and excluded from scoring — they never penalise the dataset.
| Evaluator | Weight | Applicable when | What it checks |
|---|---|---|---|
TaskPerformanceEvaluator |
3 (critical) | Always | Row validity, evaluation failures, quality scores |
DistributionDriftEvaluator |
2 (critical) | Always | Duplicate rate (calibrated curve), field coverage drift |
EdgeCaseEvaluator |
2 | dataset_type ∉ classification, extraction, structured_output |
Source similarity diversity, critic feedback coverage |
ConversationQualityEvaluator |
1 | conversation_enabled = true |
Turn counts, message structure, refinement rate |
NegativeRatioEvaluator |
1 | negative_example_ratio > 0 |
Negative example ratio within configured bounds |
When an evaluator is not applicable, its report shows:
status: not_applicable
reason: <why it was skipped>
excluded from scoring: true
- Overall score = weighted average of applicable evaluators only (0–100)
- Not-applicable evaluators contribute
score = nulland are fully excluded from the average
- Passes if:
overall_score ≥ 60and no critical evaluator scores below 35 - Only
TaskPerformanceEvaluatorandDistributionDriftEvaluatorare critical — non-critical evaluators cannot hard-fail a dataset on their own
| Score | Band |
|---|---|
| 90–100 | Excellent |
| 75–89 | Strong |
| 60–74 | Good |
| 40–59 | Weak |
| 0–39 | Poor |
| Duplicate rate | Score range |
|---|---|
| 0–3% | 95–100 |
| 3–7% | 80–95 |
| 7–15% | 60–80 |
| 15–25% | 40–60 |
| 25%+ | 0–40 |
After evaluation, a DatasetEvaluationReport is saved with:
overall_score— weighted aggregate score (0–100), applicable evaluators onlypassed— boolean pass/failverdict— human-readable summary including quality band, skipped evaluators, and improvement suggestionsevaluator_scores— per-evaluator breakdown includingstatus,weight,score,summary, anddetailsduplicate_rate— detected from the distribution drift evaluatormetadata.quality_band— one of: Excellent, Strong, Good, Weak, Poormetadata.skipped_evaluators— map of evaluator → reason skipped
Once you have evaluation reports, you can compare versions and promote passing ones:
use App\Models\DatasetVersion;
use App\Services\DatasetEvaluation\DatasetEvaluationService;
$service = app(DatasetEvaluationService::class);
// Compare two versions
$result = $service->compare($baseline, $candidate);
// $result['improved'] = true/false
// Promote a passing report to a named release
$release = $service->release($report, 'v1.0.0', 'First stable release');A release can only be created if the evaluation passed.
| System | When | Who evaluates |
|---|---|---|
| Per-row quality gate (Phase 1) | During generation, automatically | LLM (your configured AI provider) |
| Governance evaluation (Phase 1.5) | On demand, via Evaluation page | Pure code (rule-based, no LLM) |
| Feedback signals (Phase 1.6) | Optional, after Phase 1.5 | Pure code (deterministic signal builder) |
The system can identify:
- weak areas
- evaluator failures
- quality bottlenecks
- low-diversity regions
- structural weaknesses
And produce:
- root-cause analysis
- structured feedback
- improvement signals
- version-to-version comparisons
Define Objective
↓
Define JSON Schema
↓
Configure Dataset Pipeline
↓
Generate Dataset
↓
Critic Stage
↓
Refinement Stage
↓
Evaluate Dataset
↓
Analyze Weaknesses
↓
Improve Next Version
Current implemented phases:
- synthetic generation
- augmentation
- schema-driven outputs
- conversation generation
- negative examples
- dataset scoring
- evaluator pipelines
- quality checks
- drift analysis
- release/version support
- failure analysis
- root-cause detection
- structured improvement signals
Planned roadmap:
Training integration:
- HuggingFace support
- model training orchestration
- model registry
- dataset → model lineage tracking
- adaptive dataset tuning
- dataset planning intelligence
- feedback-driven optimization
This project is being shared early because real-world feedback matters more than assumptions.
We are looking for:
- AI builders
- ML engineers
- Laravel developers
- Python developers
- people fine-tuning models
- teams building AI agents
- developers generating synthetic datasets
If you are experimenting with AI datasets, your feedback would be incredibly valuable.
Especially interested in:
- edge cases
- bugs
- broken assumptions
- difficult domains
- scalability feedback
- UX improvements
- evaluation accuracy
Please open an issue and share:
- what you tried to build
- what worked
- what failed
- what felt confusing
- what you expected differently
This project belongs to the Agentoom ecosystem.
Agentoom is an AI platform focused on intelligent automation, orchestration, and AI-driven workflows.
Learn more at:
This dataset engine is one of the core systems developed to support the future of Agentoom.
Feedback, bug reports, testing, criticism, and ideas are welcome.
The goal is to make dataset engineering more reliable, measurable, and improvable for everyone building AI systems.
If you break it, please tell us.








