Skip to content
mentoor

Build a personal knowledge base with AI

For engineers

Projects, memory, grounding and just-in-time context for a personal knowledge base you can trust.

A personal knowledge base you can trust is a small set of notes that an assistant can search, quote and be checked against. It is not a pile of files the model has "learned".

The case

Dana is a backend engineer who has accepted a job in Madrid. She keeps about 400 markdown notes in a git repository: engineering decisions, reading notes on papers, meeting notes and a Spanish learning log. She wants three things. She wants to ask "what did I decide about caching?" and get an answer from her own notes. She wants a monthly memo built from those notes. And she wants her Spanish practice to follow her real mistakes.

Her first try was to paste a hundred notes into one chat. The answers sounded sure of themselves. One of them quoted a retry setting she had never written down. She had no way to tell which parts were hers.

Why it matters

A model answers from whatever is in its context, and it fills gaps with plausible text. A knowledge base is only worth having if you can see where each claim came from. Research on long inputs also shows that models use facts in the middle of a long context less reliably than facts at the start or end, so "paste everything" gets worse as the notes grow.

How to build it

Five parts, each from one skill.

1. Standing context in a project. Put the few files every chat needs into a Claude Project, a ChatGPT Project or a Gemini Gem: a short index, a style note, a glossary and current instructions. Keep single-chat material out. Assistant memory is a second store you did not write, so view it and fix it.

2. Grounding. For a question about one paper or one set of notes, attach exactly those sources and tell the model to answer only from them, to quote each claim with the file name, and to say "not in my notes" when the sources are silent. A source-bound notebook such as Gemini Notebook does this by design. Check two quotes against the originals every time.

3. Just-in-time lookup. Four hundred notes do not belong in one prompt. Give a coding agent (Claude Code, Cursor or similar) an index file and search tools. It loads the index, greps for a term, reads only the files it needs and cites them. This is progressive disclosure: short first, detail on demand.

4. Documents built from the notes. For the monthly memo, agree the structure first, with the recommendation and the ask on top. Draft one section at a time, giving the model the outline and a fixed glossary. Trace every number and citation back to a note or a real source.

5. A learning log that steers practice. Dana keeps a Spanish mistake log with an error category, a count and a corrected example. She estimates her level on the CEFR scale and asks the tutor for graded reading at that level. She checks the tutor's grammar against a reference.

A layout that supports all five:

kb/
  INDEX.md          one line per note: path, title, tags, date
  AGENTS.md         rules: search INDEX first, cite paths, say "not in notes"
  decisions/        one note per decision, dated
  reading/          one note per paper, with page or section names
  spanish/
    mistakes.md     category, count, corrected example

Before and after

Before: "Summarise my caching notes." The answer blends three notes, adds a TTL she never chose and cites nothing.

After: "Using only notes under decisions/, list each caching decision with its file name and one exact quote. If a point is not in the notes, write 'not in my notes'." The answer lists two decisions with quotes and one line saying the catalogue cache is not covered.

What goes wrong

  • Stale context. An old memory or an out-of-date file keeps steering answers after the facts changed. Review files and memories monthly.
  • Quotes that are not there. A model can produce a neat quote that the file does not contain. Search the file for the quote.
  • Silent misses. A scanned PDF with no text layer is invisible to search, and "not in my notes" may be wrong.
  • Private data in shared spaces. A shared project is read by everyone you shared it with. Keep employer and client material out.
  • Over-correcting tutors. A language tutor can "fix" a correct sentence or use another country's vocabulary. Treat its grammar as a claim to check.

Steps

  1. Set up the standing project

    Skill: context-projects-memory

    Create one project for the knowledge base. Attach INDEX.md, a style note and a glossary, and write short instructions with a review date. Check what the assistant has saved as memory and fix anything stale. Leave employer and client material out.

    Project contents

    Goal: Standing context for every chat

    1. Attach INDEX.md, style-notes.md and glossary.md only.
    2. Write instructions: cite note paths, say "not in my notes" when silent, reviewed 2026-12.
    3. Open memory settings and delete entries that no longer match the notes.
    4. Keep contracts, payroll files and employer roadmaps out of any shared project.
  2. Ground questions in named sources

    Skill: context-grounding

    For a question about a paper or a decision, attach only the matching files. Ask for the note path and an exact quote for each claim, and allow "not in my notes". Search the file for two quotes. If a source shows 0 words extracted, fix the file before trusting a "not stated".

  3. Let the agent look things up

    Skill: context-just-in-time

    Give the coding agent INDEX.md and two tools: search that returns paths with short snippets, and a read tool. Describe when to use each. Add a rule to search before answering about versions, names or settings it does not know.

    AGENTS.md rules

    kb/AGENTS.md

    # Notes agent rules1. Read INDEX.md first.2. Search before answering about versions, option names or plugins.3. Read at most 2 full notes per question.4. Cite note paths; if the notes are silent, say "not in my notes".
  4. Draft the monthly memo from the notes

    Skill: write-docs

    Agree the structure first: recommendation and ask on top, then evidence, then risks. Draft one section at a time with the outline and glossary in context. Recompute every number from its note, verify every citation, then ask a model for the weakest claims and judge which critiques are real.

  5. Turn the Spanish log into practice

    Skill: learn-language

    Keep spanish/mistakes.md with an error category, a count and a corrected example. Place yourself on the CEFR scale and ask for graded reading and role-play at that level and in the Spanish of the place you are moving to. Check surprising corrections and unfamiliar words in a reference.

    Mistake log, week 48
    Spanish mistake log
    CategoryCountCorrected example
    ser / estar7La sopa está fría.
    preterite / imperfect4Ayer fui al mercado.
    gender of nouns3el problema
  6. Review and prune every month

    Skill: context-projects-memory

    On the first of the month, open the project files, instructions and memories. Remove what is out of date or private, update dates, and rebuild INDEX.md so the lookup stays accurate.

Skills this scenario uses

Where to study