Where to find wiring diagrams:
Register for a free account at autozone.com, then click on "My Vehicles" in the top center and add your truck. Hover over "Repair Help" on the right side of the orange bar at the top, and click "Vehicle Repair Guides". Click on "Chassis Electrical" in the center of the page, and then "Wiring Diagrams" in the left side-bar. You want diagrams 23 or 24 (24's easier to read, so check both even if you don't have the Cali engine.)
Looking at the wiring diagrams, here's what I see:
Pink/black is 12V to the fuel pump.
Black is ground for the fuel pump.
Yellow/white is the signal wire between the sender and the gauge.
Orange is the ground for the sender.
I don't see any anti-slosh module on the diagrams, the yellow/white wire runs straight from the tank sender to the gauge (I assume there's a couple of connectors in between, as well.)
It appears you may have different colored wires, for whatever reason, but if you can't tell for sure, you can pull the pump/sender assembly out of the tank and it should be easy to see which wires run to which pins on the tank connector.
You need a few things for that circuit to work properly:
1. You need constant "12V" from fuse 16 to one side of the fuel gauge. If that's intermittent (bad wire or connector somewhere between them) then your gauge will also be erratic. To test: Set your meter to 20V DC, and hook it between that post on the back of the gauge and a good ground, turn the key to "run", then see if it varies at all while the gauge bounces around. Read it again with the engine running, as well. It should be close to either 12v (engine off) or 13.8V (engine running) every moment that the key is in "Run". If not, trace that wire (Red/Yel) from one end to the other looking for damage and loose or cruddy connectors. Make sure the nuts on the gauge post are tight, if it uses threaded studs.
2. You need a working gauge. The gauge actually measures electrical current to get its reading, which changes as the resistance in the tank sender changes. To test: Don't do this test yet, it's complicated, so see if the problem can be found elsewhere.
3. You need a good signal input to the gauge. This comes up the Yel/Wht wire. To test: Turn the truck off and pull fuse #16 (it should be labeled gauges or panel or something like that). Get a long piece of wire. Set the meter to the smallest resistance (Ω) range. Hook one end of the loose wire to the "other" post of the fuel gauge and hook the other end of the loose wire to one probe of the meter (you basically extended one of the probes.) Pull the tank connector off and hook the other probe to the pin for the Yel/Wht wire. The meter should read close to 0Ω (or whatever small value you get when you touch the probes directly together.) If not, there's a bad wire or connector. Then, keeping the probe in contact with the tank connector pin, flex the connector and wires around, and rattle the wiring harness and connectors all the way up the chassis, including the dash connector, and see if the reading changes. If it changes, (while shaking or not) you've got a bad wire or connector, so trace that Yel/Wht wire until you find a bad spot or a loose/cruddy connector. Remember to replace fuse #16 when you're done.
4. You need a consistent resistance value from the sender, varying with fuel level. To test: pull the pump/sender assembly out of the fuel tank. Set your meter on resistance, on the smallest range that will give you a value with the float arm at the bottom of its travel. Hook the probes to the two connector pins for the fuel sender (for the yel/wht and org wires, according to my diagram) and very very slowly move the float arm from the bottom to the top of its range. You should get a smoothly decreasing reading on the meter, and it should never jump to an erratic value (This works better with an analog meter with a needle, but we work with what we've got). If it's erratic, then your sender is bad. Also, wiggle the wires between the sender and the connector pins and see if the value gets bad, if so, those connections are loose or bad (which may require replacement of the sender anyways, if they can't be tightened). If there's no measured problems with the sender, make note of the minimum and maximum resistance values you get at the ends of the float travel.
5. You need a good ground for the sender. To test: Set your meter on the smallest resistance range, and hook one probe to the ground pin on the wiring-harness side of the tank connector (orange on my diagram) and the other to a good frame ground (it must be clean and shiny, bare of paint, rust, and crud). It should read 0Ω (or the same as when you touch the probes directly together). If it's very high, or "open circuit", or gives you erratic readings when the wires are moved around, then there's a bad wire or bad/loose connector in the ground wire path somewhere, so trace it and check. Also, inspect the major ground points for the truck, there should be big heavy ground "straps" (either wide flat metal braid or fat wires) between the engine and the frame, the engine and the cab (probably at the firewall) the cab and the frame, and the battery and the frame. Each must connect to a clean bare spot and be fastened tightly at both ends. I don't think it's the main ground straps, because you'ld have more problems than just the fuel gauge, but it never hurts to check and maintain them.
If I were doing the work, I'd test #5, #3, #1, and then #4 in that order, based on likelihood of failure and difficulty to access.
After finding any problem, correct/repair it and then see if your gauge is still erratic, before moving on the the next test.
Let me know what you find for each test you do, and if everything tests out well, I'll come up with a method to test #2, the gauge itself.