No report still passes unit test C1M3 ex2

Just a heads up of a hole in the unit test, (though if any mentor spots a mistake in what I’m reporting here, pls feel free to tell me).

reflection_and_rewrite() passes the unit test (most of the time), even if you don’t provide the LLM with the report you’re asking it to return a reflection and revision of.

Not sure if, in the absence of a report, the LLM is still just writing some random text, and returning this random text within a valid JSON. So, the unit test passes because it is not analysing the content of the text, but only whether there is valid JSON..?

Or if the LLM is just returning a valid, but empty JSON, and the unit test doesn’t check for anything other than valid JSON.. ?

Anyway, just thought to mention it. Not that important.

Hello @shahin,

If you were referring to the test in the following code cell:

image

then you can check out the definition of the test function by clicking, on the jupyter notebook’s menu bar, “File” > “Open” > “unittests.py” and scroll to the function.

You will find a list of heuristic-based checks.

Cheers,
Raymond