This repository contains a production-ready scaffold implementing the five-persona RAG memory system (Archivist, Formalist, Synthesist, Strategist, Curator) plus routing, ontology tagging, benchmarks, UI, Dockerization, tests, and a LaTeX paper.
Contents
memory_routing_schema.jsonβ JSON Schema for memory routing records.prompts.pyβ Persona prompt templates.curator.pyβ routing implementation and curator logic (simulated LLM).ontology.pyβ vector tagging ontology.tagger.pyβ stub for embedding tagging projection.route_tests.pyβ pytest suite for routing.benchmark.pyβ synthetic failure-mode benchmark.app.pyβ minimal Streamlit UI for adding memories and seeing routing.samples/β example.memoryfiles.Dockerfileanddocker-compose.ymlβ containerization.main.texβ LaTeX paper draft.requirements.txtβ Python dependencies.
Usage (development)
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pytest
streamlit run app.pyNotes
- LLM calls are stubbed/simulated. Replace the TODO markers in
curator.pywith real LLM calls (OpenAI/Anthropic/local). - Embedding projection functions in
tagger.pyare placeholders; integrate your vector model (sentence-transformers or cloud embeddings) and train regressors to map embeddings to ontology scores.