HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
codelion
adaptive-classifier
Python2025–2025
codelion / adaptive-classifier

adaptive-classifier

A flexible, adaptive classification system for dynamic text classification

2Distinct people
7Mentions
0Explicit recommenders
577GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A flexible, adaptive classification system for dynamic text classification

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 12:54:37 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week7 dated mentions

Observed mentions: 2025-01-21 23:54:32 UTC to 2025-03-07 11:56:47 UTC. Weeks start Monday, UTC.

0122025-01-20 00:00:00 UTC to 2025-01-27 00:00:00 UTC (exclusive): 2 mentions; 2 submissions, 0 commentsJan 202025-01-27 00:00:00 UTC to 2025-02-03 00:00:00 UTC (exclusive): 2 mentions; 2 submissions, 0 comments2025-02-03 00:00:00 UTC to 2025-02-10 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2025-02-10 00:00:00 UTC to 2025-02-17 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsFeb 102025-02-17 00:00:00 UTC to 2025-02-24 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-02-24 00:00:00 UTC to 2025-03-03 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-03-03 00:00:00 UTC to 2025-03-10 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 commentsMar 3

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Jan 202025-01-20 00:00:00 UTC2025-01-27 00:00:00 UTC220
Jan 272025-01-27 00:00:00 UTC2025-02-03 00:00:00 UTC220
Feb 32025-02-03 00:00:00 UTC2025-02-10 00:00:00 UTC110
Feb 102025-02-10 00:00:00 UTC2025-02-17 00:00:00 UTC000
Feb 172025-02-17 00:00:00 UTC2025-02-24 00:00:00 UTC000
Feb 242025-02-24 00:00:00 UTC2025-03-03 00:00:00 UTC000
Mar 32025-03-03 00:00:00 UTC2025-03-10 00:00:00 UTC211

What Hacker News says

7 sources
I built an open-source hallucination detector that identifies when LLM outputs contain information not present in the source context. The tool is particularly useful for RAG systems where ensuring factual accuracy is critical. Unlike most hallucination detection approaches that require separate LLM calls (which add cost and latency), this is a lightweight classifier built on HuggingFace transformers. It's adaptive, meaning it continuously improves as it processes more examples. Technical approach: - Uses a prototype memory system that maintains class examples for quick adaptation - Combines transformer embeddings with an adaptive neural layer - Trained on the RAGTruth benchmark dataset across QA, summarization, and data-to-text tasks - Achieves 80.7% recall overall (51.5% F1), with strongest performance on data-to-text generation Example
Read the rest
usage: from adaptive_classifier import AdaptiveClassifier # Load pre-trained detector detector = AdaptiveClassifier.from_pretrained("adaptive-classifier/llm-hallucination-detector") # Format input with context, query and response input_text = f"Context: {your_context}\nQuestion: {your_question}\nAnswer: {llm_response}" # Get prediction prediction = detector.predict(input_text) # Returns: [('HALLUCINATED', 0.72), ('NOT_HALLUCINATED', 0.28)] Current limitations: - Performance varies by task type (stronger on data-to-text, weaker on summarization precision) - Initial version focuses on binary classification; token-level detection is planned - The model is relatively small, so it won't catch subtle nuanced hallucinations that require deep domain knowledge The library's wider goal is to enable adaptive classification for use cases where models need to continuously learn from new examples. We've also built LLM routers and configuration optimizers with it. Would love feedback from anyone working on RAG systems or LLM evaluation. What metrics or capabilities would be most useful to you in a hallucination detector? Project: https://github.com/codelion/adaptive-classifier Docs: https://github.com/codelion/adaptive-classifier#hallucinatio...
In Show HN: An adaptive classifier that detects hallucinations in LLM/RAG outputs
codelion·Feb 3, 2025Submission

Adaptive Classification for Automatic LLM Temperature Optimization

