DEV Community

thejus bs
thejus bs

Posted on

My AI Mentor Remembered Every Bug I Kept Repeating — And Wouldn’t Let Me Ship With It Again.

I think you’re doing that loop thing again.

That wasn’t me. That was my app.

At some point, CodeMentor stopped reacting to my code and started recognizing how I write it. That shift—from response to pattern recognition—is what this project is really about.

What This System Actually Does

CodeMentor is a React app that combines:

  • Groq (LLaMA 3.3 70B) for fast feedback
  • Hindsight for long-term memory

Instead of treating every submission as new, it builds a memory of your behavior over time.

Each interaction follows:

  • Recall → Analyze → Retain

  • 📸 Screenshot:

  • Memory as Context, Not Storage

  • Most people think memory means saving more data.

  • What matters is using it at the right moment.

Before every review, the system recalls past patterns:

const r = await hs.recall(bankId, query);
const mems = r.results || [];

That memory gets injected into the prompt.

Now the model doesn’t just see your code—it sees your history.

📸 Screenshot:

The Shift: From Feedback to Pattern Detection

After a few sessions, something interesting happens.

Instead of generic advice, the system starts saying things like:

  • “You’ve done this before”
  • “This looks similar to your last mistake”

That’s not intelligence—it’s memory applied correctly.

Closing the Loop

Every interaction becomes future context:

  • await hs.retain(bankId, Mistakes: ${mistakes.join(", ")});
  • That’s the entire loop.
  • Simple—but powerful.

📸 Screenshot:

Why This Matters

Without memory:

  • You improve randomly

With memory:

  • You improve systematically
  • Final Thought
  • This isn’t about smarter models.
  • It’s about giving models memory of you.

Top comments (0)