Structuring large promptfoo configurations before one file becomes unmanageable
Splitting one growing promptfoo config into separate prompt, provider and test files, with shared defaults kept in one place, lets each team review and change its own suite without reading the whole file. The change is about ownership and review, and it should not alter what gets evaluated. A team usually needs this when its test count keeps climbing, when several people edit the same file for different products, or when the same provider or assertion block has been copied into many places until the copies drift apart. Each drifted copy is a silent difference in what a suite actually tests, and that difference is hard to spot in one long diff.
promptfoo runs on your machine and sends requests straight to the model endpoint you configure, so every split file that declares a provider also declares where traffic goes and which credentials it uses. Decide the boundaries before moving anything: by owning team, by application, or by model under test. Put settings that every suite must share, such as a common defaultTest block, in one shared file, and confirm which suites inherit them. Changes to shared files are cross-team changes. A default edited in one place changes every suite that inherits it, so each affected team should review those edits. Keep API keys in environment variables so the split files can be reviewed and committed without carrying secrets.
Verify the split with a baseline run. Before splitting, run the existing config and save the results. After splitting, run the same tests against the same provider settings and compare three things: the test counts, the assertion outcomes and the prompt text each provider receives. Any difference in those points signals a test that was dropped, duplicated or inherited a different default. promptfoo is MIT-licensed and can be driven from its CLI, as a library or in CI/CD pipelines, and the same comparison applies in each case. Confirm that the baseline and the post-split run use the same model version and settings, because model changes can alter outcomes even when the config is identical.
How prompt, provider and test files join into one promptfoo run
The diagram starts at the root config, which lists the prompt files, provider definitions, a shared defaults file and one test file per team. Promptfoo loads these together and runs them as a single eval on a developer machine or CI runner. Provider credentials stay in local environment variables and are read only when a provider loads. The model provider endpoint sits outside that boundary and receives only the requests the run sends. Check that each team edits only its own test files, that the root config is the only file that lists them, and that no keys are committed to version control.
Local files feed one eval run that alone calls the provider endpoint.
Structuring large promptfoo configurations: which pattern fits which team size
This table compares four ways to split a growing promptfoo configuration, from one file to a shared base that suites extend. Read each row for the team size it suits, what it costs to keep consistent, and where it usually breaks. Confirm the exact file-reference and extension syntax in the promptfoo documentation for the version you pin, since the latest release is 0.124.1, published 8 October 2026.
| Pattern | When it fits | Maintenance cost | Main risk |
|---|---|---|---|
| Single config file | One developer or one suite with a small set of prompts, providers and tests | Low at first, but every change touches one file that grows with each suite | Merge conflicts in one long file and defaults copied into every test block |
| Split by artifact type | One group owns prompts, another owns providers, and domain experts edit tests | Moderate, since a prompt change often needs matching test or provider edits | Hidden overrides when a shared provider file changes results for suites nobody reviewed |
| Split by team suite | Several teams run their own apps or red team scopes and merge rarely | Higher, because each suite needs its own config, owner and review path | Duplicated defaults drift apart, so the same assertion scores differently across suites |
| Shared base file that suites extend | Many suites sharing one provider set, judge model and default assertions | Highest up front, since the base file needs an owner and a versioned change process | A suite silently replaces a base default, and reviewers never see the override |
| Pinned version check | Any pattern that references other files or uses file extensions | Recheck the syntax on every version upgrade before changing the layout | Copying syntax from older examples; latest release is 0.124.1 (8 October 2026) |
Who edits which files when structuring large promptfoo configurations
The platform or AI engineering team owns the shared plumbing that every suite depends on. Changes here can alter results for every team, so this group sets the rules, reviews what other teams bring in and keeps the pipeline stable. Their work is mostly one-time setup followed by controlled change, not day-to-day test writing.
- Root config and providers: Maintain the top-level promptfoo config, including the
providersblock, the references to credentials stored outside the repository and thepromptsentries that point at shared templates. - Shared defaults: Own
defaultTestand any shared assertion files that every suite inherits. A change here reaches every suite on its next run, so treat it as a release. - CI wiring: Own the pipeline job that calls promptfoo, the pass-rate gate and the location where reports are stored.
- Review of team changes: Review pull requests that add providers, change shared defaults or alter how suites load files from outside their own folder.
- Upgrades: Pin the promptfoo version used in CI and run the existing suites against a candidate version before rolling it out to every team.
Before merging a root config change, confirm that at least one suite from each team still runs and produces the same pass and fail results it produced before the change.
Product and domain experts know what a correct answer looks like, so they own the test data. They work in the spreadsheet or CSV files that feed a suite and should not need to read the surrounding configuration to do their job. Their edits are frequent and small, which is why the boundaries around them need to be explicit.
- Test rows: Add, correct and retire cases in the CSV or spreadsheet that feeds a suite, keeping the variable column names exactly as the prompt template expects them.
- Expected outputs: Update reference answers and expected values when the correct domain answer changes, with a short note in the change explaining why.
- Free to change: Test prompts, sample inputs and reference wording, as long as the column headers and variable names stay the same.
- Needs review: Adding a column that a suite must read, or any assertion that encodes a new grading rule, goes through the team lead and then the platform owner.
- Never edit directly: The root config, provider definitions,
defaultTestand the file paths that suites reference. Ask the platform owner for those changes.
Before asking for a merge, check that the changed rows still run by having the team lead execute the affected suite locally and confirm the expected outputs match the agreed answers.
Team leads own the per-team suites. A suite file lists the prompts, test data and assertions that matter for one product area, and the team lead decides which checks apply to it. Their freedom is real within their own folder, but every suite runs inside a shared structure, so their decisions need to stay inside the limits the platform team sets.
- Suite files: Own the per-team config that lists prompts, tests and assertions for the product area, and keep it in the team's own folder.
- Assertions: Choose and tune assertions for the team's cases, including overrides of shared defaults that apply only inside the team's own suite.
- Test data references: Point the suite's
testsentries at the team's data files using relative paths, so the suite still loads when another team's folder changes. - Needs platform review: Any new provider, any change to shared templates, and any file reference that points outside the team folder.
- Never edit directly: The root config, shared defaults and shared assertion files that every suite inherits. Propose those changes to the platform owner instead.
Before requesting review, check that the suite runs on its own and also runs as part of the combined pipeline, since a suite that passes alone can still fail once shared defaults are applied.
Splitting prompts, providers and tests without changing results
Extract in a fixed order: prompts first, then providers, then tests. Each move changes one kind of input, so any difference in results can be traced to the step that caused it. Moving prompts is the lowest-risk change because prompt text is copied into a file and referenced from the main config. Providers come next, since they carry endpoints, model names and options that the tests depend on. Tests move last because they depend on everything else and are the largest set to verify. Before the first edit, run the untouched configuration and save its full output, including the list of executed test cases and each assertion result. That saved run is the reference every later step is checked against, so do not skip it even when the suite looks small.
Compare each step against that baseline on three things: the number of test cases executed, the pass and fail counts, and the assertions attached to each test. A stable pass rate can hide a problem. If a test file stops loading, the run may finish with fewer cases and still look healthy, so the executed count is the first thing to check. Changed assertions matter for the same reason. A threshold, regex or judge rubric that drifts during a move changes the verdict without any change to the prompt. Compare per-test results as well as the summary line, export the output in the same format each time so a plain diff is meaningful, and commit each step separately so a regression can be reverted on its own.
Relative file paths are a common source of silent change. Depending on the promptfoo version, paths in a config may resolve against the config file's directory or against the directory the command runs from, so the same prompts/ reference can load different files from different locations. Confirm how your version resolves paths before the first move, and test it with a deliberately wrong reference that should fail. Run the command from the same directory in local work, in CI and on any shared runner, and record that directory in the runbook. After each step, check that the loaded prompt and provider files match the baseline by name and content, and do not rely on item counts alone.
Setup sequence for splitting an existing promptfoo config
This sequence splits one promptfoo config into team-owned folders without changing what gets evaluated. Each step closes with a check you confirm before moving on, and the baseline output from the first run is the reference for every later comparison. The result is a shared base file, per-team suites and a CI check that runs against the folders each team owns.
Inventory the current config
Open the existing promptfoo config and count the prompts, providers and test cases it defines, including any tests loaded from external files. The engineer who owns the config does this, ideally with a second engineer reading the results. You are done when the counts are written in a short inventory note and each test case can be traced to a team or use case. Keep the note on the working branch so the split can be checked against it later.
Pin promptfoo and Node.js
Install a pinned promptfoo release, the npm package at version 0.124.1, on Node.js 22.22.0 or newer. Confirm the runtime with
node --versionon your machine and on the CI runner, and confirm the package version withnpx promptfoo --version. Record both versions in the repository so every team runs the same evaluation engine. Move on only when one eval command runs on your machine and on the CI runner with the same promptfoo version.Run and save a baseline eval
Run the unchanged config once on the pinned version and save the full output, including each row's prompt and provider names and the pass and fail counts. The config owner does this before any file moves. You know the baseline is usable when a second run on the same commit reports the same pass and fail counts, allowing for the model variation you have already documented. Store the output outside the folders you are about to change.
Extract prompts and providers into files
Move each prompt and each provider definition into its own file, then reference that file from the config by path. Keep the prompt text identical to the original so that any change in results can be traced to the move itself. A second engineer should compare each new prompt file against the original block in the config. You are done when the config loads and the prompt and provider names match the inventory note.
Split test cases by team
Move test cases into one file per team folder, grouping them by the product area or owner who maintains the expected answers. Keep variable names and assertion types consistent across files so a reviewer can read one suite without opening the others. Count the test cases across all team files and compare the total with your inventory note. Any mismatch means a case was dropped or duplicated, and you fix it before continuing.
Add one shared base file
Create a single base file for the defaults every suite needs, such as a shared prompt wrapper, default provider settings or assertions that apply to all tests. Each team config then pulls in the base file instead of copying those defaults. Load each team config and read the resolved settings to confirm they match the baseline behavior. Also confirm that no team file still repeats a default that now lives in the base file.
Rerun and compare against the baseline
Run every team suite on the pinned version and compare the results with the saved baseline output, matching rows by test name. Differences should be explained by the split itself, such as a renamed file or a test that moved between folders. Investigate any change in pass or fail status before going further. You are done when every difference has a written reason recorded in the change description.
Add a CI check and code owners
Add a CI job that runs the eval for each team folder on the pinned version, and add a code-owner file (CODEOWNERS on GitHub) that assigns each team folder to its maintainers. Request review from the platform owner for any change to the shared base file. Confirm that the job fails on a deliberately broken assertion in a test branch, then discard that change. The sequence is complete when a change inside one team folder runs only that team's job and requests the right reviewers.
Keeping secrets and sensitive test data out of shared config files
Provider API keys should never appear in the YAML files that define prompts, providers and tests. Keep them in environment variables on the machine that runs the eval, or in the CI secret store for pipeline runs, and let the config refer to them by name. Add local .env files to .gitignore before the first commit. If a key has already been committed, rotate it and check the repository history, because deleting it from the latest commit does not remove it from earlier ones. Keep provider settings in the shared defaults file free of secret values, so each team's suite can be reviewed in version control without exposing credentials. Confirm the environment variable reference syntax for each provider in the promptfoo documentation before you standardize it across suites.
Promptfoo runs on the machine where you start it, and its introduction states that evals talk directly with the LLM. Test variables, the prompts rendered from your templates and the model responses travel from your machine to every provider listed in the config. That includes any model used as a grader in an assertion and any provider used to generate test cases, so confirm which endpoints appear in each file before a suite is shared. A provider entry in a shared defaults file sends that team's data to that endpoint on every run. Ask your security team to approve each endpoint for the data class in the suite, and load sensitive datasets at run time from storage your organization already approves, keeping copies out of shared configs.
Shared results need their own decision. The self-hosted promptfoo app is an Express server with a local SQLite database that cannot be shared across replicas. It has no RBAC, horizontal scaling, built-in authentication or SSO, and the self-hosting documentation does not recommend it for production use. Treat it as a single-instance tool for a small group unless your review finds otherwise. If your teams need shared access, the Enterprise edition lists team sharing, teams-based access control and SSO, so compare those features with your access model before rollout. Ask the vendor to confirm where each edition stores results, since that determines what an export contains and who can reach it.
What to confirm before relying on a split layout
Five limits decide whether a split promptfoo layout holds in your environment. They cover the runtime, the self-hosted server, the paid tier, the free allowance and file path handling. Check each one against the release and deployment you plan to use before you move shared defaults and per-team suites into separate files.
Node.js version for the pinned release
The minimum Node.js version belongs to the promptfoo release you pin, so check it before you split files. The npm release 0.124.1, published on 8 October 2026, requires Node.js 22.22.0 or newer. Confirm that the same runtime exists on every developer machine and CI runner that loads the shared prompt, provider and test files.
npm package pageSelf-hosted server limits
The self-hosted server stores data in a local SQLite database that cannot be shared across replicas. It also has no RBAC, no horizontal scaling and no built-in authentication or SSO, and the documentation does not recommend it for production use. If several teams will open split suites through one server, plan a single instance, confirm how the database is persisted and backed up, and keep release gates in your pipeline.
Self-hosting docsTeam sharing and SSO tier
Team sharing, teams-based access control and SSO belong to the paid Enterprise tier, sold at custom pricing. If per-team suites need shared visibility or role separation on the server, that tier decision comes before any configuration work. Ask for the written scope and confirm which edition provides each access control your organization requires before you assign ownership of team folders.
Pricing pageCommunity tier allowance
The free Community edition includes all LLM evaluation features, all model providers and integrations, and red teaming with 10k probes per month, with community support. Split suites can stay on Community only if the planned red team volume fits that monthly allowance across every team. Confirm whether the allowance is counted per account or per team before you schedule scans for several suites at once.
Red teaming docsFile reference syntax and paths
A split layout depends on how the main config points to its prompt, provider and test files. Syntax and path resolution are version-specific, so a reference that works in one release can resolve differently in another. Check the file-reference syntax in the documentation for your pinned version, then run the config from the CI working directory and from a developer checkout to confirm every file loads.
What teams ask before restructuring a promptfoo config
What drives the cost of splitting a promptfoo config into smaller files?
The main drivers are how many suites you run, how many teams own them, how much configuration is repeated, and how strict the baseline comparison must be. Each suite needs its own references to prompts, providers and tests, so more suites mean more files to create and review. Teams that copy the same defaults into every config multiply the work, because a change to a provider or assertion then has to be made in several places. A strict baseline, where every result must match the current run, takes longer to set up than a check that compares pass rates. Most of the cost is people time for designing the file layout, moving tests, and verifying the results. If you request a quote, ask for the effort split between discovery, file moves, baseline runs and review, and whether each part is one-time or recurring.
How long does it take to restructure a large promptfoo config?
The duration depends mainly on the size of the existing suite, and you need to supply that information before anyone can estimate it. Count the prompts, providers, test cases, assertions and shared default blocks, and note how many teams read the results. A small suite with few tests can usually be split in a short engagement, while a large suite with many hand-maintained test blocks needs more time to move, verify and re-run. A partner should give a timeline in the written scope only after reviewing the config, the test sources and the team ownership map. Ask for the milestones the timeline depends on, including the baseline run, the comparison and the sign-off review.
What does a team need to provide for a config restructuring project?
Plan to provide access to the repository that holds the config, the CI system that runs evals, and the provider accounts that evals call. Each must allow the work to run a baseline before and after the change. You also need to name one owner per team who can approve the file layout, decide which tests belong to which suite, and sign off on results. Access should follow least privilege, so ask whether each provider can use a scoped key or service account for evals and where secrets will be stored. If evals call a model endpoint, confirm rate limits and budget with the account owner before the baseline run. Ask the partner to list every access item in the written scope so nothing surfaces midway through the work.
Can a team restructure its promptfoo config without outside help?
Yes, a team with a small suite can usually do it alone, provided it runs a baseline before changing anything and reviews the result. Start by recording the current pass and fail results for every test. Then move prompts, providers and tests into separate files, keep shared defaults in one place, and run the suite again. Compare the new results with the baseline and investigate any difference before merging. Outside help is more useful when the suite is large, several teams share it, or the CI pipeline and provider accounts are hard to access. A fixed-scope review from a partner can cover the baseline comparison if your team lacks the time to run and check it.
Does splitting a promptfoo config change the eval results?
It should not, provided the baseline comparison passes. Splitting files changes how the configuration is organized, while the tests and assertions stay the same. Still, check it. Run the original config and the split config against the same provider settings, then compare the test count, each test's variables, each assertion and every pass or fail result. Watch for defaults that apply in one file and silently miss another, prompts loaded from the wrong path, and provider options overridden by a shared block. Model outputs can vary between runs, so keep settings stable and treat small differences in model-graded scores as a prompt to investigate before merging.
When should a team move from the free promptfoo version to Enterprise?
Move to Enterprise when shared access control becomes a requirement, such as role-based permissions, team sharing or single sign-on across suites. The self-hosted promptfoo server uses a local SQLite database that cannot be shared across replicas, and it has no RBAC, horizontal scaling, built-in authentication or SSO. Its documentation says it is not recommended for production use. Enterprise adds team sharing, teams-based access control and SSO, custom roles and permissions, and priority support with SLAs, at custom pricing. The On-Premise edition runs that functionality on your infrastructure with complete data isolation and a dedicated deployment engineer. Review the promptfoo pricing page and confirm current terms with the vendor before deciding.
How DeployOpen works on this
DeployOpen plans and implements promptfoo configuration restructuring inside your own infrastructure, so the split prompt, provider and test files, shared defaults and team suites are designed around how your teams run evaluations. Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts. Ongoing support is available as a retainer.
How we scope
- The written scope lists which prompt, provider and test files are split out and where each file lives.
- Teams confirm which defaults are shared across suites and which values each team may override.
- The scope names the per-team suites, their owners, and the commands that run them after the restructure.
How we build
- Start by mapping the existing config into prompts, providers, defaults and test blocks before moving anything.
- Move one suite at a time and run the eval after each step to confirm results match the original run.
- Keep file paths relative so the same config can load on a laptop, in CI and on a self-hosted server.
How we hand over
- Handover includes the final file tree, plus a map of which suite uses which shared defaults and overrides.
- Team owners receive a short guide on adding a suite, editing a shared default and running one team's tests.
- Before handover, DeployOpen reruns the full suite set and records results beside the original baseline.
How we support
- Retainers can cover updates to promptfoo versions, checked against the Node.js version the release requires.
- Support can include adding new team suites and reviewing shared defaults as the configuration grows.
- Ask what response time and support hours a retainer includes, since these are set in the written agreement.

