Skip to content

Commit e2a1093

Browse files
Nathan ParkerNathan Parker
authored andcommitted
multi-stage matching upgrades
1 parent 43b475c commit e2a1093

8 files changed

Lines changed: 1196 additions & 23 deletions

File tree

docs/CLI/index.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,8 +934,14 @@ You can also explicitly specify the domain using the `--domain` option.
934934
- `--location TEXT` - Filter by location (city, country, or region)
935935
- `--capabilities TEXT` - Comma-separated list of required capabilities
936936
- `--materials TEXT` - Comma-separated list of required materials
937-
- `--min-confidence FLOAT` - Minimum confidence threshold (0.0-1.0, default: 0.7)
937+
- `--min-confidence FLOAT` - Minimum confidence threshold (0.0-1.0, default: 0.3)
938938
- `--max-results INTEGER` - Maximum number of results (default: 10)
939+
- `--max-depth INTEGER` - BOM matching depth (0 = single-level, >0 = nested component matching)
940+
- `--auto-detect-depth` - Auto-enable nested matching when manifest contains nested components
941+
- `--allow-facility-combinations` - Enable aggregated multi-facility matching for manufacturing
942+
- `--max-facilities-per-solution INTEGER` - Cap facilities used in one composite solution (default: 3)
943+
- `--combination-strategy [greedy]` - Composite solver strategy
944+
- `--no-alternative-solutions` - Return only the top composite solution
939945
- `--output, -o TEXT` - Output file path
940946
- `--use-llm` - Enable LLM integration for enhanced matching
941947
- `--llm-provider [anthropic|openai|google|azure|local]` - LLM provider
@@ -969,6 +975,12 @@ ohm match requirements my-design.okh.json --min-confidence 0.9
969975
# Match with LLM enhancement
970976
ohm match requirements my-design.okh.json --use-llm --quality-level professional
971977

978+
# Composite matching across multiple facilities
979+
ohm match requirements my-design.okh.json --allow-facility-combinations --max-facilities-per-solution 3
980+
981+
# Composite matching returning only best solution
982+
ohm match requirements my-design.okh.json --allow-facility-combinations --no-alternative-solutions
983+
972984
# Save results to file
973985
ohm match requirements my-design.okh.json --output matches.json
974986
```
@@ -980,6 +992,7 @@ The command displays matching facilities with:
980992
- Confidence score
981993
- Match type (manufacturing or cooking)
982994
- Location (if available)
995+
- Structured summary metadata (`match_summary`, `coverage_gaps`) in JSON mode
983996

984997
**Note:** Facility IDs are displayed as full UUIDs. Use the full ID with `ohm okw get` to retrieve facility details.
985998

docs/api/routes.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,13 @@ The endpoint automatically detects the domain from the input data:
11511151

11521152
// Optional Matching Parameters
11531153
"min_confidence": 0.5,
1154-
"max_results": 10
1154+
"max_results": 10,
1155+
1156+
// Facility-combination controls (API-first)
1157+
"allow_facility_combinations": false,
1158+
"max_facilities_per_solution": 3,
1159+
"return_alternative_solutions": true,
1160+
"combination_strategy": "greedy"
11551161
}
11561162
```
11571163

@@ -1218,6 +1224,11 @@ The endpoint returns a wrapped response with the following structure:
12181224
- `total_solutions`: Total number of matching solutions found
12191225
- `matching_metrics`: Breakdown of match types
12201226
- `validation_results`: Validation results for each solution
1227+
- `match_summary`: Structured summary object for API consumers (mode, counts, coverage, and combination flags)
1228+
- `coverage_gaps`: Uncovered process requirements, if any
1229+
- `match_summary_text`: Human-readable rendering of `match_summary` (for logs and quick inspection)
1230+
- `match_summary.coverage_gap_counts`: Multiplicity of each uncovered requirement
1231+
- `match_summary.warnings`: Non-fatal warnings (e.g. composite fallback to single-facility matching)
12211232

12221233
**Status:** **Fully Implemented** - **Complete matching engine with Azure Blob Storage integration**
12231234

0 commit comments

Comments
 (0)