Kruel.ai V7.0 - Api companion with full understanding with persistent memory

After leaving Kruel to ingest all the openai and ollama api understanding today I was very happy to report that Lynda now understands all the api capabilities, along with it code. which is awesome news. Now to star training it some more on its own fundamentals to see where we can improve it some more. I may have to look into training it on other articles and data I read so it can understand other methods out there for different algorithms , processes, and more. Still no data wipes required, memory is holding.

I am currently trying to clone it over again to the laptop so that I can take it on the road today to visit some people to demo off the latest build to show of some of its new capabilities.

Documentation Processing System Development Update

We have initiated development of a comprehensive documentation processing system designed to enhance our AI’s knowledge base. Here are the key features and capabilities:

Document Integration

  • The system accepts and processes multiple document formats through our upload interface
  • Documents are converted into a specialized read-only memory type specifically designed for technical documentation, code, and manuals
  • This preserves the integrity of source materials while allowing them to be referenced

Intelligent Query Processing For example, when a user asks β€œHow do I access the calibration mode on an M2000?”, the system:

  1. Retrieves relevant technical documentation from the protected memory
  2. Combines this with existing user interaction history and contextual understanding
  3. Processes the query through our Chain of Thought (COT) and GAP analysis systems
  4. Generates accurate responses while maintaining document integrity

Cross-Reference Capabilities

  • The system maintains the ability to analyze relationships across different memory types
  • It can synthesize information from multiple data sets based on query context
  • This new documentation layer integrates seamlessly with existing memory systems

The architecture ensures source documentation remains unaltered while allowing the AI to learn and improve its response accuracy through user interactions. This maintains both reliability and adaptability in the system’s knowledge base.

Here are some images of one of my process testors which is testing older simple system vs the new doc processor.



Handles code:

Do you ever reflect on the potential implications of systems like these, where everything we discuss is captured, understood, and evolved over time? From my perspective, the benefits are extraordinary, particularly in advancing research and fostering deeper understanding across generations.

Yet, I can’t ignore the potential downside, the risk of over-reliance. Just as calculators have become indispensable in daily life, these systems could become so integral that they diminish our understanding of fundamental principles the foundational knowledge that brought us to this point. I worry that as reliance grows, future generations may lose touch with the β€œhow” and β€œwhy” behind these systems, becoming mere users rather than active participants in understanding and innovation.

What happens if years of accumulated understanding blink out due to a catastrophic failure? The consequences for a society dependent on unlimited memory and instant comprehension could be profound. While some people might retain knowledge, I fear that the majority of future generations could find themselves unprepared, unable to rebuild the systems they rely on. This potential predictability of risk feels significant enough to warrant concern.

Just some thoughts for the day haha but they give me pause as I reflect on the journey of what I’m creating and where it might lead…

2 Likes

Boo, my idea is on hold. I was attempting to train the model on its own memories which would give the ai a boost on its understanding of the memory. ran out of memory will have to wait until I get more GPU power / ram. think we need 64GB to train this.

root@134b4b2858e8:/app# python3 train.py
2024-11-29 21:04:14,176 - INFO - NEO4J_URI: bolt://neo4j-container-k7:7687
2024-11-29 21:04:14,176 - INFO - NEO4J_USER: neo4j
2024-11-29 21:04:14,176 - INFO - NEO4J_DATABASE: neo4j
2024-11-29 21:04:14,316 - INFO - Downloading model β€˜meta-llama/Llama-3.2-3B’ to β€˜./models/local’…
Loading checkpoint shards: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2/2 [00:01<00:00, 1.94it/s]
The new embeddings will be initialized from a multivariate normal distribution that has old embeddings’ mean and covariance. As described in this article: Initializing New Word Embeddings for Pretrained Language Models Β· John Hewitt. To disable this, use mean_resizing=False
2024-11-29 21:04:30,479 - INFO - Model downloaded and saved to β€˜./models/llama3.2’.
2024-11-29 21:04:30,480 - INFO - Backing up the model…
2024-11-29 21:04:30,480 - INFO - Backup already exists. Skipping.
2024-11-29 21:04:30,480 - INFO - Connecting to Neo4j…
2024-11-29 21:04:30,480 - INFO - Successfully connected to Neo4j.
2024-11-29 21:04:30,546 - INFO - Fetched 2346 memories.
Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2346/2346 [00:00<00:00, 86201.69 examples/s]
Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2346/2346 [00:00<00:00, 5222.49 examples/s]
Map: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2346/2346 [00:00<00:00, 8764.31 examples/s]
2024-11-29 21:04:31,644 - INFO - Starting fine-tuning…
trainable params: 4,587,520 || all params: 3,217,340,416 || trainable%: 0.1426

