Autonomous Agents

Compiling Thought: Building a Prompt Compiler for Self-Improving AI

Compiling Thought: Building a Prompt Compiler for Self-Improving AI

How to design a pipeline that turns vague goals into smart prompts

🧪 Summary

Why spend hours engineering prompts when AI can optimize its own instructions. This blog post introduces a novel approach toward creating a self-improving AI by treating prompts as programs. Traditional AI systems often rely on static instructions rigid and limited in adaptability. Here, we present a different perspective: viewing the Large Language Model (LLM) as a prompt compiler capable of dynamically transforming raw instructions into optimized prompts through iterative cycles of decomposition, evaluation, and intelligent reassembly.

Thoughts of Algorithms

Thoughts of Algorithms

How a self-evolving AI learns to reflect, score, and rewrite its own reasoning

🧪 Summary

What if an AI could think not just solve problems, but reevaluate its beliefs in the face of new information?

In this post, we introduce a system that does exactly that. At the core of our pipeline is a lightweight scoring model called MR.Q, responsible for evaluating ideas and choosing the best ones. But when it encounters a new domain, a new goal, or a shift in task format, it doesn’t freeze it adapts.

General Reasoner: The smarter Local Agent

General Reasoner: The smarter Local Agent

🔧 Summary

The General Reasoner paper shows how we can train LLMs to reason across domains using diverse data and a generative verifier. In this post, I walk through our open-source implementation showing how we built a modular reasoning agent capable of generating multiple hypotheses, evaluating them with an LLM-based judge, and selecting the best answer.


🧠 What We Built

We built a GeneralReasonerAgent that:

  • Dynamically generates multiple hypotheses using different reasoning strategies (e.g., cot, debate, verify_then_answer, etc.)
  • Evaluates each pair of hypotheses using either a local LLM judge or our custom MR.Q evaluator
  • Classifies the winning hypothesis using rubric dimensions
  • Logs structured results to a PostgreSQL-backed system

All of this was integrated with our existing co_ai framework, which includes: