Why Track Interactions
Automatic Quality Improvement: User behavior becomes training data for fine-tuning embedding models and ranking algorithms—no manual labeling required. Measure Real Performance: Traditional IR metrics (precision, recall) use test sets. Interactions reveal actual user satisfaction through click-through rates, conversion, and engagement. Personalization at Scale: Build user preference profiles from interaction history to deliver personalized results without managing separate recommendation systems. Identify Blind Spots: Find queries with low engagement, results that users skip despite high rankings, and content gaps causing zero-result queries.What You Get
Training Data Generation
Interactions format into contrastive pairs (query, clicked_doc) for embedding fine-tuning. Position is recorded for future bias correction.
Relevance Analytics
CTR by position, documents with high skip rates, queries needing tuning, time-to-first-click—all without custom infrastructure.
Result Deduplication
Exclude previously purchased, viewed, or consumed content automatically by filtering on past interactions.
Popularity Boosting
Rerank results based on recent interaction signals (clicks, conversions) to surface trending content.
Capture Interactions
Record user behavior with a single API call:interaction_type is always a JSON array — even for a single signal (["click"], not "click"). The array captures the co-occurring signals of one user action, not several separate events: a single result that was shown, clicked, and dwelt on is ["view", "click", "long_view"] in one request. Send a separate request per discrete user action (each click, each purchase) — don’t batch unrelated events into one array.Signal Types
| Type | Strength | Use Case |
|---|---|---|
impression | Neutral | Result was rendered on screen |
view | Weak positive | User viewed a result |
click | Moderate positive | User clicked result |
dwell | Weak positive | User lingered on a result |
long_view | Strong positive | Sustained engagement (track via duration_ms) |
purchase | Strong positive | Conversion event |
add_to_cart | Positive | Intent to purchase |
wishlist | Positive | User added to wishlist |
positive_feedback | Explicit positive | Thumbs up vote |
negative_feedback | Explicit negative | Thumbs down vote |
share | Strong positive | User shared the result |
bookmark | Moderate positive | User saved for later |
query_refinement | Neutral | User modified their search |
zero_results | Neutral | Query yielded no results |
filter_toggle | Neutral | User modified filters |
skip | Weak negative | User ignored result |
return_to_results | Moderate negative | User bounced back quickly |
Signal Strategy
Which signals to capture, when, and why. Not all signals carry equal weight.Signal Strength Matrix
This table maps each interaction type to how it’s used across the platform:| Signal Type | Strength | Fusion Learning | Personalization | Analytics | Fine-Tuning |
|---|---|---|---|---|---|
click | Moderate | Primary positive signal | Session history | CTR metrics | Positive pairs |
long_view | Strong | High-weight positive | Preference indicator | Engagement depth | Strong positive |
purchase | Strongest | Conversion signal | Purchase exclusion | Revenue attribution | Gold standard |
add_to_cart | Strong | Intent signal | Cart-based recs | Funnel metrics | Near-positive |
positive_feedback | Explicit | Direct reward | Profile building | Quality score | Ground truth |
negative_feedback | Explicit | Direct penalty | Anti-preference | Issue detection | Hard negative |
skip | Weak negative | Implicit penalty | — | Skip rate | Soft negative |
return_to_results | Moderate negative | Bounce signal | — | Bounce rate | Negative pair |
share | Strong | Social proof | Sharing patterns | Virality | Strong positive |
bookmark | Moderate | Save intent | Saved items | Save rate | Positive |
dwell | Variable | Duration-weighted | — | Engagement depth | Weighted |
query_refinement | Neutral (0.0) | Not in default reward map | — | Query analysis | — |
Use Case Patterns
- E-commerce
- Media & Entertainment
- Enterprise Search
- Recommendations
Primary signals:
purchase, add_to_cart, click — conversion is the strongest relevance indicator.Key patterns:- Track
add_to_cartseparately frompurchaseto measure funnel drop-off - Use
positionfor learning-to-rank bias correction - Store
order_valuein metadata for revenue-weighted metrics
Position Tracking
Position bias is a well-known problem — users tend to click higher-ranked results regardless of relevance. The system recordsposition on every interaction for analytics and audit purposes. However, position-based reward weighting is not yet implemented — a click at position 8 currently receives the same reward as a click at position 0. Record position now so you won’t need to backfill when position-aware modeling is added.
Cold Start
When you first deploy you have zero interactions. The system adapts automatically through the hierarchical fallback in Thompson Sampling (personal → demographic → global → uniform prior):| Interactions | Fusion Behavior | What To Do |
|---|---|---|
| 0 | Falls back to rrf (uniform weights) | Ship with rrf, start collecting signals |
| 1–50 | Global-level learned weights only | Monitor analytics for obvious issues |
| 50–500 | Demographic-level personalization begins | Verify evaluation metrics are trending up |
| 500+ | Per-user personalization kicks in | Run benchmarks to compare against baseline |
Client-Side Capture
Track clicks and dwell time directly from the browser, usingsendBeacon so dwell events survive page unload:
Outcomes & Use Cases
1. Fine-Tune Embedding Models
2. Identify & Fix Ranking Issues
3. Personalize Without Recommendation Infrastructure
4. Continuously Tune Ranking from Interactions
Setfusion: "learned" and click/purchase signals automatically re-weight your search over time — no manual reranking rules. Weight higher-intent signals above clicks with the reward_map:
reward_map.
Query & Export
Retrieve interactions for analysis or external ML pipelines:Reward Values and Auto-Tune
When a retriever uses Auto-Tune (fusion: "learned"), every interaction automatically receives a computed reward_value stored in its metadata. This value is derived from the retriever’s reward_map configuration at write time:
purchase (3.0) wins over click (1.0), so reward_value is 3.0 (not summed). The reward value determines how much this interaction shifts the fusion weights for the associated feature.
How it feeds into Auto-Tune:
- Each interaction records which feature URI surfaced the clicked result
- The
reward_valueadjusts the Thompson Sampling Beta distribution for that feature - Positive rewards increase the feature’s weight; negative rewards decrease it
- The next search for this user reflects the updated weights
Feature URI
Thefeature_uri field identifies which embedding model/feature produced the result the user interacted with. This is required for Auto-Tune — without it, the interaction cannot contribute to weight learning because the system doesn’t know which feature to reward.
feature_uri for each result in the execution response’s learned_fusion_context.feature_uris array, or extract it from the document’s metadata. If feature_uri is set as a top-level field, it is automatically promoted into metadata.feature_uri for backward compatibility.
Privacy & Compliance
GDPR Deletion: Remove all interactions for a user to honor right-to-deletion requests.user_id before sending if you need consistent tracking without PII.
Python SDK
Bulk Backfill
Migrate existing interaction history into Mixpeek using the batch endpoint. Send up to 1,000 interactions per call withoccurred_at timestamps so temporal decay weights them by their true age.
{created: 2, failed: 0, results: [{index: 0, interaction_id: "...", status: "created"}, ...]}. Backfilled interactions bypass the real-time session cache — they affect learned fusion weights only after the next ClickHouse aggregation.
Best Practices
- Always capture position — recorded for analytics and future position-aware modeling
- Store query text in metadata — enables query-document pair export for fine-tuning
- Track dwell time — separates genuine engagement (
long_view) from accidental clicks - Backfill with timestamps — use the batch endpoint with
occurred_atso temporal decay weights by true age - Monitor weekly — set up dashboards to track CTR trends and catch relevance regressions early
See Improve Relevance → Analytics for dashboards and alerting on interaction-driven metrics like CTR, engagement rates, and query quality.

