> How do we make sure that the output is factual and not hallucinated?
One method the readme doesn't mention: ask the same question multiple times. Apparently research suggests that when LLMs hallucinate answers, their hallucination is likely to be a different one every time, where as factual answers will tend to be consistent.