query
method. While creating the index, if I have some metadata like below:nodes = []
for index, row in data_embedding.iterrows():
text_embedding = json.loads(row["embedding"])
text = row["combined"]
node = TextNode(text=text, metadata={"uuid":row["uuid"], "brand_name": row["brand_name"]}, embedding=text_embedding)
nodes.append(node)
index = VectorStoreIndex(nodes=nodes)
query_engine = index.as_query_engine(similarity_top_k=5)
query
method, do I have to pass metadata for this query as well or llamaindex will do this on its own in backend. I am really confused because I have seen a few videos where people were passing metadata explicitly and some were just defining the metadata in the TextNode
but they didn't pass metadata in query. How exactly query method is working in backend with metadata?
vector_store = SupabaseVectorStore(
postgres_connection_string=(
"URI string"
),
collection_name="embeddings",
dimension=1024
)
index = VectorStoreIndex.from_vector_store(vector_store=vector_store)
query_engine = index.as_query_engine(similarity_top_k=3)
response = query_engine.query("Can you show me some funds?")