Implementing Advanced Fusion Retriever with Storage Context #9735
Replies: 1 comment
-
🤖 Hello @bhavya-giri! 👋 I'm Dosu, your friendly bot assistant here. I'm designed to help you with bugs, answer your queries, and guide you on your journey to becoming a contributor while we wait for a human maintainer. Always ready to lend a helping hand! 🤖 ✋ To implement the Advanced Fusion Retriever with the Milvus Vector Store using already indexed data in LlamaIndex, you would need to create an instance of the from llama_index.vector_stores.milvus import MilvusVectorStore
from llama_index.vector_stores.types import VectorStoreQuery
# Create an instance of the MilvusVectorStore
milvus_store = MilvusVectorStore(
uri="http://localhost:19530", # replace with your Milvus instance URI
collection_name="llamalection", # replace with your collection name
dim=128, # replace with the dimension of your embeddings
similarity_metric="IP", # replace with your similarity metric
overwrite=False, # set to True if you want to overwrite existing collection
)
# Create a VectorStoreQuery
query = VectorStoreQuery(
query_embedding=[0.1, 0.2, 0.3, ...], # replace with your query embedding
similarity_top_k=10, # replace with the number of similar nodes you want to retrieve
)
# Query the MilvusVectorStore
result = milvus_store.query(query)
# The result is a VectorStoreQueryResult object
# You can access the most similar nodes, their similarities, and their ids with:
nodes = result.nodes
similarities = result.similarities
ids = result.ids Please replace the placeholders in the code with your actual values. The Please note that this code assumes that you have already indexed your data in the Milvus Vector Store. If you haven't, you would need to use the The Advanced Fusion Retriever in the context of LlamaIndex is a class named I hope this helps! If you have any other questions, feel free to ask. Best, SourcesThis response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Beta Was this translation helpful? Give feedback.
-
I want to try Advance Fusion Retriever with Milvus Vector Store with already indexed data
https://docs.llamaindex.ai/en/stable/examples/low_level/fusion_retriever.html
Beta Was this translation helpful? Give feedback.
All reactions