How costpilot-civil/lv-price-engine works
lv-price-engine matches GAEB tender positions to supplier commodities and recommends material prices, with uncertain matches flagged for review. The main runtime loads positions and price candidates, builds retrieval text, runs vector and BM25 retrieval, fuses and reranks candidates, assigns a match status, and exports results. A separate documented material-understanding capability identifies material types and extracts configured attributes; the sampled matching pipeline does not show it integrated into that runtime. Source evidence is strongest for the main matching and startup flow; unsampled subsystem links are omitted or marked unverified.
Main entry points: match_pipeline.py Match Pipeline · main.py Application Startup · repository.py Candidate Repository · db_article_importer.py Article Importer
Components 26
Position Input
- GAEB Loader
src/ingestion/gaeb_lv_loader.py - LV Positions
src/models/lv_position/lv_position.py
Price Catalog
- Artikel XML Parser
src/db_article_importing/db_article_xml_parser.py - Parsed Articles
src/db_article_importing/db_article_models.py - Article Importer
src/db_article_importing/db_article_importer.py - PostgreSQL
database/schema.sql - DB Connector
src/database/connector.py - Candidate Repository
src/database/repository.py - Commodity Candidates
src/models/database_candidate/commodity_candidate.py
Material Understanding
- Material Config Loader
src/material/config_loader.py - Material Registry
src/material/registry.py - Material Classifier
src/material/classifier.py - Attribute Extractor
src/material/attribute_extractor.py - Material Extractor
src/material/material_extractor.py - Material Templates
src/models/material/material_template.py
Candidate Matching
- Match Pipeline
src/matching/match_pipeline.py - Text Builder
src/text_processing/text_builder.py - Vector Retrieval
src/retrieval/vector_retriever.py - BM25 Retrieval
src/retrieval/bm25_retriever.py - RRF Fusion
src/fusion/rrf_fusion.py - Cross-Encoder Reranker
src/ranking/cross_encoder_reranker.py - Inference Models
src/models/inference_model/model_loader.py - Match Results
src/models/results/match_result.py
Results
- Result Exporter
src/exporter/result_exporter.py - Application Startup
main.py
Other components
- Estimator
Connections 30
- Estimator → GAEB Loader: provides file
README.md - GAEB Loader → LV Positions: parses positions
src/ingestion/gaeb_lv_loader.py - Artikel XML Parser → Parsed Articles: produces parsed data
src/db_article_importing/db_article_xml_parser.py - Article Importer → Candidate Repository: imports articles
src/db_article_importing/db_article_importer.py - Article Importer → Artikel XML Parser: parses XML
- Candidate Repository → DB Connector: connects through
src/database/repository.py - Candidate Repository → PostgreSQL: reads and writes
src/database/repository.py - Article Importer → Parsed Articles: uses parsed records
- Candidate Repository → Commodity Candidates: builds candidates
src/database/repository.py - Material Config Loader → Material Templates: creates templates
src/material/config_loader.py - Material Registry → Material Templates: stores templates
src/material/registry.py - Material Classifier → Material Registry: looks up materials
src/material/classifier.py - Material Extractor → Material Classifier: identifies material
src/material/material_extractor.py - Material Extractor → Attribute Extractor: extracts attributes
src/material/material_extractor.py - Material Extractor → LV Positions: analyzes position text
- Application Startup → Candidate Repository: loads candidates
main.py - Application Startup → GAEB Loader: loads positions
main.py - Application Startup → Inference Models: loads models
main.py - Application Startup → Match Pipeline: runs matching
main.py - Match Pipeline → Text Builder: builds query text
src/matching/match_pipeline.py - Match Pipeline → Text Builder: builds candidate text
src/matching/match_pipeline.py - Match Pipeline → Vector Retrieval: retrieves vectors
src/matching/match_pipeline.py - Match Pipeline → BM25 Retrieval: retrieves keywords
src/matching/match_pipeline.py - Match Pipeline → RRF Fusion: fuses rankings
src/matching/match_pipeline.py - Match Pipeline → Cross-Encoder Reranker: reranks candidates
src/matching/match_pipeline.py - Match Pipeline → Match Results: assigns statuses
src/matching/match_pipeline.py - Match Pipeline → Commodity Candidates: searches candidates
src/matching/match_pipeline.py - Match Pipeline → LV Positions: processes positions
src/matching/match_pipeline.py - Application Startup → Result Exporter: exports inputs and results
main.py - Result Exporter → Match Results: formats results
src/exporter/result_exporter.py