After analyzing 500 diverse LLM queries (from Arena Auto Hard benchmark), we found that the typical temperature=0.7 setting is only optimal 23.5% of the time. We built an adaptive classification system that automatically predicts optimal temperature ranges based on query characteristics, achieving a 69.8% success rate in finding better configurations. Key findings: Query-Temperature Mapping: Factual queries (math, logic) → 0.0-0.1 Technical writing → 0.2-0.5 Conversational → 0.6-1.0 Creative tasks → 1.1-1.5 Exploratory thinking → 1.6-2.0 Distribution Analysis: Most queries actually benefit from non-standard temperatures: 26.4% perform best with technical precision (0.2-0.5) 23.5% with standard balanced settings (0.6-1.0) 18.6% with strict deterministic settings (0.0-0.1) 31.6% with higher creative settings (>1.0) Implementation: We use Ro
Read the rest
und-Trip Consistency (RTC) testing: generate a response, create an alternate query targeting similar content, generate second response, measure semantic similarity. This provides an automated way to evaluate temperature effectiveness without human intervention. The classifier learns continuously from query-response patterns. In production, this reduced "hallucinations" by 42% for factual queries while improving creativity scores by 35% for open-ended tasks. Technical details and implementation: https://github.com/codelion/adaptive-classifier We're particularly interested in feedback from others who've dealt with temperature optimization at scale.
1 points · Open discussion
codelion·Feb 1, 2025Submission

Show HN: A classifier that learns new categories without retraining from scratch

I built a text classifier that can learn new categories on the fly without full retraining – solving a practical problem I kept hitting in production systems. Try it out: from adaptive_classifier import AdaptiveClassifier # Start with basic sentiment classes classifier = AdaptiveClassifier("distilbert-base-uncased") classifier.add_examples( ["Great product!", "Terrible service"], ["positive", "negative"] ) # Later add a completely new class without retraining classifier.add_examples( ["404 error", "API timeout"], ["technical", "technical"] ) # It maintains accuracy on both old and new classes print(classifier.predict("The API is down")) # [('technical', 0.82), ...] print(classifier.predict("Best purchase ever")) # [('positive', 0.89), ...] Technical implementation: - Uses Elastic Weight Consolidation to prevent catastr
Read the rest
ophic forgetting when learning new classes - Combines prototype memory with neural adaptation for efficient few-shot learning - Memory-efficient: stores only representative examples using k-means clustering - Fully deterministic results through careful seed management - Built on PyTorch/HuggingFace, works with any transformer model The key insight was combining EWC (usually used in reinforcement learning) with a prototype memory system. This lets the model learn new patterns while preserving its knowledge of existing categories. Real-world use cases I've tested: - Customer feedback classification where new issue types emerge over time - Content moderation systems that need to handle new violation types - Technical support routing where new product categories get added pip install adaptive-classifier GitHub: https://github.com/codelion/adaptive-classifier Would love feedback from anyone who's dealt with similar challenges in production ML systems!
4 points · Open discussion
codelion·Jan 21, 2025Submission

Show HN: Adaptive-classifier – text classification with continuous learning

Hi HN! I've built a Python library that lets you create text classifiers that can continuously learn and adapt to new classes without retraining from scratch. What makes this different from typical text classifiers: - Dynamically add new classes at any time without full retraining - Combines neural networks with prototype learning for better few-shot performance - Uses Elastic Weight Consolidation to prevent catastrophic forgetting - Works with any HuggingFace transformer base model - Memory-efficient through prototype-based storage You can try it out in under a minute: pip install adaptive-classifier from adaptive_classifier import AdaptiveClassifier # Initialize with any HuggingFace model classifier = AdaptiveClassifier("bert-base-uncased") # Add initial examples texts = ["Great product!", "Terrible experience", "Average performance"] l
Read the rest
abels = ["positive", "negative", "neutral"] classifier.add_examples(texts, labels) # Make predictions print(classifier.predict("This is amazing!")) # [('positive', 0.85), ('neutral', 0.10), ('negative', 0.05)] # Add a completely new class later classifier.add_examples( ["Error 404", "System crashed"], ["technical", "technical"] ) The library came out of my work on building a model router for optillm where approaches and model types keep changing. Traditional classifiers require full retraining when adding new classes, which becomes impractical with large datasets. Source code: https://github.com/codelion/adaptive-classifier I'd love to hear your thoughts and feedback! Happy to answer any questions about the implementation details, use cases, or future plans.
5 points · Open discussion

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.