I’m trying to set up a chatbot using Google Cloud Vertex AI Agent Builder and running into a schema problem. I created a Data Store and uploaded my CSV file with question and answer pairs first. After the upload was done, I went to change the schema settings to make the “Question” column the primary key field.
But now I keep getting this error message: “Schema update doesn’t support adding the key property annotation for schema with active documents. Key property mapping mismatch for field ‘Question’.”
It seems like you can’t change which field is the primary key once you already have data loaded into the system. Has anyone found a way around this issue? Do I need to delete all my data and start over with the schema configured properly from the beginning?
Hit this exact issue last month. Vertex AI doesn’t warn you, but once data’s in there, the schema locks completely. No way around it - you have to delete the entire datastore and start over. Total pain, but at least you only deal with it once.
Unfortunately, you’ll need to start over. Vertex AI Agent Builder locks the schema once documents are uploaded, and there’s no way around it. I made the same mistake on my first project. The system won’t allow you to change primary keys to maintain data integrity. You’ll have to delete your entire data store and create a new one. Make sure to set the Question field as the key property before uploading any CSV files. It’s frustrating, but it’s much easier to plan your schema in advance than to try to fix it afterwards.
It can be frustrating to encounter schema issues with Vertex AI Agent Builder. The limitation on changing primary keys after data has been uploaded is intentional to ensure consistency and maintain performance. My advice is to always plan your schema in advance. Creating the data store and ensuring the schema is correctly set up before uploading any CSV files is crucial. I learned through trial and error, and now I double-check the uniqueness of my Question column, as it serves as the primary identifier for documents. Once set up correctly, the chatbot functions effectively.
Yeah, this gotcha gets everyone at least once. I got burned by this exact thing on a project with thousands of documents already loaded.
Google made the schema lock rigid because changing primary keys after ingestion means reprocessing and reindexing everything - breaks existing references and queries.
You’ll need to recreate the data store from scratch. Delete it, make a new one, set Question as the key property FIRST, then upload your CSV. Sucks but I’ve never found a way around it.
Pro tip: test your schema with a few sample rows before uploading everything. Saves you from redoing massive datasets.
This video covers the whole process and shows proper schema setup for custom chatbots:
Once you set it up right the second time, it’ll work smoothly. Key field mapping is solid when configured properly from the start.