Lightweight cognitive protection layer for LLM systems
Project description
🧠 YecoAI Mini-LLM Cognitive Layer
Lightweight cognitive protection for Large Language Models
Anti-loop • Amnesia detection • Semantic stability
Developed by www.yecoai.com
✨ What is this?
YecoAI Mini-LLM Cognitive Layer is a lightweight, modular guard layer designed to sit on top of any LLM.
It does not replace the model.
It observes, evaluates, and stabilizes the model’s output in real time.
Built to solve real production problems:
- Infinite loops
- Context loss (amnesia)
- Semantic collapse in long conversations
- Unstable autonomous agents
🧩 Core Capabilities
-
🔁 Loop Detection
Identifies structural and semantic repetition patterns. -
🧠 Amnesia Detection
Detects loss of contextual continuity across turns. -
🧯 Semantic Degradation Guard
Protects against meaning collapse over time. -
⚡ Ultra-Low Resource Usage
Designed for embedded systems and edge deployments.
📊 Benchmark Results (v1.0)
Real stress tests. No synthetic demos.
Test Suite
- 142 extreme stress scenarios
- Multilingual semantic traps
- Long-context degradation
- Loop-inducing prompts
Total Accuracy: 76.06%
Loop Detection (F1): 0.90
Normal Detection (F1): 0.71
Amnesia Detection (F1): 0.63
Average RAM Usage: 38.85 MB
✅ Loop detection is currently the strongest and near production-ready.
⚠️ Amnesia detection is functional but still evolving.
Detailed reports are available in /benchmarks.
🏗️ High-Level Architecture
LLM Output
↓
Cognitive Evaluation Layer
├── Loop Detector
├── Amnesia Detector
└── Semantic Stability Guard
↓
Validated / Flagged Output
🚀 Use Cases
- Autonomous AI agents
- Long-running chat systems
- AI copilots & assistants
- Embedded / edge AI
- Guard layers for SaaS AI products
- LLM research & experimentation
🧪 Project Status
- Version: v3.0 (Stress-Tested Edition)
- Maturity: Experimental / Research-grade
- Focus: Stability, efficiency, interpretability
This repository is part of the YecoAI Cognitive Systems stack.
🏷️ Attribution & Credits (Required)
This project is developed and maintained by YecoAI.
Attribution is REQUIRED in any usage, including:
- Modified versions
- Commercial products
- SaaS platforms
- Research publications
- Closed-source integrations
You must retain:
- This README attribution
- The
LICENSEfile - The
NOTICEfile
📄 License
Licensed under the Apache License 2.0.
✔ Commercial use
✔ Modification
✔ Redistribution
✔ Closed-source integration
Attribution and preservation of notices are mandatory.
See LICENSE and NOTICE for details.
🌐 About YecoAI
YecoAI builds next-generation cognitive systems focused on:
- AI stability & safety
- Autonomous agents
- Real-world deployability
- Low-overhead intelligent layers
Website : https://www.yecoai.com Discord : https://discord.gg/rBZscZtMvX GitHub : https://github.com/YecoAI
© 2026 www.yecoai.com
Original author: Marco (HighMark / YecoAI)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yecoai_cognitive_layer-0.1.0.tar.gz.
File metadata
- Download URL: yecoai_cognitive_layer-0.1.0.tar.gz
- Upload date:
- Size: 32.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99b183ec0081da807451b3ae35ad4713e73471d376f730a3be967fdc0f0e5696
|
|
| MD5 |
00d7f48ba091236ee532197499cccc5f
|
|
| BLAKE2b-256 |
fa4dbe97d641e5ed7847bfbd617b4282a72e2aad56f578bfa35da3d63861ea48
|
File details
Details for the file yecoai_cognitive_layer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: yecoai_cognitive_layer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 28.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1ec09ca83cf39f03c8dbaac4a75d0035603d769bfe125149279558cdf789fbb
|
|
| MD5 |
f6796216edbe7e3cf2626e941b9ab765
|
|
| BLAKE2b-256 |
f02ebbd75fa067933d243837a88960c51f95927a12e290018d9fd6322008e3c4
|