Tiny memory, streaming signals
Five compact sketches monitor token-distribution changes as LLM output arrives.
Try the method
Interactive explainerHow it works.
Build a reference profile
Summarize trusted text with Count-Min Sketch, HyperLogLog++, AMS, Bloom Filter, and MinHash.
From the original project.
Saved artifacts · click to inspect
Original artifact ↗
Original artifact ↗
Continue in the source.
Open the source notebook in Jupyter, Colab, or the environment described in the README. Data and model downloads may be required.
git clone https://github.com/eforus-overseer/llm-hallucination-sketches.gitRead the setup and requirements ↗Project artifacts.
report/report.ipynb ↗experiments/analysis.ipynb ↗Data-Streaming-Algorithms-Final-Project-Task.pdf ↗experiments/figures/estimator_bias_boxplot.pdf ↗experiments/figures/estimator_mre_vs_size.pdf ↗data/prepare_data.py ↗efi-version/hallucination_detection_with_sketches.py ↗
Source links point to the original public repository. Credit belongs to the project authors and the dependencies credited there.