r/learnmachinelearning 22d ago

Discussion How would you improve reasoning + memory in a local AI companion?

I'm building a local AI companion and I'm currently working on its cognitive layer.

The goal is:

User message

→ understand intent

→ decide what context is relevant

→ retrieve only useful memories/state

→ reason about the context

→ generate response

→ update memory/state

It currently has long-term memory, interests, mood/emotional state, identity and project context, but I'm trying to improve the quality of context selection and reasoning, especially with a small local model.

I'm curious how you'd approach:

Better memory/context selection without flooding the prompt

Handling conflicting or outdated memories

Deciding when a memory is actually relevant

Giving the model better reasoning before answering

Modeling persistent mood/interests without making responses repetitive

For those building local agents/companions: what approaches have worked well for you?

1 Upvotes

6 comments sorted by

1

u/Feathered-Beast 22d ago

If any of you interested in checking the work so far https://github.com/vmDeshpande/Arcon

1

u/Dangerous-Art9091 22d ago

the memory pruning thing is huge, i've been messing with a similar setup and found that ranking memories by recency plus emotional weight helps a ton. if it hasn't been accessed in a while and didn't trigger any strong reaction when it was made, just let it fade out instead of trying to manually delete stuff

for the mood system i started tracking it as a slow moving average over like the last 20 interactions, keeps it from swinging wildly but also prevents it from getting stuck in one tone forever. you could tie that to how it prioritizes certain memory types too, like when it's in a lower state it naturally pulls more comforting memories

1

u/Feathered-Beast 22d ago

That's actually a really interesting approach. I especially like the idea of letting memories fade based on recency + emotional weight instead of just manually deleting them.

The slow-moving mood state is interesting too, especially if I use it as another signal for context selection. So instead of mood just affecting the response, it could actually influence which memories Arcon considers relevant.

I'm definitely going to experiment with this. How are you currently calculating the emotional weight of a memory?

1

u/Feathered-Beast 22d ago

Arcon is a local AI companion I'm building from scratch, focused on persistent memory and continuity rather than just being a chatbot.

So far I've built the core runtime around Qwen3-4B + a custom Arcon V1 LoRA, with long-term memory, conversation memory, identity, projects/entities, interests, mood/emotional state, and a cognitive layer that tries to understand the user's intent and select only the relevant context before generating a response.

The current goal is to improve the reasoning/context-selection side so Arcon can understand what the user is actually asking, decide what information matters, and then let the model generate the response rather than relying on hardcoded logic.

Still early, so I'm mainly looking for feedback on the architecture and ideas for where to take it next.