> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bensevern.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Config matrix

> The full matrix of InferMap config options and vocabularies -- generated so it never drifts.

The exhaustive, always-current reference for InferMap (GoldenSchema) configuration.
InferMap has no single config file -- its knobs are `MapEngine` constructor
arguments plus a couple of small vocabularies -- so this page consolidates the
scattered surface into one gated reference for humans and AI agents.

<Info>
  Everything below the line is **generated from code** (`scripts/gen_config_matrix.py`)
  and verified in CI. The guidance above the line is hand-authored. See
  [Overview](/docs/infermap/overview) for a walkthrough.
</Info>

## How InferMap is configured

* **Run knobs** are `MapEngine(...)` keyword arguments (see **Runtime options**):
  `min_confidence`, `sample_size`, `scorers`, `domains`, `config_path`, etc.
* **Optional YAML** (`config_path`) can enable/weight scorers and add aliases;
  keys: `domains`, `scorers.<Name>.{enabled,weight}`, `aliases.<canonical>: [...]`.
* **Scorers** each carry a default weight (Exact 1.0, Alias 0.95, Initialism
  0.75, PatternType 0.7, Profile 0.5, FuzzyName 0.4, LLM 0.8) and combine into a
  weighted score; `min_confidence` is the accept floor.
* **Data types** (`VALID_DTYPES`) and **semantic pattern types**
  (`SEMANTIC_TYPES`) are the inference vocabularies used by the scorers.

## Runtime options

Config passed as call keyword arguments (this package has no single config model). Generated from the signature.

### `MapEngine`

| Argument              | Type          | Default | Choices / notes |   |
| --------------------- | ------------- | ------- | --------------- | - |
| `min_confidence`      | float         | `0.2`   |                 |   |
| `sample_size`         | int           | `500`   |                 |   |
| `scorers`             | any           | `None`  |                 |   |
| `config_path`         | str \\        | None    | `None`          |   |
| `return_score_matrix` | bool          | `False` |                 |   |
| `calibrator`          | Calibrator \\ | None    | `None`          |   |
| `domains`             | list\[str] \\ | None    | `None`          |   |

## CLI

Every command and its options/arguments, generated from the Typer app. `choice`-typed options list their allowed values.

| Command     | Option             | Type    | Default      | Notes                                                           |
| ----------- | ------------------ | ------- | ------------ | --------------------------------------------------------------- |
| `apply`     | `source`           | text    | **required** | Source CSV file to apply mapping to                             |
| `apply`     | `--config`         | text    | **required** | Path to mapping config YAML (required)                          |
| `apply`     | `--output`         | text    | **required** | Output CSV path (required)                                      |
| `apply`     | `--verbose`        | boolean | `False`      | Enable verbose logging                                          |
| `inspect`   | `source`           | text    | **required** | Source data to inspect (CSV path, schema YAML, etc.)            |
| `inspect`   | `--table`          | text    | `None`       | Table name for DB sources                                       |
| `inspect`   | `--verbose`        | boolean | `False`      | Enable verbose logging                                          |
| `layers`    | `source`           | text    | **required** | Source data to inspect (CSV path, schema YAML, etc.)            |
| `layers`    | `--domain`         | text    | `None`       | Domain pack to use (auto-detected when omitted)                 |
| `layers`    | `--table`          | text    | `None`       | Table name for DB sources                                       |
| `layers`    | `--verbose`        | boolean | `False`      | Enable verbose logging                                          |
| `map`       | `source`           | text    | **required** | Source data (CSV path, DataFrame, DB URI, schema YAML)          |
| `map`       | `target`           | text    | **required** | Target data (same variety of inputs)                            |
| `map`       | `--table`          | text    | `None`       | Optional table name for DB sources                              |
| `map`       | `--required`       | text    | `None`       | Comma-separated required target field names                     |
| `map`       | `--schema-file`    | text    | `None`       | Path to schema YAML file                                        |
| `map`       | `--format`         | text    | `'table'`    | Output format: table, json, or yaml                             |
| `map`       | `--output`         | text    | `None`       | Save mapping config to this YAML file                           |
| `map`       | `--min-confidence` | float   | `0.2`        | Minimum confidence threshold (default 0.2, was 0.3 before v0.3) |
| `map`       | `--verbose`        | boolean | `False`      | Enable verbose logging                                          |
| `map`       | `--debug`          | boolean | `False`      | Enable debug logging                                            |
| `mcp-serve` | `--transport`      | text    | `'stdio'`    | Transport: 'stdio' or 'http'                                    |
| `mcp-serve` | `--host`           | text    | `'0.0.0.0'`  | Host for HTTP transport                                         |
| `mcp-serve` | `--port`           | integer | `8100`       | Port for HTTP transport                                         |
| `validate`  | `source`           | text    | **required** | Source data to validate (CSV path, etc.)                        |
| `validate`  | `--config`         | text    | **required** | Path to mapping config YAML (required)                          |
| `validate`  | `--required`       | text    | `None`       | Comma-separated required field names                            |
| `validate`  | `--strict`         | boolean | `False`      | Exit code 1 if required fields unmapped                         |
| `validate`  | `--verbose`        | boolean | `False`      | Enable verbose logging                                          |

## MCP tools

5 MCP tool(s) exposed by `infermap.mcp.server` -- the programmatic / agent surface. Config-bearing tools take the same knobs as above.

| Tool       | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `apply`    | Apply a saved mapping config to a source CSV, renaming columns according to the mapping and writing the result to an output file.                                                                                                                                                                                                                                                                                                                                                                                              |
| `inspect`  | Inspect a data source — show fields, types, sample values, null rates, unique rates, and statistics.                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `layers`   | Detect the identity layers (parties) a data source refers to — e.g. a loan tape's lender AND borrower, or a claims file's patient, provider and payer. Distinct from domain detection, which returns one industry vertical for the whole source. Each layer is the group of columns describing one party, with its kind (person/organization/asset/place), a score, and the evidence behind it. Unrecognised parties are reported with role 'unknown' rather than dropped; columns belonging to no party land in 'unassigned'. |
| `map`      | Map source columns to target schema using a weighted scorer pipeline with optimal 1:1 assignment. Returns mappings with confidence scores and human-readable reasoning.                                                                                                                                                                                                                                                                                                                                                        |
| `validate` | Validate that a source file's columns satisfy a saved mapping config. Reports missing source columns and unmapped required fields.                                                                                                                                                                                                                                                                                                                                                                                             |

## Enumerated vocabularies

Allowed values for the `str`-typed / registry-backed fields above.

### Data types

*`VALID_DTYPES` -- `FieldInfo.dtype`.*

| Value      | Meaning         |
| ---------- | --------------- |
| `boolean`  | True/false.     |
| `date`     | Calendar date.  |
| `datetime` | Date and time.  |
| `float`    | Decimal number. |
| `integer`  | Whole number.   |
| `string`   | Text.           |

### Semantic pattern types

*`SEMANTIC_TYPES` -- pattern-type detection.*

| Value      | Meaning          |
| ---------- | ---------------- |
| `currency` | Currency amount. |
| `date_iso` | ISO-8601 date.   |
| `email`    | Email address.   |
| `ip_v4`    | IPv4 address.    |
| `phone`    | Phone number.    |
| `url`      | Web URL.         |
| `uuid`     | UUID.            |
| `zip_us`   | US ZIP code.     |

## Environment variables (index)

1 `INFERMAP_*` runtime knob(s) read by the package, scanned from source so this is complete. Grouped by area:

* **NATIVE** (1): `INFERMAP_NATIVE`

## See also

* [Overview](/docs/infermap/overview).