Look what I have running and its pretty accurate so far.

INFO:root:[Trigger] Set β€˜flash_thinking’ to β€˜true’.
[Audio] Finalizing recording after pause.
[Audio] Preparing to send audio data for transcription, data length: 23552
[Audio] Audio data sent to Whisper for transcription.
INFO:root:Closest match: ben with score: 0.9352
INFO:root:[Whisper Worker] Wake word detected. Recognized user: ben
[Main] Received transcription: User=β€˜ben’, Transcription=β€˜Hey Linda, how’s it going today?’
INFO:root:[handle_transcription] User: ben, Transcription: Hey Linda, how’s it going today?
INFO:root:[Intent Detection] Detected intent: none
INFO:root:[Memcached] Stored regular message for ben: user_message_ben
INFO:root:[Trigger] Set β€˜flash_thinking’ to β€˜false’.
[DEBUG] Brain pulsing state changed: True β†’ False

Had wife test who is not trained on

INFO:root:[Trigger] Set β€˜flash_thinking’ to β€˜true’.
[Audio] Finalizing recording after pause.
[Audio] Preparing to send audio data for transcription, data length: 24576
[Audio] Audio data sent to Whisper for transcription.
INFO:root:Closest match: ben with score: 1.3870
WARNING:root:No user recognized. Closest match: ben with score: 1.3870
WARNING:root:[Whisper Worker] User not recognized. Skipping transcription.
[Main] No valid transcription or user recognized, skipping.
INFO:root:[Trigger] Set β€˜flash_thinking’ to β€˜true’.
[Audio] Started recording audio for Whisper processing.
[Audio] Finalizing recording after pause.
[Audio] Preparing to send audio data for transcription, data length:

This is pretty nice. So the system can be setup only to respond to matching voices. downside voice clones could fake messages to the system. I will come up with another way to verify. This is just a simple approach currently.

This also means I could technically build a new user learning system, where if a user is not known. the system can than request their name and use a temp placeholder of person_num or something until entered into the system. Even if people use silly names won’t matter cause everytime they use the system it will know them as that name by the patterns.

takes about 1 second to process the voice, and I use a sample of 10-15 seconds during training to build the embeddings.

