This paper extends the New Keynesian model to allow for stochastic shifts in the monetary policy regime. Agents cannot observe the regime and use a Bayesian learning rule to make optimal inferences. Price setting is adapted to this environment: lagged expectations about monetary policy influence the current inflation rate through an indexation rule. No structural inflation persistence is assumed. We show that this model can capture stylized facts about short-run inflation dynamics both in periods of transition and in stable environments. The role of expectations increases after regime shifts. This creates a link between the degree of inflation persistence and the stability and transparency of monetary policy. Thereby, our model can explain observed changes in inflation persistence.