Inconsistent Query Results Based on Output Fields Selection in Milvus Dashboard

**题意:**在Milvus仪表盘中基于输出字段选择的不一致查询结果

问题背景:

I'm experiencing an issue with the Milvus dashboard where the search results change based on the selected output fields.

I'm working on a RAG project using text data converted into embeddings, stored in a Milvus collection with around 8000 elements. Last week, my retrieval results matched my expectations ("good" results), however, this week, the results have degraded ("bad" results).

I found that when I exclude the embeddings_vector field from the output fields in the Milvus dashboard, I get the "good" results; Including the embeddings_vector field in the output changes the results to "bad".

I've attached two screenshots showing the difference in the results based on the selected output fields.

Any ideas on what's causing this or how to fix it?

Environment:

Python 3.11 pymilvus 2.3.2 llama_index 0.8.64

Thanks in advance!

python 复制代码
from llama_index.vector_stores import MilvusVectorStore
from llama_index import ServiceContext, VectorStoreIndex

# Some other lines..

# Setup for MilvusVectorStore and query execution
vector_store = MilvusVectorStore(uri=MILVUS_URI,
                                 token=MILVUS_API_KEY,
                                 collection_name=collection_name,
                                 embedding_field='embeddings_vector',
                                 doc_id_field='chunk_id',
                                 similarity_metric='IP',
                                 text_key='chunk_text')

embed_model = get_embeddings()
service_context = ServiceContext.from_defaults(embed_model=embed_model, llm=llm)
index = VectorStoreIndex.from_vector_store(vector_store=vector_store, service_context=service_context)
query_engine = index.as_query_engine(similarity_top_k=5, streaming=True)

rag_result = query_engine.query(prompt)

Here is the "good" result: "good" result And here is the "bad" result: "bad" result

问题解决:

I would like to suggest you to follow below considerations.

  • Ensure that your Milvus collection is correctly indexed. Indexing plays a crucial role in how search results are retrieved and ordered. If the index configuration has changed or is not optimized, it might affect the retrieval quality.
  • In your screenshots, the consistency level is set to "Bounded". Try experimenting with different consistency levels (e.g., "Strong" or "Eventually") to see if it impacts the results. Consistency settings can influence the real-time availability of the indexed data.
  • Review the query parameters, especially the similarity_metric. Since you're using IP (Inner Product) as the similarity metric, ensure that your embedding vectors are normalized correctly. Inner Product search works best with normalized vectors.
  • Verify that the embedding vectors are of consistent quality and scale. If there were changes in the embedding model or preprocessing steps, it could lead to variations in the search results.
  • The inclusion of the embeddings_vector field in the output might affect the way Milvus scores and ranks the results. It's possible that returning the raw embeddings affects the internal ranking logic. Ensure that including this field does not inadvertently alter the search behavior.
  • Check the Milvus server logs and performance metrics to identify any anomalies or changes in the search behavior. This might provide insights into why the results differ when the embeddings_vector field is included.
  • Ensure that there are no version mismatches between the client (pymilvus) and the Milvus server. Sometimes, discrepancies between versions can cause unexpected behavior.
  • As a last resort, try modifying your code to exclude the embeddings_vector field programmatically during retrieval and compare the results. This can help isolate whether the issue is indeed caused by including the embeddings in the output.
  • Please try out this code if it helps.
相关推荐
spencer_tseng2 小时前
transformer-explainer
ai·transformer
图生生4 小时前
饰品商拍提效:AI图生图实现白底图转上身图
人工智能·ai
yingxiao8884 小时前
美国拟终止互联网平台免责条款;YouTube推出AI工具Playables Builder
ai·appstore·ai应用·豆包·行业资讯·燕云十六声
码农小白猿7 小时前
IACheck优化电梯定期检验报告:自动化术语审核提升合规性与效率
大数据·运维·人工智能·ai·自动化·iacheck
De-Alf8 小时前
Megatron-LM学习笔记(6)Megatron Model Attention注意力与MLA
笔记·学习·算法·ai
imbackneverdie8 小时前
更经济实惠的润色方法,告别“中式英文”!
人工智能·考研·ai·自然语言处理·ai写作·研究生·ai工具
熬夜敲代码的小N9 小时前
2026 职场生存白皮书:Gemini Pro 实战使用指南
人工智能·python·ai·职场和发展
ArkAPI9 小时前
腾讯AI基础设施的系统论:从推理框架的算子融合到智能体的任务分解
人工智能·ai·google·aigc·腾讯·多模态处理·arkapi
semantist@语校9 小时前
第五十八篇|从城市节律到制度密度:近畿日本语学院的数据建模与关西语校结构工程
大数据·服务器·数据库·人工智能·百度·ai·知识图谱
小真zzz10 小时前
ChatPPT × Nano Banana Pro:AI演示设计的王者革新
人工智能·ai·powerpoint·ppt·chatppt·nano banana pro·创意绘图