04
Dec
Hello, Chroma DB is a vector database which is useful for working with GenAI applications. In this article I will explore how can we run queries on Chroma DB by looking at similar relations in MySQL. Schema Unlike SQL you cannot define your own schema. In Chroma You get fixed Columns each with its own purpose: import chromadb #setiing up the client client = chromadb.Client() collection = client.create_collection(name="name") collection.add( documents = ["str1","str2","str3",...] ids = [1,2,3,....] metadatas=[{"chapter": "3", "verse": "16"},{"chapter":"3", "verse":"5"}, ..] embeddings = [[1,2,3], [3,4,5], [5,6,7]] ) Enter fullscreen mode Exit fullscreen mode Ids: They are unique ids. Note that…