The invention concerns a system for preparing beverages comprising:—a container enclosing a beverage or food ingredient, wherein the container carries at least one dielectric or conductive pattern said pattern encoding information, and—a dispenser adapted for decoding information encoded by the at least one dielectric or conductive pattern carried by the container and for preparing a food or a beverage from the beverage or food ingredient enclosed in the container.