Change filter to entity pattern in instruction API