Data Tagger — Path 3 · bid RFP to pipeline

bids@ -> bid_rfp template -> bid_id / customer / items[] / decision_date / bid_value -> bid_external_pipeline -> bid_pipeline_review · BRIDGE TO BID CENTER PILLAR

A bid or RFP arrives at bids@ai-globalfoodsolutions.co. The Data Tagger applies the bid_rfp template to extract bid_id, customer / district, items[], decision_date, and bid_value. The extracted row is logged to bid_external_pipeline (owned by the Bid Center pillar, migration 136). This triggers the bid_pipeline_review workflow which fires one of the Bid Center's 11 skills (typically LOG_EXTERNAL_BID or BID_PIPELINE). This path is the formal bridge from the Data Tagger pillar (5th) into the Bid Center pillar (4th). From here, subsequent operations follow Bid Center flows: FILL_REGIONAL_PRICES, ADD_UPDATE_CUSTOMER_PRICING, eventually rolling up into the Jul 1 named-list flip.

strategies REAL (migration 142) HITL on bid pipeline insert (ADR-031) bid_external_pipeline owned by Bid Center mig 136 (Agent M)

Pipeline — bid RFP arrives → extract → bid_external_pipeline → Bid Center handoff

idle
Bid RFP arrives at bids@ - PDF parsed - buyer resolved (district/customer) - bid_rfp template applied - 5 field tags (bid_id, customer, items[], decision_date, bid_value) - confidence - HITL approve - INSERT bid_external_pipeline (Bid Center migration 136) - bid_pipeline_review workflow fires - bridge handoff to Bid Center pillar - reflexion LANE 1 / INTAKE · bid RFP arrives at bids@ LANE 2 / IDENTIFY · buyer + doc + template LANE 3 / APPLY 5 STRATEGIES · bid_id / customer / items[] / decision_date / bid_value LANE 4 / HITL + BID PIPELINE INSERT · bid_external_pipeline (Bid Center mig 136) LANE 5 / ★ BRIDGE TO BID CENTER · workflow fires + reflexion WHAT THIS DOES: RFP or bid invitation lands at bids@. Typical example - NYC DOE B5875 Food Distribution. TECHNICAL DETAILS: BID RFP ARRIVES TYPICAL SENDERS NYC DOE bid officers, school district procurement, USDA, large foodservice GPOs EXAMPLE NYC DOE B5875 Food Distribution (due Jun 3 2026) TO bids@ai-globalfoodsolutions.co STATUS: REAL (intake) - feeds existing Bid Center Path 1 email intake bid RFP arrives bids@ai-globalfoodsolutions.co e.g. NYC DOE B5875 Food Distribution due Jun 3 2026 (live example) EXTERNAL · CF EMAIL ROUTING i WHAT THIS DOES: Log email, R2 save, parse to markdown. Same boilerplate as Path 1 / Path 2. TECHNICAL DETAILS: LOG + R2 + PARSE inbound_email_log INSERT mailbox=bids@ R2 PUT gfs-inbound-attachments document_converter -> markdown + spans STATUS: REAL email logged + R2 + parsed to markdown inbound_email_log + R2 + document_converter.ts md + spans -> ready for identify BACKEND · SHARED BOILERPLATE i WHAT THIS DOES: Resolve the buyer (school district, GPO, etc.). Many bid issuers are NOT in customers yet - if no match, mark customer_id=NEW and Mike resolves manually. TECHNICAL DETAILS: RESOLVE BUYER SQL customers WHERE email_domain MATCH OR name_synonyms fuzzy on issuing body RESULT customer_id = NYC DOE OR NEW FALLBACK NEW - prompt Mike during HITL STATUS: REAL resolve buyer (customer/district) customer_id = NYC DOE OR NEW unknown -> Mike resolves in HITL DATABASE · BUYER MATCH i WHAT THIS DOES: Classify doc_type = bid_rfp from keyword scan. TECHNICAL DETAILS: CLASSIFY DOC_TYPE KEYWORDS REQUEST FOR PROPOSAL, RFP, BID, SOLICITATION, IFB ns_record_type bid_external_pipeline (Bid Center mig 136) STATUS: REAL classify doc_type = bid_rfp RFP / BID / SOLICITATION / IFB ns_record_type = bid_external_pipeline BACKEND · CLASSIFIER i WHAT THIS DOES: Lookup template for customer + bid_rfp. Templates often share across districts (template inheritance: NYC DOE templates reused for similar schools). TECHNICAL DETAILS: LOOKUP BID TEMPLATE SQL data_tagger_templates WHERE customer_id=? AND doc_type=bid_rfp AND ns_record_type=bid_external_pipeline AND status=active INHERITANCE if no customer-specific template, fall back to district default (e.g. tpl_nycdoe_bid_v2 for NYC schools) STATUS: REAL lookup bid template tpl_nycdoe_bid_v2 (district default) template inheritance for similar schools DATABASE · TEMPLATE i WHAT THIS DOES: Extract bid_id (solicitation number). The thread anchor for the entire bid lifecycle. TECHNICAL DETAILS: STRATEGY: regex_after_label PATTERN /(?:Solicitation|Bid|RFP)\s*#?\s*:?\s*([A-Z0-9\-]+)/i INPUT "Solicitation # B5875" OUTPUT bid_id = "B5875" confidence = 0.95 STATUS: REAL [1] bid_id regex_after_label /Solicitation #?\s*([A-Z0-9\-]+)/ value = "B5875" conf = 0.95 BACKEND · STRATEGY 1 i WHAT THIS DOES: Customer/district. Already resolved in step 3; literal_constant locks it in. TECHNICAL DETAILS: STRATEGY: literal_constant VALUE "NYC DOE" (from buyer resolve) confidence = 1.0 STATUS: REAL [2] customer/district literal_constant value = "NYC DOE" conf = 1.0 BACKEND · STRATEGY 9 i WHAT THIS DOES: Item table - bid items with description and qty. Stored as JSON in bid_external_pipeline.items_json. TECHNICAL DETAILS: STRATEGY: table_with_headers HEADERS Item / Description / Qty / Unit OUTPUT array of { item_code, description, qty, unit } N rows (B5875 has 246 specs) confidence = 0.89 STATUS: REAL [3] items[] table_with_headers Item / Desc / Qty / Unit B5875: 246 spec rows BACKEND · STRATEGY 4 i WHAT THIS DOES: decision_date or award_date - the deadline. TECHNICAL DETAILS: STRATEGY: regex_after_label PATTERN /Decision Date|Award Date|Due/ VALUE "2026-06-03" confidence = 0.94 STATUS: REAL [4] decision_date regex_after_label value = "2026-06-03" conf = 0.94 BACKEND · STRATEGY 1 i WHAT THIS DOES: bid_value - estimated total. Formula strategy: sum(qty * estimated_unit). Falls back to llm_with_schema for unstructured RFPs. TECHNICAL DETAILS: STRATEGY: formula (primary) / llm_with_schema (fallback) FORMULA sum(items[i].qty * items[i].est_unit_price) VALUE $4.2M estimated confidence = 0.78 (estimates are inherently fuzzy) STATUS: REAL [5] bid_value formula or llm_with_schema sum(qty * est_unit) value = $4.2M est · conf = 0.78 BACKEND · STRATEGY 7/8 i WHAT THIS DOES: Weighted confidence across 5 fields. bid_value has lower weight because estimates are inherently fuzzy. TECHNICAL DETAILS: COMPUTE CONFIDENCE WEIGHTS bid_id 2.0 / customer 1.5 / items[] 2.0 / decision_date 1.5 / bid_value 0.5 OVERALL weighted_avg = 0.91 (above 0.85) INSERT data_tagger_extractions STATUS: REAL compute confidence (5 fields) weighted overall = 0.91 (above 0.85 -> auto-stage) bid_value has lower weight (estimates fuzzy) INSERT data_tagger_extractions DATABASE · ABOVE THRESHOLD i WHAT THIS DOES: HITL gate before writing to bid_external_pipeline. Mike sees: "Auto-extracted bid B5875 from NYC DOE - approve pipeline insert?" TECHNICAL DETAILS: HITL: BID PIPELINE INSERT INSERT proposed_actions kind=data_tagger_bid_extraction TITLE: "NYC DOE bid B5875 - auto-extracted - approve pipeline insert?" ADR-031 INVARIANT STATUS: REAL stage proposed_action (HITL) kind = data_tagger_bid_extraction "NYC DOE B5875 - approve pipeline insert?" ADR-031 invariant SECURITY · HITL GATE i WHAT THIS DOES: INSERT into bid_external_pipeline - the BID CENTER table (owned by migration 136, Agent M). This is the crossing-the-streams moment between Data Tagger pillar (5) and Bid Center pillar (4). D1 TABLE: bid_external_pipeline (Bid Center mig 136) TECHNICAL DETAILS: INSERT bid_external_pipeline (BID CENTER OWNED TABLE) TABLE OWNED BY Bid Center pillar (migration 136, Agent M) ROW bid_id = B5875 customer_id = NYC DOE status = proposed items_json = [...] decision_date = 2026-06-03 bid_value = 4200000 source_extraction_id = ext_bid_2026-05-27_b3a STATUS: REAL (table contract via mig 136 in flight) ★ INSERT bid_external_pipeline OWNED BY BID CENTER (mig 136) bid_id=B5875 · customer=NYC DOE status = proposed FINANCE-KEY · CROSS-PILLAR WRITE i WHAT THIS DOES: Trigger the bid_pipeline_review workflow - existing workflow in Bid Center migration 136. It picks the right skill (LOG_EXTERNAL_BID for first-time logging or BID_PIPELINE for status rollup) and runs it. WORKFLOW: bid_pipeline_review (Bid Center mig 136) TECHNICAL DETAILS: TRIGGER bid_pipeline_review WORKFLOW ENDPOINT POST /api/workflow/run body: { workflow_type: 'bid_pipeline_review', bid_id: 'B5875' } DISPATCHES TO LOG_EXTERNAL_BID (Bid Center skill 7/11) BID_PIPELINE (Bid Center skill 8/11) STATUS: REAL (workflow contract via Bid Center mig 136) trigger bid_pipeline_review workflow Bid Center mig 136 workflow dispatches LOG_EXTERNAL_BID / BID_PIPELINE runs one of Bid Center 11 skills MESSAGEBUS · WORKFLOW RUNNER (R549) i WHAT THIS DOES: events.bid.rfp_logged fires. Bid Center dashboard (gfs-pricing.pages.dev) re-renders to show the new pipeline entry. TECHNICAL DETAILS: EVENTS FIRED events.bid.rfp_logged events.data_tagger.extracted_to_ns SUBSCRIBERS bid_pipeline tile in gfs-pricing.pages.dev price_admin notification STATUS: REAL events.bid.rfp_logged fires event ledger (R549) gfs-pricing.pages.dev re-renders price_admin notification MESSAGEBUS · EVENT LEDGER i WHAT THIS DOES: The formal bridge. From here, the bid lives in the Bid Center pillar. Subsequent operations follow Bid Center flows: FILL_REGIONAL_PRICES, ADD_UPDATE_CUSTOMER_PRICING, and eventually the Jul 1 named-list flip if this customer wins the bid and is added to the 69-customer cohort. SEE: ns-bid-center-master.html TECHNICAL DETAILS: ★ BRIDGE TO BID CENTER PILLAR HANDOFF Data Tagger pillar (5) -> Bid Center pillar (4) NEXT STEPS LIVE IN ns-bid-center-master.html Bid Center skills (LOG_EXTERNAL_BID -> FILL_REGIONAL_PRICES -> ADD_UPDATE_CUSTOMER_PRICING) ns-bid-center-path-3-july-rollover.html (eventual NS write) STATUS: REAL ★ BRIDGE: hand off to Bid Center pillar Data Tagger (5) -> Bid Center (4) see: ns-bid-center-master.html Bid Center skills + Jul 1 rollover follow FINANCE-KEY · PILLAR BRIDGE i WHAT THIS DOES: Increment template metrics + log per-district success. TECHNICAL DETAILS: REFLEXION UPDATE data_tagger_templates SET hit_count=+1, success_count=+1 PER-DISTRICT SUCCESS METRICS drives future training (which districts need template-specialization) STATUS: REAL reflexion hit_count + success_count per-district metrics BACKEND i WHAT THIS DOES: Subscribers react - dashboards refresh, price_admin gets notified, customer_health for the bidding district recomputes. TECHNICAL DETAILS: SUBSCRIBERS REACT gfs-pricing.pages.dev bid_pipeline tile updates price_admin notification customer_health watcher recomputes STATUS: REAL subscribers react dashboards refresh price_admin notified customer_health recompute CLOUD i log + parse md + spans -> identify template -> 5 strategies in parallel 5 values gathered stage HITL approve trigger workflow run -> events bridge
Glossary
Database (templates, extractions, bid_external_pipeline)
Backend (strategies, classifier)
HITL (pipeline insert)
Messagebus (workflow, events)
★ Pillar bridge + cross-pillar write
bid_external_pipeline: OWNED BY BID CENTER (mig 136, Agent M); Data Tagger writes into it
bid_pipeline_review: Bid Center workflow that dispatches to 1 of 11 skills

Field tags — 5 strategies for bid_rfp template

#strategyfieldexampleconf
1regex_after_labelbid_idB58750.95
2literal_constantcustomer_idNYC DOE1.00
3table_with_headersitems_json[246 spec rows]0.89
4regex_after_labeldecision_date2026-06-030.94
5formula / llm_with_schemabid_value$4.2M est0.78

The bridge — what happens AFTER this path completes

Related