TEST-CASES.md•7 kB
# Test RFQ Examples
This file contains sample RFQ requests you can use to test the system.
## How to Use These Tests
### Option 1: Using curl (Git Bash or PowerShell)
```bash
curl -X POST http://localhost:3789/mcp/invoke/evaluateRfpAndDraftQuote \
-H "Content-Type: application/json" \
-d @test-rfq.json
```
### Option 2: Using PowerShell
```powershell
$body = Get-Content test-rfq.json -Raw
Invoke-RestMethod -Uri http://localhost:3789/mcp/invoke/evaluateRfpAndDraftQuote `
-Method Post -Body $body -ContentType "application/json"
```
### Option 3: Edit test-rfq.json and use quick-test.bat
Just modify the test-rfq.json file and run the quick-test batch file.
---
## Test Case 1: High Similarity Match (Expected: 85%+ match)
Should match Q-1001 in the database (6061-T6 aluminum, CNC, anodize)
```json
{
"rfp": {
"rawText": "We need 200 pieces of 6061-T6 aluminum brackets, CNC machined with anodized finish. Tolerance: +/-0.005 inches. Delivery needed by February 28, 2025.",
"qty": 200,
"contactEmail": "buyer@acme.com",
"customerName": "Acme Manufacturing"
}
}
```
**Expected Results:**
- High confidence match
- ~$12.50/unit cost estimate
- ~21 day lead time
- Match with Quote Q-1001
---
## Test Case 2: Medium Similarity (Expected: 70-85% match)
Similar material, different processes
```json
{
"rfp": {
"rawText": "Need 75 units of 6061 aluminum plates, CNC milled and deburred. Standard tolerances +/-0.010. No special finish required.",
"qty": 75,
"contactEmail": "engineer@precision.com",
"customerName": "Precision Parts Co"
}
}
```
**Expected Results:**
- Medium confidence
- Match with Q-1234 (similar aluminum CNC work)
- ~$18-20/unit cost estimate
---
## Test Case 3: Stainless Steel with Welding (Expected: Match Q-0832)
```json
{
"rfp": {
"rawText": "Request quote for 30 stainless steel 304 assemblies. Laser cut, TIG welded, and passivated. Tight tolerances +/-0.010. Marine application.",
"qty": 30,
"contactEmail": "orders@marine.com",
"customerName": "Marine Systems Inc"
}
}
```
**Expected Results:**
- Medium-high confidence
- Match with Q-0832 (304 SS, laser, weld, passivate)
- Higher cost due to welding (~$45-50/unit)
- Longer lead time (~35 days)
---
## Test Case 4: High Volume Aluminum (Expected: Match Q-0955)
```json
{
"rfp": {
"rawText": "Quote needed for 500 aluminum 6061 components, CNC machined with powder coat finish. Color: RAL 7035. Standard tolerances acceptable.",
"qty": 500,
"contactEmail": "purchasing@buildtech.com",
"customerName": "BuildTech Solutions"
}
}
```
**Expected Results:**
- High confidence match
- Match with Q-0955 (high volume aluminum + powder coat)
- Lower unit cost due to volume (~$8-9/unit)
- 28 day lead time
---
## Test Case 5: Low Similarity - New Material (Expected: <70% match)
```json
{
"rfp": {
"rawText": "We need 100 titanium Grade 5 brackets, CNC machined with precision grinding. Aerospace tolerances +/-0.002. AS9100 certification required.",
"qty": 100,
"contactEmail": "supply@aerospace.com",
"customerName": "Aerospace Components LLC"
}
}
```
**Expected Results:**
- Low confidence (new material: titanium)
- No strong historical matches
- Higher cost estimate due to material
- Requires engineer review before quoting
---
## Test Case 6: Minimal Information (Expected: Low confidence)
```json
{
"rfp": {
"rawText": "Need some metal parts. About 50 pieces. Let me know cost and time.",
"qty": 50,
"contactEmail": "info@startup.com"
}
}
```
**Expected Results:**
- Low confidence (insufficient detail)
- Generic cost estimate
- System will request more information
- Requires engineer clarification
---
## Test Case 7: Marine Grade Stainless (Expected: Match Q-1567)
```json
{
"rfp": {
"rawText": "RFQ for 25 units 316 stainless steel fittings. CNC machined, passivated, and polished to mirror finish. Marine grade corrosion resistance required. Tolerances +/-0.005.",
"qty": 25,
"contactEmail": "marine@offshore.com",
"customerName": "Offshore Marine Equipment"
}
}
```
**Expected Results:**
- High confidence match
- Match with Q-1567 (316 SS, passivate, polish)
- Premium pricing (~$52/unit) due to 316 grade and polishing
- 21 day lead time
---
## How to Interpret Results
### Confidence Levels
- **High (≥85%)**: We've done very similar work before. Estimate is reliable.
- **Medium (70-85%)**: Similar to past work but with differences. Review recommended.
- **Low (<70%)**: New type of work or insufficient information. Engineer review required.
### Match Score Components
The system evaluates similarity across:
1. **Material** (35% weight): Exact, family, or partial material match
2. **Processes** (30% weight): Overlap in manufacturing processes
3. **Quantity** (20% weight): Same or adjacent quantity ranges
4. **Tolerances** (10% weight): Precision requirement alignment
5. **Finish** (5% weight): Surface treatment matching
### Cost Estimate
Includes:
- Material cost
- Processing cost (CNC time, etc.)
- Labor cost
- Tooling amortization
- Overhead (15%)
- Margin (20%)
- Contingency (10% for low confidence quotes)
### Lead Time Factors
Based on:
- Material procurement time
- Setup and tooling time
- Run time (cycle time × quantity)
- QA and inspection
- Finishing processes
- Shipping time
---
## Creating Your Own Test Cases
Edit test-rfq.json with your own data. Include:
**Required:**
- `rawText`: Description of what you need
- `qty`: Quantity needed
**Optional but Recommended:**
- `contactEmail`: Email address
- `customerName`: Customer name
- `dueDate`: Required delivery date (ISO format: YYYY-MM-DD)
- `partNumber`: Part number if available
- `material`: If known
- `processes`: Array of process names
**Good rawText descriptions include:**
- Material specification (6061-T6, 304 SS, etc.)
- Manufacturing processes (CNC, laser, weld, etc.)
- Tolerances (+/-0.005, standard, precision, etc.)
- Surface finish (anodize, powder coat, polish, etc.)
- Special requirements (aerospace, marine, etc.)
---
## Troubleshooting Test Results
### "No similar quotes found"
- Check that data/quotes.json has content
- Try with materials in the sample database (6061, 304 SS, aluminum)
- Make sure the server is running
### "Low confidence" when expecting high
- Add more detail to rawText (material grade, processes)
- Check material name spelling (6061-T6, not 6061T6)
- Verify processes match database (CNC, anodize, etc.)
### Cost estimates seem off
- Review config.ts for material prices
- Check machine hour rate ($80/hr default)
- Verify overhead and margin percentages
- Consider quantity range effects
### Server errors
- Check that server is running (http://localhost:3789/health)
- Verify JSON syntax is valid
- Look at server console for error messages
- Try the quick-test.bat for automated testing
---
**Happy Testing!** 🧪
For more information, see the main README.md or QUICKSTART.md files.