🏹Dynamic Parameters/Query Time weights

How you can use Qyver to achieve quality retrieval, through implementing query time weights - at both query definition and query execution.

Achieving High-Quality Retrieval with Qyver: Query Time Weighting

Getting high-quality results from a vector database query is challenging. Through real-world machine learning deployment, we’ve learned two fundamental truths:

1. The richer your dataset, the better your retrieval results—but only if your embeddings fully represent that dataset. 2. Different use cases emphasize different data attributes—your retrieval system must prioritize what matters most.

How Qyver Handles This Challenge

Instead of embedding all data as a single text string, Qyver’s Spaces allow you to:

  • Embed attributes separately rather than forcing everything into a single vector.

  • Concatenate attribute-specific embeddings into a multimodal vector.

  • Prioritize different data attributes dynamically at query time, avoiding the need for reranking.

The result? Faster, higher-quality retrieval—without expensive post-processing layers or reranking.


Two Ways to Weight a Query

Qyver enables query weighting in two ways:

1. Weighting at Query Definition

  • Set weights when defining a query—experiment and optimize without re-embedding your dataset.

2. Weighting at Query Execution

  • Set weights dynamically when running the query—fine-tune retrieval in real-time, without re-indexing.

Let’s see how both approaches work in Qyver.


1. Query Weighting at Definition

By structuring separate embeddings for different attributes, Qyver Spaces allow you to weight each attribute independently.

Example: Optimizing Search for Text vs. Popularity

Let’s define a schema and two Spaces:

Adding Data to the System

Now, let's define two different queries:

  • One that prioritizes text similarity (weights text 2x more than likes).

  • One that prioritizes likes (weights likes 2x more than text).

Running the Queries

1. Prioritizing Text Similarity

Expected Output:

body
like_count
id

Growing computation power enables advancements in AI

10

paragraph-2

Glorious animals live in the wilderness

75

paragraph-1

2. Prioritizing Like Count

Expected Output:

body
like_count
id

Glorious animals live in the wilderness

75

paragraph-1

Growing computation power enables advancements in AI

10

paragraph-2

Why is this better?

  • No re-embedding needed—just adjust query weights.

  • No reranking needed—Qyver retrieves relevant results upfront.


2. Dynamic Query Weighting at Execution

In production systems, query logic is typically predefined. But Qyver allows dynamic fine-tuning, so data scientists or users can adjust weighting at runtime—without modifying query definitions.

Defining a Query with Dynamic Parameters

Running the Query with Different Weights

1. Prioritizing Text Similarity

Expected Output:

body
like_count
id

Growing computation power enables advancements in AI

10

paragraph-2

Glorious animals live in the wilderness

75

paragraph-1

2. Prioritizing Like Count

Expected Output:

body
like_count
id

Glorious animals live in the wilderness

75

paragraph-1

Growing computation power enables advancements in AI

10

paragraph-2

Why is this powerful?

  • Fine-tune relevance dynamically without touching embeddings.

  • Empower users to control results without developer intervention.


Final Thoughts

Qyver’s Query Time Weighting:

  1. Weighting at Query Definition → Experiment & optimize without re-embedding data.

  2. Weighting at Query Execution → Allow real-time fine-tuning for data scientists and users.

What does this mean for you?

  • Faster, more relevant search results—without reranking overhead.

  • Greater flexibility & adaptability—retrieval adjusts dynamically.

  • No costly infrastructure changes—just tweak the query weights!

Like what we’re doing? Give us a star!

Last updated