An AI hallucination is plausible-sounding generated content that is incorrect, unsupported by the supplied input, fabricated, or nonsensical. Language models can produce these errors because they generate text from learned patterns rather than checking facts. section 14.0 section 12.0
Hallucinations reduce the reliability of chatbots and other language-model applications. Retrieval-augmented generation (RAG) reduces the risk by retrieving relevant, verified information and supplying it as context before generation. section 14.0 section 14.4
Common mitigation strategies include:
- Improve the quality of training data. section 14.0
- Add real-time fact-checking and stronger verification systems. section 14.0
- Use vector search to retrieve relevant external information during generation. section 12.0
Grounding a MongoDB Atlas chatbot
Embed a user query, search a vector database containing prevalidated MongoDB documentation, and pass the retrieved documents as context to GPT-4. LangChain orchestrates the retrieval and generation steps, improving the precision and reliability of answers. section 14.4 section 14.6




























