Asked about Testing

How do you test code that calls an LLM?

An answer that works

Separate the deterministic parts and test those normally with a fake client returning fixed responses. The quality of the model's output is not a unit test; it needs an eval suite measured over a fixed task set.

Reading an answer is not being able to give one. The section that teaches this is Testing, 4 hours of Python.

Learn this properly