Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Vector Search Index Serving e2-standard-16 in europe-west1 Costs

Hi,

I have been experimenting with RAG by creating a VectorSearchVectorStore and MatchingEngineIndexEndpoint. I noticed that the cost is high, so I deleted the index and endpoint and switched to using ChromaDb. However, I am still being billed for Vector Search Index Serving e2-standard-16 in europe-west1 despite having deleted the index and endpoint:

ahmed94_0-1733905298871.png

My code:

index = aiplatform.MatchingEngineIndex.create_tree_ah_index(
display_name="langchain_index2¡",
dimensions=768, # Dimensiones de los embeddings de texto
approximate_neighbors_count=200,
leaf_node_embedding_count=600,
leaf_nodes_to_search_percent=7,
description="Text-based LangChain Index"
)

index_endpoint = aiplatform.MatchingEngineIndexEndpoint.create(
display_name="langchain_index_endpoint",
description="Text-based LangChain Index Endpoint",
public_endpoint_enabled=True,
)
index_endpoint.deploy_index(
index=index,
deployed_index_id="langchain_deployed_index"
)

embeddings = VertexAIEmbeddings(model_name="textembedding-gecko@003")

aiplatform.init(project=PROJECT_ID, location=LOCATION)
# index_endpoint = aiplatform.MatchingEngineIndexEndpoint(
# index_endpoint_name=ENDPOINT_NAME
# )

vectorstore = VectorSearchVectorStore.from_components(
project_id=PROJECT_ID,
region=LOCATION,
gcs_bucket_name=GCS_BUCKET,
index_id=index_id,
endpoint_id=endpoint_id,
embedding=embeddings,
stream_update=False
)

# Delete endpoint and index

vs_endpoint.undeploy_all()
vs_endpoint.delete()

vs_index.delete()

###########

Now for retriever I am using chroma db

db = Chroma(persist_directory=LOCAL_PERSIST_PATH, embedding_function=embeddings)
retriever = db.as_retriever(search_type="similarity", search_kwargs={"k": 3})

Can you help me please, I don't know what to do

0 1 247
1 REPLY 1