Looking for contributors for Short-Term memory project

Hello people, I've been working on this short-term memory.

Do you know when you are hearing a story and as you listen to it you start to create a "Scene" in your mind? Well, unless you have aphantasia that's what would probably happen:

- You hear some facts: the first image is formed in your mind. Let's say "I was in Lisbon and had 10 dollars in his pocket"

- Next, the story goes: "Then, I traveled to Porto and sold a hat for 50 bucks"

- Then, as the story unfolds, the state of the elements of the story will get new states.

For most of us, it's not hard to keep a clear image of the current "scene" of the story. But if we wanted, we could also take a single element, and trace back how it got there.

Nowadays, to my knowledge, the closest we get to that is the LLM's context. But as it grows, it gets hard and expensive to track down when facts happened during the evolution of the context. Even using CoT, in the end, LLMs are probabilistic machines and so, when it comes to precision recall, noise can be added to the output. Then you plug in some sort of external memory, *DBs, MD files, etc. These are great solutions for the "Big memory", but not necessarily great to fix context growth, or to understand the order of events.

So decided to play around and try to find a naive solution that would allow traceability and increase precision, while reducing the context of the conversation. Right now, I've been experimenting with Ontology triples following the RDF Standard.

The idea

Let's say that you tell it you moved from Lisbon to Porto. Ask "where do I live?" and you either get Lisbon, or you get Porto and the fact that you ever lived in Lisbon is gone. Overwriting loses the history; appending loses the present.

So I built a different shape and measured it properly. Everything runs local through Ollama.

Every asserted fact becomes a (subject, relation, object) triple filed under a canonical key:

user | location   
t1  lisbon    superseded   
t3  porto     current

Paraphrases land in the same slot without embeddings: "where I live", "my city", "my residence" canonicalize to the same key. A slot keeps every value it ever had, in logical time order. Newest is current, the rest are superseded. Nothing is deleted; facts get invalidated, not forgotten. So "where do I live?" reads the current value and "where did I live before?" reads the history, out of the same structure, with no separate archive.

Writing is immutable: each turn produces a new scene, so a failure mid-turn never leaves memory half-written.

The result that made me keep going

Same model (gemma4:12b), two different inputs:

  • reading the raw sessions, ~9,000 words: baseline
  • reading the compressed scene, ~550 words: +0.102 accuracy

16x less input, and it does better. Compression isn't the price you pay here. The noise the scene strips out duplicate facts, stale values, updates scattered across sessions, is exactly what was confusing the reader. On the clean scene, a small local model matched a much stronger reader working on raw text.

The benchmark, with the caveats attached

477/500 (95.4%) on LongMemEval-S under the official judging protocol, above Mastra's published per-indicator numbers on all six indicators. One reproducible pass over all 500 questions, checked against a canonical state file whose guard refuses to write if anything drifts.

The part I care about more than the score: every mechanism went in with a prediction committed to git before measuring, and an explicit bar for what would falsify it. Ten arms failed and are published as prominently as the ones that worked, plus one retraction. If you read one thing in the repo, read finding 23 in the findings log the same finding got written three times in one day, because the first two drafts concluded from small n and the third had to retract both.

Caveats that matter to this sub specifically. The router triggers and absence gates are regexes calibrated on LongMemEval's English corpus; in another language they don't fire without recalibration. Two indicators sit at their measured oracle ceiling, so further progress there needs a stronger reader model, not better retrieval. And the comparison against Mastra is against their published numbers, not a head-to-head rerun on my hardware.

What's still broken

Seven open findings, all written up with repros:

Reported speech becomes a plain fact. "They said there was gold" gets stored as there being gold. The negation survives only as a string inside the value.

A question in quotes gets read as an assertion. Typing "Does Lucas use Go?" ingested it as a claim, and it overwrote the correct value in that slot.

Partial names spawn parallel entities. "Lucas" and "Lucas Almeida" become different subjects, so half of what the scene knows about him is disconnected from the other half.

Three ways in, if you want to poke at it

Break the demo. There's a live chat with the scene inspector beside it. You watch slots being born, updated and superseded turn by turn, and each answer prints the facts that produced it. Talk to it for twenty minutes with facts that change. 24 findings so far came out of exactly this, 15 already fixed upstream. Highest-yield thing anyone can do here.

Take an open finding. #18 is the tractable one: deterministic repro, both code paths fail, and the fix is obvious. #23 already has its acceptance gate written down in advance, so you'd know immediately whether your fix worked.

Replicate where the numbers don't claim to hold. Another language, another model, another domain. The limits section is a list of things nobody has measured. A clean negative result gets published as one.

MIT, and CONTRIBUTING.md has the open findings in a table with what the work looks like for each.

Repo: https://github.com/natanloterio/scene-memory

Happy to take questions, including hostile ones about the benchmark. Those are the useful kind.

u/natanloterio — 14 days ago
▲ 5 r/ITPortugal+1 crossposts

Stanford AI Index 2026, um dos relatórios de 2026 mais importantes sobre o mercado de IA

u/natanloterio — 2 months ago
▲ 1 r/mcp

Pipe past MCP's context tax

I've been playing around with this new tool called LiveFoldersFS. It offers a new way to call tools directly or wrapping MCP's around it. It then creates virtual files that when read or written, will invoke a too.

The objective is to save tokens by not adding the result of tools bloating the LLM context

This is currently an experiment I've written in rust for fun 😊

Feel free to contribute

www.livefoldersfs.org

u/natanloterio — 3 months ago
▲ 1 r/rust

I've build LiveFolders: expose any tool/application as files

I've been working on LiveFolders, this is just a hobby project with the intent to explore if it would be possible to call tools as if they were files and then let the LLMs make use of it.

Since LLMs handle really well cli commands, like cat, echo, xargs, etc, it'd be fun to see them calling tools as if they were files. and as bonnus, using LiveFolders, the LLMs consume about 10% less tokens since the data orquestration is done on the cli side, instead of the llm itself.

https://www.livefoldersfs.org

https://preview.redd.it/ub44e6r4on2h1.png?width=846&format=png&auto=webp&s=30796d4cf74d64eb736ed9f6fd8b174f58e42b26

I'm a kotlin dev, but this is my first rust open sourced app

I'd love to hear what's your oppinion.

Cheers,

Natan

reddit.com
u/natanloterio — 3 months ago
▲ 4 r/foss

I built an open source project called LiveFoldersFS – looking for feedback

Hello community, I'm new here but have about 20 years of experience as SW.
I recently open sourced something I’ve been working on called LiveFoldersFS:

https://www.livefoldersfs.org

It’s basically an attempt to treat the filesystem more like a reactive system instead of a static tree you poll or manually watch with ad-hoc code.

The idea is to make folders behave more like live data sources where changes propagate in a structured way, rather than every app reinventing file watching logic differently.

Why I built it

I kept running into the same pattern across different projects: file watching logic ends up being messy, inconsistent, and tightly coupled to whatever app you’re building. Most solutions are still fundamentally polling/event wrappers around the filesystem.

I wanted something more structured that:

  • Treats directories as reactive units
  • Provides a consistent model for file change propagation
  • Makes it easier to build tooling that reacts to workspace changes without custom glue code everywhere

What it is right now

  • Core abstraction for “live folders”
  • Change propagation through directory structures
  • Event-driven model instead of polling
  • Designed to be embedded into tools rather than be a standalone app

It’s still early and I’m mostly interested in whether the abstraction itself is useful or if I’m overengineering something that already has better solutions.

Possible use cases I had in mind

  • Dev tools that react instantly to workspace changes
  • Local-first apps with reactive storage layers
  • Build pipelines triggered directly by filesystem structure changes
  • General tooling where filesystem events are a core primitive

What I’m looking for

Would be interested in feedback on:

  • Whether this is a useful abstraction or just unnecessary complexity
  • Existing projects that already solve this better
  • Where this would break down in real-world usage
  • Any performance or design issues I might be missing

Repo / docs:
https://www.livefoldersfs.org

reddit.com
u/natanloterio — 3 months ago
▲ 9 r/devpt

Bom dia, eu me chamo Natan e trabalho como engenheiro de software já tem uns 16 anos. Recentemente, liderei equipas dos projetos das apps Android da Hugo Boss e estou este ano a trabalhar num projeto SaaS.

Já participo desta comunidade tem algum tempo, e gostaria de sugerir um encontro em pessoa em algum lugar de Lisboa para partilharmos experiências relacionadas ao trabalho, empreendimentos ou projetos pessoais que estamos a trabalhar e talvez (por que não), beber uns copos.

Eu moro atualmente nos arredores da Rua da Dona Estefânia, mas posso me deslocar à qualquer sítio aqui em Lisboa =)

(este texto foi escrito sem ajuda da IA xD)

Obrigado!

reddit.com
u/natanloterio — 3 months ago

Hello guys, I've been trying to get cross-device authentication passkeys work with my Android and different desktop browsers on Unbuntu.

I'm a big fan of Vivaldi but its cross-device thing is not working at all. So I've decide do try other browsers and my only requirement is that I can login on bitwarden.com with cross-device passkeys.

So far, this has been my experience:

Browser bitwarden.com bitwarden plugin
Vivaldi Shows the QRcode, android doesn't find passkey associated Shows the QRcode, android doesn't find passkey associated
Firefox Doesn't offer support to cross-device auth with passkey. When I try to use passkey auth, the browser asks me for my fingerprint (my pc doesn't even has a fingerprint reader) Doesn't even show an option to login using passkey
Brave Reads the QRCode, Android can communicate via BT, but then site asks for master password again(?) Shows the QRCode, but android can't find passkey. Shouldn't the plugin use the same passkey configured on bitwarden.com? Check the video attached:

Honestly, It's impossible to migrate to passkeys when the experience seems so confusing, broken and buggy.

Password management is ( in my opinion ) one of the biggest reasons people stick to Google Chrome. Because it's a "happiness in the house" to migrate your life to other browsers.

If Firefox, Vivaldi, Brave (, and why not Edge?) sat together and decided to work on a solution for this, they'd have more changes on winning the browsers war.

It's astonishing that we have a solution for so many problems of security but still, we walk at ant's pace towards an uncertain future when it comes to personal online security.

https://reddit.com/link/1t3e2r2/video/d5go6j33l3zg1/player

reddit.com
u/natanloterio — 4 months ago