Fix CPM hallucination: remove fallbacks, add pricing provenance, LLM guardrails#79
Open
Fix CPM hallucination: remove fallbacks, add pricing provenance, LLM guardrails#79
Conversation
When sellers provide no pricing, the buyer agent was silently substituting hardcoded values ($20 in request_deal, $15 in campaign_pipeline, $0 in discover_inventory/quote_flow). This caused the agent to present fabricated CPMs as if they came from the seller. Changes: - request_deal.py: return error string instead of $20 fallback - discover_inventory.py: show "Pricing unavailable" instead of $0 - quote_flow.py: return None instead of PricingResult with $0 - campaign_pipeline.py: require explicit CPM, default to None bead: ar-na3i Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Append CRITICAL pricing discipline instruction to all 12 agent backstories preventing CPM hallucination. Update channel_crews.py expected_output template to show cpm as "Y or null" with explicit instruction that cpm must be null when no seller pricing was provided. Add 37 parametrized tests verifying guardrails are present in every agent. bead: ar-8opr Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Every pricing value now carries a source (seller_quoted, negotiated, or unavailable). The system refuses to produce a CPM when the seller has not provided pricing, and unpriced quotes flow through normalization and orchestration without crashing. bead: ar-r76d Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the buyer agent fabricating CPM pricing when sellers have not provided any. Three layers of fix:
Test Results
Beads
Companion PR
Seller-side fix (pricing_type enum + quote validation) in separate PR on ad_seller_system.
🤖 Generated with Claude Code