Vacuum Leak Detection Tip, But Be Careful!
I have had similar problem. I took the car to the only Caddy dealer near by several times and was repeatedly told it required a new O2 sensor at $200+ a pop. I finally found a former Cadillac service mgr (semi-retired) to diagnose the problem. He told me they were firing the messenger and not finding the cause. After checking everything he found all intake manifold bolts loose allowing air to enter the system where it shouldn't. He tightened them and reset all parameters and since then all has been fine. Maybe not your problem but that's my story. The take away is to find a competent technician you can trust. Not always easy.
An OBDII Scanner will "put you in the ball park" as to where to look for the problem. It will say something like "Right Bank Running Too Lean", or "Misfire #6 Cylinder". Doesn't tell the Tec precisely what the problem is, just "puts them in the ballpark" as to where to start looking. So then start testing fuel system components under "Too Lean" with a multi meter while looking at know specs for the component.
With 'misfire' then checking electrical components, etc. If available a Tec II Scan will pretty much specifically identify the problem.
Tip. Looking for a suspected vacuum leak, as in this case can be frustrating. Easy way to identify what and where to start looking? Do this, but
BE CAREFUL and have a fire extinguisher handy! With engine running use a can of Carb & Choke Cleaner with wand installed and just do little short sprits sprays of typical upper engine vacuum locations. At vacuum hoses and around edge of intake manifold etc. If you hear the engine while idling change RPM, that's where the leak is. This is a lot faster than using a vacuum pump at each location. Yet, remember,
Carb & Choke Cleaner is HIGHLY FLAMMABLE, especially on a hot engine. So only do this at initial start up when engine is still cool. A tiny short sprit of the can pointed at suspected leak locations.

--- Known signs of an engine vacuum leak? The engine at idle will surge up and down in RPM.