Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.neuronsearchlab.com/llms.txt

Use this file to discover all available pages before exploring further.

Contexts describe the placement, audience, and intent behind a recommendation request. Properly configuring them keeps results relevant across your product surfaces.

When to create a new context

Create a dedicated context whenever:
  • The UI surface has unique layout or business goals (homepage vs. detail page).
  • You need a different blend of retrieval settings, filters, or pipeline behaviour.
  • You want to measure performance separately from other experiences.
Start with a handful of high-impact contexts, then expand as you identify more nuanced placements.

Configure contexts in the console

1

Open Contexts

Navigate to Console -> Contexts.
2

Create a context

Click New context and note the numeric Context ID shown in the table, for example 101.
3

Define the context behavior

Fill in the modal to define how the context should behave:
  • Context Name and Description document the placement.
  • Select the Recommendation Type / model family that should serve this surface.
  • Configure Filters and optional combinations (AND/OR) to enforce inventory and eligibility rules.
  • Use the context to decide what gets retrieved before scoring.
  • Use the Rules Engine for post-scoring controls such as boost, bury, pin, dedupe, reorder, or grouping.
4

Share the context ID

Save the configuration and share the context ID with your engineering team.

Reference contexts in API calls

Attach the context ID to every recommendation request so NeuronSearchLab can apply the proper logic.
curl -X GET "https://api.neuronsearchlab.com/v1/recommendations" \
  -H "Authorization: Bearer <access_token>" \
  -G \
  --data-urlencode "user_id=user-123" \
  --data-urlencode "context_id=101"
The Core API accepts the numeric console ID. For backwards compatibility, ctx_101 is also accepted and is normalized in recommendation explanations and served-recommendation telemetry.

Iterate continuously

Monitor performance metrics and adjust context settings as business goals evolve. Combine context changes with explicit Rules Engine updates and event tracking to keep the learning loop tight.