spec(M4): RAG Knowledge Base — contextual retrieval and multi-turn chat memory #8

Open
opened 2026-05-19 07:46:44 -07:00 by pyr0ball · 0 comments
Owner

Goal

Robin's M2 chat answers from the LLM's training data only. M4 adds two things: a curated migration knowledge base Robin can retrieve from, and multi-turn conversation memory so Robin remembers what you said earlier in the session.

Knowledge base content

The knowledge base is a set of structured documents covering:

  • Software equivalents: macOS → Arch, Windows → Debian, Debian → Arch (see issue #4)
  • Common error patterns and their plain-language explanations
  • Distro-specific gotchas (AUR mechanics, pacman lock, apt held packages, etc.)
  • Terminal command translations (brew → pacman/paru, apt → pacman, etc.)
  • File path and config location differences between distros
  • Hardware/driver questions common at migration time (wifi, GPU, Bluetooth)

Content is seeded from the real friction points Xander and Alan's partner encounter during their migrations — this is the primary acceptance test.

Technical approach

Same chunk/embed/retrieve pipeline as cf-core (shared with Turnstone). Documents are chunked, embedded locally, stored in a SQLite vector table. At chat time, the top-k chunks most relevant to the user's question are prepended to the system prompt.

All embedding runs locally — no data leaves the machine.

Multi-turn memory

M2 sends only the current message. M4 keeps a rolling window of the conversation (last N turns) so Robin can answer follow-up questions without losing context: "How do I install that?" after "What's the Arch equivalent of Homebrew?" should work correctly.

Relationship to issue #4

Linux-to-Linux migration paths (Debian/Fedora → Arch) land here. The knowledge base is where distro-specific translation content lives. See issue #4 for the full spec.

Open questions

  • Xander: What are the questions you've actually had to look up since switching to CachyOS? Those are the first entries in the knowledge base.
  • How many turns of memory is useful before the context gets noisy? (Starting assumption: last 10 turns)
  • Should Robin indicate when it is using the knowledge base vs. answering from general LLM knowledge? (Transparency principle)
  • Should the knowledge base be community-editable (MIT layer) while the retrieval and chat logic stays BSL?

Dependencies

  • M1, M2, M3 merged
  • cf-core RAG pipeline (same as Turnstone#21)
  • issue #4 (Linux-to-Linux paths)
## Goal Robin's M2 chat answers from the LLM's training data only. M4 adds two things: a curated migration knowledge base Robin can retrieve from, and multi-turn conversation memory so Robin remembers what you said earlier in the session. ## Knowledge base content The knowledge base is a set of structured documents covering: - Software equivalents: macOS → Arch, Windows → Debian, Debian → Arch (see issue #4) - Common error patterns and their plain-language explanations - Distro-specific gotchas (AUR mechanics, pacman lock, apt held packages, etc.) - Terminal command translations (brew → pacman/paru, apt → pacman, etc.) - File path and config location differences between distros - Hardware/driver questions common at migration time (wifi, GPU, Bluetooth) Content is seeded from the real friction points Xander and Alan's partner encounter during their migrations — this is the primary acceptance test. ## Technical approach Same chunk/embed/retrieve pipeline as cf-core (shared with Turnstone). Documents are chunked, embedded locally, stored in a SQLite vector table. At chat time, the top-k chunks most relevant to the user's question are prepended to the system prompt. All embedding runs locally — no data leaves the machine. ## Multi-turn memory M2 sends only the current message. M4 keeps a rolling window of the conversation (last N turns) so Robin can answer follow-up questions without losing context: "How do I install that?" after "What's the Arch equivalent of Homebrew?" should work correctly. ## Relationship to issue #4 Linux-to-Linux migration paths (Debian/Fedora → Arch) land here. The knowledge base is where distro-specific translation content lives. See issue #4 for the full spec. ## Open questions - Xander: What are the questions you've actually had to look up since switching to CachyOS? Those are the first entries in the knowledge base. - How many turns of memory is useful before the context gets noisy? (Starting assumption: last 10 turns) - Should Robin indicate when it is using the knowledge base vs. answering from general LLM knowledge? (Transparency principle) - Should the knowledge base be community-editable (MIT layer) while the retrieval and chat logic stays BSL? ## Dependencies - M1, M2, M3 merged - cf-core RAG pipeline (same as Turnstone#21) - issue #4 (Linux-to-Linux paths)
pyr0ball added this to the M4: RAG Knowledge Base milestone 2026-05-19 07:46:44 -07:00
Sign in to join this conversation.
No labels
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/robin#8
No description provided.