Mem0mem0ai 2.0.20 · Python 3.10+
0%
1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
24 small wins to finish your pathNext lesson

A real model and a real embedder

Eighteen lessons, no key. Here is what changes when you use one, and it is two lines in one file.

The stand-ins went in through the langchain provider, and so does anything else. Replace the two instances and nothing else in the course moves.

python
from langchain_openai import ChatOpenAI, OpenAIEmbeddings

config = {
    "llm": {"provider": "langchain", "config": {"model": ChatOpenAI(model="gpt-5-mini")}},
    "embedder": {"provider": "langchain", "config": {"model": OpenAIEmbeddings()}},
    "vector_store": {"provider": "qdrant", "config": {
        "path": "memories", "embedding_model_dims": 1536}},
}
Run this one yourself. It needs your own key, and what comes back depends on the model you point it at, so there is nothing printed here to compare against.

The dimension

embedding_model_dims changes with the embedder, and getting it wrong is the first error most people hit. The stand-in made 64 numbers; OpenAI's small embedding model makes 1536. Say 64 with a real embedder and the store rejects the first insert.

A store that already holds memories at one length cannot take another. Changing embedder means re-embedding everything, which in practice means adding it all again into a new directory.

What else changes

Extraction gets much better. The stand-in keeps sentences; a real model rewrites them into standalone facts, merges duplicates, and notices when a new sentence contradicts an old one, which turns the UPDATE events from lesson 15 from theory into something you see.

Search starts matching meaning. The limitation from lesson 6 disappears: how should we contact him finds the email memory without sharing a word with it. This is the single biggest visible difference.

Custom instructions start working. Lesson 17 proved the rule reaches the model; with a real one behind it, the rule is obeyed.

It costs money and time. Every add is a model call and every memory is an embedding call. A chat with twenty turns is twenty extractions unless you batch them, which is the main thing to think about before putting this in a loop.

Keep the stand-in

Do not delete it. A local model and embedder make a test suite that runs on every commit for nothing, which is exactly what lesson 22 needs.

Try it yourself
  • Set a key, swap the two lines, and search with words that appear in no memory.
  • Leave embedding_model_dims at 64 with a real embedder and read the error.
  • Add a contradicting fact with a real model and look for an UPDATE event.

This is what real progress feels like.