📝 Blog Articles
Building Clipper: An AI Image Generator You Control
“If you’ve ever pasted 50 prompts into an image generator one-by-one, this is for you. I hit my limit and built Clipper to solve it.”
📖 Summary
In the previous blog post I wrote a research paper: Cross-Modal Cognitive Mapping. This paper is about turning your conversations into images to gradually map your thought patterns. The implementation of this paper is an application called Prism.
A component of this app is image generation from prompts or your conversations. All of the Foundation models support this but it’s a pretty janky process where you have to generate the prompt paste it into a text box and download the image. I just went through a week of doing this while building a prompt toolkit. While I was doing this I kept wishing I built the app which I’m going to share with you now.
Read more →Is Freestyle Cognition Real? A Reasoning Models Verdict
“The best way to predict the future is to create it.” A. Lincoln
Summary
When you first hear about Freestyle Cognition, it might sound like just another buzzword:
“Talk to the AI a bit differently. Reflect. Iterate.”
But is there actually a real method underneath?
Or is it just a vibe a way of feeling like you’re doing something smarter?
We put that question to the ultimate test:
We asked a dedicated Reasoning Model to rigorously evaluate Freestyle Cognition, using structured thinking loops (ROW, CRITIC, GROW).
Cross-Modal Cognitive Mapping: A Technical Overview
Cross-Modal Cognitive Mapping
A Technical Overview of System Design and Implementation
Author: Ernan Hughes
Published: April 2025
Abstract
Cross-Modal Cognitive Mapping is a new framework designed to extend traditional text-based cognition modeling into multimodal representations.
This system combines text prompts, visual generation, human selection behavior, and semantic memory retrieval to better understand and track human conceptual architectures.
This post presents a technical overview of the core architecture, database design, embedding workflows, search functionality, and resonance mapping built during the initial research phase.
Read more →What Is Freestyle Cognition
“If you want something new, you have to stop doing something old.” Peter Drucker
Why AI Interaction Needs to Evolve
Today, most people interact with AI like it’s a vending machine:
Type request.
Wait for result.
Repeat.
It’s effective but deeply limited.
It’s like watching someone dig through concrete with their bare hands when a bulldozer sits nearby.
Freestyle Cognition changes that.
The Police Room and the Hidden Truth
You’ve seen it in every great detective movie:
The suspect sits in a bare interrogation room, silent.
But as the conversation unfolds question after question, misdirection after misdirection the suspect begins to talk.
Soon, they reveal truths even they didn’t realize they knew.
Uncovering Reasoning in LLMs with Sparse Autoencoders
Summary
Large Language Models (LLMs) like DeepSeek-R1 show remarkable reasoning abilities, but how these abilities are internally represented has remained a mystery. This paper explores the mechanistic interpretability of reasoning in LLMs using Sparse Autoencoders (SAEs) — a tool that decomposes LLM activations into human-interpretable features. In this post, we’ll: • Explain the SAE architecture used • Compute and visualize ReasonScore • Explore feature steering with sample completions • Provide live visualizations using Python + Streamlit
Read more →Optimizing Prompt Generation with MARS and DSPy
🕒 TL;DR
- We explore MARS, a multi-agent prompt optimizer using Socratic dialogue.
- We implement it using DSPy + Fin-R1 + EDGAR giving us an end-to-end financial reasoning pipeline.
- We deploy the whole thing to Hugging Face Spaces with a Gradio UI.
🌟 Introduction
Prompt engineering has become the defining skill of the Large Language Model (LLM) era a delicate balance between science and art. Crafting the perfect prompt often feels like an exercise in intuition, trial, and error. But what if we could take the guesswork out of the process? What if prompts could optimize themselves?
Read more →MR.Q: A New Approach to Reinforcement Learning in Finance
Introduction
In the rapidly evolving world of artificial intelligence, reinforcement learning (RL) stands out as a powerful framework for training AI agents to make decisions in complex and dynamic environments. However, traditional RL algorithms often come with a significant drawback: they are highly specialized and require meticulous tuning for each specific task, making them less adaptable and more resource-intensive.
Enter MR.Q (Model-based Representations for Q-learning)—a groundbreaking advancement in the field of reinforcement learning. MR.Q bridges the gap between model-based and model-free methods by achieving the high performance typically associated with model-based approaches while retaining the simplicity and efficiency of model-free algorithms. The secret behind MR.Q’s success lies in its ability to learn model-based representations without the need for costly trajectory simulations, setting a new standard for adaptability and efficiency in AI-driven decision-making.
Read more →Detecting AI-Generated Text: Challenges and Solutions
Summary
Artificial Intelligence (AI) has revolutionized the way we generate and consume text. From chatbots crafting customer responses to AI-authored articles, artificial intelligence is reshaping how we create and consume content. As AI-generated text becomes indistinguishable from human writing, distinguishing between the two has never been more critical. Here are some of the reasons it is important to be able to verify the source of information:
- Preventing plagiarism
- Maintaining academic integrity
- Ensuring transparency in content creation
- If AI models are repeatedly trained on AI-generated text, their quality may degrade over time.
In this blog post, we’ll explore the current most effective methods for detecting AI-generated text.
Read more →Shakespeare and the Bible: An AI Investigation
Summary
Could the greatest playwright of all time have secretly shaped one of the most influential religious texts in history? Some believe William Shakespeare left his mark on the King James Bible hidden in plain sight. With the power of AI, we’ll investigate whether there’s any truth to this conspiracy.
You can read about the conspiracy here:
PostgreSQL for AI: Storing and Searching Embeddings with pgvector
Summary
Vector databases are essential for modern AI applications like semantic search, recommendation systems, and natural language processing. They allow us to store and query high-dimensional vectors efficiently. With the pgvector extension PostgreSQL becomes a powerful vector database, enabling you to combine traditional relational data with vector-based operations.
In this post, we will walk through the full process:
Installing PostgreSQL and pgvector Setting up a vector-enabled database Generating embeddings using Ollama Running similarity queries with Python By the end, you’ll be able to store, query, and compare high-dimensional vectors in PostgreSQL, opening up new possibilities for AI-powered applications.
Read more →RAFT: Reward rAnked FineTuning - A New Approach to Generative Model Alignment
Summary
This post is an explanation of this paper:RAFT: Reward rAnked FineTuning for Generative Foundation Model Alignment.
Generative foundation models, such as Large Language Models (LLMs) and diffusion models, have revolutionized AI by achieving human-like content generation. However, they often suffer from
- Biases – Models can learn and reinforce societal biases present in the training data (e.g., gender, racial, or cultural stereotypes).
- Ethical Concerns – AI-generated content can be misused for misinformation, deepfakes, or spreading harmful narratives.
- Alignment Issues – The model’s behavior may not match human intent, leading to unintended or harmful outputs despite good intentions.
Traditionally, Reinforcement Learning from Human Feedback (RLHF) has been used to align these models, but RLHF comes with stability and efficiency challenges. To address these limitations, RAFT (Reward rAnked FineTuning) was introduced as a more stable and scalable alternative. RAFT fine-tunes models using a ranking-based approach to filter high-reward samples, allowing generative models to improve without complex reinforcement learning setups.
Read more →Self-Learning LLMs for Stock Forecasting: A Python Implementation with Direct Preference Optimization
Summary
Forecasting future events is a critical task in fields like finance, politics, and technology. However, improving the forecasting abilities of large language models (LLMs) often requires extensive human supervision. In this post, we explore a novel approach from the paper LLMs Can Teach Themselves to Better Predict the Future that enables LLMs to teach themselves better forecasting skills using self-play and Direct Preference Optimization (DPO). We’ll walk through a Python implementation of this method, step by step.
Read more →Mastering LLM Fine-Tuning: A Practical Guide with LLaMA-Factory and LoRA
Summary
Large Language Models (LLMs) offer immense potential, but realizing that potential often requires fine-tuning them on task-specific data. This guide provides a comprehensive overview of LLM fine-tuning, focusing on practical implementation with LLaMA-Factory
and the powerful LoRA technique.
What is Fine-Tuning?
Fine-tuning adapts a pre-trained model to a new, specific task or dataset. It leverages the general knowledge already learned by the model from a massive dataset (source domain
) and refines it with a smaller, more specialized dataset (target domain
). This approach saves time, resources, and data while often achieving superior performance.
Color wars: Cellular Automata fight until one domiates
Summary
This post is about color wars: a grid containing dynamic automata at war until one dominates.
Implementation
The implementation consists of two core components: the Grid and the CellularAutomaton.
1️⃣ CellularAutomaton Class
The CellularAutomaton
class represents individual entities in the grid. Each automaton has:
- Attributes: ID, strength, age, position.
- Behavior: Updates itself by aging, reproducing, or dying based on simple rules.
2️⃣ Grid Class
The Grid
manages a collection of automata. It: