Skip to main content
A context is a named recommendation surface, such as a homepage feed, related articles rail, product detail page, checkout upsell, email digest, or video carousel. Contexts are how NeuronSearchLab separates the intent of one surface from another. A homepage can optimize for discovery, a product page can optimize for similarity, and a checkout surface can optimize for conversion without forcing every request through the same ranking setup.

Why contexts matter

A context gives operators one place to control the recommendation behavior for a surface:
  • which model family and retrieval algorithm should be preferred
  • which ranking recipe should shape candidate sources, signals, discovery, and guardrails
  • which pipeline stages should run for that surface
  • which hard pre-query filters should narrow the candidate pool
  • which rules should reshape already-scored results
  • which model is currently serving after fallback resolution
This is what turns NSL from a generic recommendation endpoint into a controllable ranking platform. Applications keep sending a stable context_id; operators can then tune the surface without changing application code every time.

How context control fits together

LayerRole
ContextNames the product surface and stores its recommendation defaults.
RecipeDescribes the ranking strategy for the surface.
PipelineControls the runtime stages candidates move through before results return.
RulesApplies post-scoring business logic such as boost, bury, pin, filter, cap, dedupe, and grouping.
ExplainabilityShows why a user-item recommendation behaved the way it did.

Where to go next