Agent BrainsAgent Brains
Structuring Policies

The Price List Policy

Policy for structuring pricing catalogs, SKU lists, discount tables, and promotional codes.

When to use it

Select this policy for any data source containing pricing catalogs, SKU lists, discount tables, or promotional codes - preferably have one document that contains all of the above information. Our structuring policy will organize all your price lists into one single document with reference excerpt with explanations of particular categories (example: military discount).

If an agent hallucinates a greeting, it's annoying. If it hallucinates a price, it costs the business money. To prevent this, the Price List Policy applies a highly restrictive, JSON-based structuring pipeline to your raw data. It forces the LLM to read a rigid database rather than guessing across paragraphs of text.

How the Price List Policy Protects Your Data

1. Deterministic Extraction

This policy is strictly constrained to extract only what is explicitly written in your uploaded document. It is forbidden from paraphrasing, embellishing, or inferring missing values. If a promotional discount is not explicitly listed next to a product, the engine will not generate one.

2. Smart Identifier Mapping

To ensure the AI never mixes up the price of one product with another, the engine forces a hierarchy to identify products. It scans the raw data and anchors every row to a primary ID using strict fallback logic:

  • Priority 1: It searches for specific columns like 'Item' or 'Item Number'.
  • Priority 2: If absent, it searches for 'Model' or 'Item ID'.
  • Fallback: If headers are messy or missing, it anchors to the very first column of the file.

3. Noise Reduction & Redaction

Raw exports from CRMs or ERPs often contain internal data that public-facing agents shouldn't see. The Price List Policy acts as a filter:

  • Curated Columns Only: It explicitly ignores irrelevant data columns, extracting only Product Names, Pricing, and authorized Discounts (e.g., military discounts, promo codes).
  • Inventory Stripping: The policy is hard-coded to omit and redact inventory levels or stock counts, keeping the AI's context window focused strictly on pricing.
  • Formatting Preservation: Currency symbols, decimal places, and date formats are preserved exactly as found in the source document to prevent conversion errors.

4. Pure JSON Output

The final output is stripped of all conversational text, introductory sentences, or summaries. The engine outputs a clean, machine-readable JSON array.

What the Output Looks Like

When your n8n workflow queries the Knowledge Base for a price, it receives a perfectly structured JSON object rather than a messy paragraph.

[
  {
    "item": "SKU-1002",
    "product_name": "Thermal Imaging Camera Model X",
    "price": "$1,299.00",
    "military_discount_%": "10%",
    "promo_code": "FALL2025"
  }
]

Why This Matters for Automation Developers

By applying the Price List Policy during ingestion, we solve the hardest part of RAG for you:

  • Zero Formatting Logic: You don't need to write regex or JavaScript functions in n8n to parse messy CSVs or Excel exports.
  • Lower Token Usage: By stripping out empty rows and irrelevant columns (like inventory counts), you consume fewer tokens per retrieval.
  • Predictable Prompts: Because the data is returned in standard JSON, you can pass it directly into your agent's context window with confidence that the LLM will map the right price to the right product every single time.

On this page