Posts

Welcome to 8-Chems: Data Science, AI and Software Development, Step by Step

Welcome to 8-Chems , a blog where I explain data science, AI, and software development step by step. Imagine opening a tutorial and finding exactly what you wished a colleague had told you: the intuition first, then a small example, then the formula or the code, and finally how it all fits into a real project. That is the kind of post I try to write here. Who writes here I'm Chemseddine Berbague, a data scientist and developer. I earned my Ph.D. in computer science in 2021, working on recommender systems and multi-objective optimization, and I enjoy turning research ideas into things that run in practice: forecasting models, optimization methods, data pipelines, and web applications. This blog is my notebook in public. If a topic took me a while to understand, I write it down in the way I would have liked to read it. What you will find The posts fall into four themes. Pick the one that matches what you are looking for. Data science in retail and forecasting A series about ...

Catching LLM Hallucinations After Generation: Knowledge Graphs, Cheap NLP Cascades and Production Design

Catching LLM Hallucinations After Generation A hands-on tutorial on post-processing, knowledge-graph verification, cost-efficient NLP cascades, agentic explainability and production deployment, without retraining the model. Research date: 27 October 2026  |  Level: intermediate  |  Reading time: about 45 minutes The idea in one paragraph Large language models still produce fluent statements that are wrong, unsupported or misleading, even after instruction tuning and reinforcement learning. Improving the model is one remedy. A complementary remedy is to put a verification and correction layer after the model : split the answer into atomic claims, collect evidence from documents and knowledge graphs, check support and contradiction, validate citations, and then publish, correct, qualify or abstain. The generator's weights are never touched, so the layer works around proprietary APIs and open-weight models alike. What you will learn Why post-processing, ...