After training lisa
INFO:root:[Trigger] Set β€˜flash_thinking’ to β€˜true’.
INFO:root:[Trigger] Set β€˜flash_thinking’ to β€˜true’.
[Audio] Finalizing recording after pause.
[Audio] Preparing to send audio data for transcription, data length: 24576
[Audio] Audio data sent to Whisper for transcription.
INFO:root:Closest match: lisa with score: 0.9709
INFO:root:[Whisper Worker] Wake word detected. Recognized user: lisa
[Main] Received transcription: User=β€˜lisa’, Transcription=β€˜Hey, Linda. What’s new today?’
INFO:root:[handle_transcription] User: lisa, Transcription: Hey, Linda. What’s new today?
INFO:root:[Intent Detection] Detected intent: none
INFO:root:[Memcached] Stored regular message for lisa: user_message_lisa
INFO:root:[Trigger] Set β€˜flash_thinking’ to β€˜false’.
[DEBUG] Brain pulsing state changed: True β†’ False
ERROR:root:State check error: [WinE

If you followed the project from way back we had a vision recognition system for faces so when people entered the room the ai could greet people it met. That was in an older system and not currently in V7.

So I thought about how I could combine vision with voice so this would be away to 2fa a users. Well not 100% accurate in its current state the scores are pretty high. We could build it so that if the vision score is lower but voice imprint matches high to allow for camera deviations. Ideally though using a depth camera would be the better option for 3d mapping the face. You could technically use a multi shot that looks a slight changes in movement to determine a higher accuracy in the results. Many ways to do it.

1 Like

My system sometime messes up with how it should respond and sometimes rather than words it tries to explain things with images. what I find interesting is this images are based on memories it has on what we are discussing and its got a lot of truth in the images but its a limit of the models ability to communicate clearly the thoughts. its pretty cool to think in a few years with more training what image generation models could do with more understanding and recalled memory :slight_smile:

2 Likes

So I am building a new framework to later integrate into kruel.ai V7 Memory augmented network. This has me abit excited on the possibilities and will be another long trek I am sure.

Kainn: Kruel.ai Neurl Nets

Kainn is my experimental framework designed to push the boundaries of self-learning AI. By automating the processes of learning, testing, and refining, Kainn (kruel.ai Neural Nets) represents a significant step toward building AI systems that evolve autonomously and adapt to ever-changing needs.


What Kainn Does

  1. Dynamic Learning: Kainn trains itself using provided data and dynamically integrates new information, allowing it to grow and improve without manual intervention.

  2. Self-Testing: It evaluates its performance through continuous testing cycles, identifying gaps and opportunities for refinement.

  3. Autonomous Improvement: Kainn uses feedback loops to adapt, retraining itself when errors are detected to ensure consistent performance enhancement.

  4. Adaptability: Its learning capabilities enable it to respond to diverse and complex scenarios, evolving alongside the demands placed on it.

It’s in an early test phase right now to scope out the potentials of use cases. The first target is Intent systems to replace both static and NLP for something faster that consciously learns and adapts.

So far we have made a lot of progress and I am liking the results. once trained it can almost instantly produce intent or it will improve in that moment through self learning.

I have a feeling this will be almost as fun as it was to make the v7 memory which still is amazing and fastest memory concept I have built and tested. well Zzz time 5am comes early.

Update:
KAINN Intent Classification Framework - Automated Model Development Pipeline

A comprehensive framework for intent classification that automates the full ML lifecycle:

Features:

  • Automated training data builder
  • Autonomous test data generation and augmentation
  • Self-optimizing training with edge case detection and corrections
  • Automated validation targeting 99%+ accuracy
  • Built-in deduplication and balanced sampling
  • Model persistence and manual testing capabilities

This tool built on KAINN intelligently generates both positive and negative training examples, automatically identifies classification gaps, and performs targeted retraining until reaching specified performance thresholds. The underlying architecture ensures robust intent classification across diverse use cases while maintaining high accuracy standards.

Model speeds for response are in MS per transaction once fully trained.

This will be this months new testing tool with our memory data to check its performance across all its ai data points.

Auto Test Complete

Total Training Samples: 2023
Total Iterations: 10
Total Training Time: 0:05:50.726079

Accuracy Over Time:
Iteration 1: Accuracy: 100.00% - Misclassified Samples: 0 - Timestamp: 2024-12-03 08:31:40
Iteration 2: Accuracy: 100.00% - Misclassified Samples: 0 - Timestamp: 2024-12-03 08:31:58
Iteration 3: Accuracy: 97.32% - Misclassified Samples: 4 - Timestamp: 2024-12-03 08:32:30
Iteration 4: Accuracy: 96.62% - Misclassified Samples: 5 - Timestamp: 2024-12-03 08:33:08
Iteration 5: Accuracy: 98.62% - Misclassified Samples: 2 - Timestamp: 2024-12-03 08:33:43
Iteration 6: Accuracy: 98.11% - Misclassified Samples: 3 - Timestamp: 2024-12-03 08:34:27
Iteration 7: Accuracy: 97.96% - Misclassified Samples: 3 - Timestamp: 2024-12-03 08:35:07
Iteration 8: Accuracy: 100.00% - Misclassified Samples: 0 - Timestamp: 2024-12-03 08:35:46
Iteration 9: Accuracy: 98.70% - Misclassified Samples: 2 - Timestamp: 2024-12-03 08:36:21

We used a small sample just for demo purposes. This concept simplifies the build process. The back end uses Ai to build out the design to match what you are attempting to achieve with the simple classifications.

Generally my samples on a basic run start with 20k samples, You can also provide your own examples into the mix which the ai will look at to further build its edge / gap tests for further analysis and training to get the results with in spec.

1 Like

Introducing Memviewer: Our New Memory Search Tool
(I know its like Dejavu from V2 SQL tool rehashed )

We are excited to announce the launch of Memviewer, our latest tool designed to enhance your experience with Kruel.ai. Accessing previous conversations can be cumbersome, Memviewer allows for seamless retrieval of past discussions.

Previously, our messaging application featured a terminal window that would scroll automatically, making it difficult to revisit earlier messages, especially after closing the app. Users had to rely on the AI to recall what was said or to retrieve a list of messages from a specific day. While effective, this approach was not the most user-friendly for referencing or copying information. This is where Memviewer steps inβ€”designed for ease of use and efficiency.

Memviewer offers a straightforward interface that allows users to select which user memory to search. It includes predefined timeframes and a custom calendar option for more precise date selections, enabling users to specify start and end times. Additionally, it supports keyword searches and includes an export feature for easy data extraction.

We also have realtime viewing which when checked follows current discussions for the user so you can follow along.

Now we can finally reflect back without the long chats
:slight_smile:

Its early version very similar to a tool from 2001 for our SQL database. Its not secure by any means as we currently are focused on building the base tools into the overall framework so we can expand them over time. The tools will also expand to allow us to use this to build outputs to work with KAINN so we can train neural nets with the data and or us it as test data against our KAINN brains so they learn from our unstructured data.

Ps. did you notice Kruel.ai VIO hiding in the wall paper. its like where’s waldo.

Enhancements to Voice Recognition: New Flag and Response Timeout

Last night, we implemented a significant update to our system by adding a new flag designed to bypass the Voice Recognition (VIO) user identification. This adjustment is in response to some accuracy challenges we’ve observed, which I’m currently investigating.

Voice recognition can be quite complex, particularly because our current design focuses primarily on embedding the basic shape of the voice without capturing extensive additional characteristics. This simplicity means that while our system is functional, achieving higher accuracy may require additional training or exploring alternative methods to improve predictive outcomes.

In conjunction with this, we introduced a feature that allows for a response timeout. Given our usage of a wake word, this enhancement prevents the AI from making assumptions and enables a more streamlined interaction. Now, after each message, if a follow-up message is received promptly, there’s no need to repeat the wake wordβ€”provided the conversation remains active within the timeout period. This functionality not only simplifies the user experience but also allows the system to enter a low-power state when conversations pause, enhancing overall interaction fluidity.

The primary goal of our voice recognition system is to correctly select and write to the user’s memory. However, with the newly added flag, we have temporarily hardcoded my user for this bypass mechanism.

We are excited about these developments and are committed to refining our voice recognition capabilities further to provide a seamless, intuitive experience for our users.

For those that want to see what the new memory map looks like vs the previous V6.

K7 Memory unlike K6 doesn’t use ontology relationships in the graph but rather use mathematical Semantic understanding to know the relationships

Here we have:
K7interaction nodes represented by the pink/purple nodes.
Reminders as the blue nodes.
Persona node which is orange

We are preparing tonight to build the persona editor we had with K6 into the new K7 message application so we can bring back the ability to switch Ai’s and memory once again like previous versions.