Quote-Matching Pipeline¶
Match incoming customer quote-request emails against a large, relationship-heavy product catalog (example domain: plasterboard / drywall systems) and produce a draft reply that a salesperson reviews and sends.
Start here¶
-
Chapter-by-chapter: connect to your infrastructure, initialize the database, pull models, run the core, and wire the n8n workflow.
-
The two load-bearing decisions and how the catalog graph, extraction contract, rules engine, and validation fit together.
-
The n8n flow, model placement, and the open questions carried over from planning.
The core idea¶
Vector search finds the entry point; the graph delivers the relationships. Embeddings pick which system an email is about; the exact bill of materials is read from SQL relation tables, never guessed by a model.
Thin model, thick scaffold. The intelligence lives in the structure around the LLM (enums, rules tables, checklists, validation), not the model — which keeps the system auditable and makes self-hosted models viable.
The pieces¶
| Service | Role | You run it |
|---|---|---|
| Postgres | catalog graph + card embeddings (pgvector) | separately |
| Ollama | local LLM + embedding backend (dev) | separately |
| n8n | orchestration | separately |
This repository is the deterministic core (catalog graph, card generator, extraction contract, rules engine, matching, validation, draft assembly) plus the docs you're reading. The two LLM steps and the hybrid-search service wire around it — see the Tutorial.
Sample data is illustrative
The bundled catalog (W111/W112 systems, ratings, BOM quantities) is plausible-but-illustrative placeholder data, not real manufacturer or standards data. Replace it and have a domain expert sign off on the rules table before production use.