When Change Feed is used to update the same container a change is read from it can generate an infinite loop of changes. The way to prevent this is to generate a hash on the data being stored, then regenerate the hash when the trigger is fired and check it against the stored value.
We need an example that shows users how to do this. There is a sample that demonstrates this here. Need to take this sample and make it generic so it can run with near zero dependencies.
https://github.com/AzureCosmosDB/cosmos-embeddings-generator