A Dynamic-Learning Model (DLM) chatbot with memory and compute reasoning modes.
Project description
Dynamic Learning Model |
Overview
The Dynamic Learning Model (DLM) is a hybrid, domain-specific AI system designed to learn, adapt, and respond intelligently to user queries. It combines natural language understanding with structured reasoning, continually improving as it is trained.
Key capabilities include:
- FAQ Handling - Learns and responds to frequently asked questions based on the knowledge it has been trained on.
- Chain-of-Thought (CoT) Reasoning - Performs clear, step-by-step logic to solve non-ambiguous arithmetic, geometric, and unit conversion problems.
- Custom Knowledge Integration - DLM is fully extensible. You can initialize it with an empty SQL database and train it with your domain-specific knowledge.
Whether you're building a student support bot, a domain-specific assistant, or a computation system, DLM offers a flexible foundation to power your intelligent applications.
Table of Contents
Installation
pip install dynamic-learning-model
Requirements: Python 3.12.0 or higher is required to use this bot in your program. All required dependencies are installed automatically with the package.
Required Parameters
The constructor requires passing in two parameters:
- Bot Mode
"learn"- Enables training using the memory model. The bot can be updated with new information."apply"- The bot automatically switches between its "compute" and "memory" models depending on the query asked.
- Database Path - An empty (or existing) SQLite database file used for training and as the bot's memory model.
The ask() method also requires two parameters:
- Query - e.g.,
"What is the definition of FAFSA?" - Display Thought -
Trueto display the bot's Chain-of-Thought reasoning, orFalseto suppress it.
Usage
"learn" mode (training queries):
from dlm import DLM
training_bot = DLM("learn", "college_knowledge.db")
training_bot.ask("What is FAFSA in college?", True)
"apply" mode (deployment / production use after training):
from dlm import DLM
commercial_bot = DLM("apply", "college_knowledge.db")
commercial_bot.ask("What is the difference between FAFSA and CADAA in California?", False)
# or
commercial_bot.ask("Tell me the result for the following: 5 * 5 * 5 + 5 / 5", True)
High-Level Pipeline
Important Notices
- Training data quality matters. DLM's accuracy in
"learn"mode depends entirely on the consistency and clarity of the question/answer pairs it's trained with. Inconsistent category labeling or vague phrasing during training can produce inaccurate or corrupted responses later. - Database files are local and untracked. DLM stores all trained knowledge in the SQLite file you provide. Back up this file regularly - there is no built-in cloud sync, versioning, or recovery mechanism.
- Model loading behavior. Underlying NLP and transformer models (spaCy, HuggingFace) are lazy-loaded and shared across instances. The first call in a session may take longer due to model loading; subsequent calls are significantly faster.
- Compute mode limitations. Chain-of-Thought computation is designed for clear, non-ambiguous arithmetic, geometric, and unit-conversion problems. Ambiguous or multi-interpretation queries may produce incorrect results - always verify outputs for critical use cases.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Disclaimer
Dynamic Learning Model (DLM) is provided "as-is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement. In no event shall the author be liable for any claim, damages, or other liability arising from the use of this software.
DLM may produce inaccurate, incomplete, or unexpected responses, particularly for ambiguous queries or insufficiently trained knowledge bases. Do not rely on DLM's output for decisions involving safety, legal, medical, or financial consequences without independent verification.
All data provided to DLM (training queries, database contents) is processed and stored locally on the host machine. DLM does not transmit user data externally, except for any underlying third-party model downloads (e.g. HuggingFace, spaCy) required on first run, which are subject to those providers' own terms.
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 dynamic_learning_model-4.0.4.tar.gz.
File metadata
- Download URL: dynamic_learning_model-4.0.4.tar.gz
- Upload date:
- Size: 30.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20d6cef8495866d53ad111fa5664b8dc4f74e97cd21f32054a9443aee58e0e5b
|
|
| MD5 |
26d5e44f4f244727f53618b5d1bbd5d1
|
|
| BLAKE2b-256 |
eeb5d3b919b0047b28d899f78615b2d5a63801fa660f9abd085f1683222bedda
|
File details
Details for the file dynamic_learning_model-4.0.4-py3-none-any.whl.
File metadata
- Download URL: dynamic_learning_model-4.0.4-py3-none-any.whl
- Upload date:
- Size: 29.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f64c9b433a9758d58d50f9ef0ba60c44e07c69ba1b8a340097a01d50e6d6b22
|
|
| MD5 |
4ac9bdf15bc3e0231be8015196effa7d
|
|
| BLAKE2b-256 |
9615e6dd73136a9c1257113c3bf7851bbd72eb9d28d1a10f5475b8056aac80be
|