Ranking Pipeline · Shopping Optimizer · Business-Driven Guardrails
Every search the LLM triggers passes through a deterministic, configurable ranking pipeline that enforces business rules — prioritize previously purchased items, enforce dietary safety, optimize shopping lists, and curate results algorithmically.
These aren't LLM suggestions. They're hard constraints and scoring formulas that the business controls, tunable via config — no prompt engineering, no model retraining.
Every search_products call returns raw results from Vertex AI.
Before the LLM sees them, they pass through 11 sequential stages — each one a business constraint translated into code.
See exactly how the pipeline transforms raw Vertex AI search results into personalized, curated product recommendations.
When the LLM builds a meal plan, it generates a recipe-ingredient list. The optimizer algorithmically consolidates, converts units, deducts pantry stock, maps to retail packages, and solves for cost-optimal combinations.
Not every interaction needs the full 11 stages. The system has purpose-built pipeline configurations optimized for each context — search, post-search, cart building, alternatives, and LLM-callable reranking.
Every ranking stage is toggleable, tunable, and overridable — by environment variables, JSON config files, or per-request parameters. No prompt changes. No model retraining.
LLMs are probabilistic — they might follow instructions, or they might not. When the business says "always prioritize previously purchased items", that's not a suggestion. It's a hard requirement that needs deterministic enforcement.
The LLM decides what to search for. The pipeline decides how the results are ordered, filtered, and presented. Business rules live in code, not in prompts.