No extra dependencies are required for the default mode.
Set $REPO_ROOT to the repository root before running the examples below:
export REPO_ROOT=$(git rev-parse --show-toplevel)Optional embedding providers:
sentence-transformers(if installed)openai(requiresOPENAI_API_KEY)
THEMIS_LLM_WIKI_EMBEDDING_PROVIDER(hashdefault,mock,sentence-transformers,openai)THEMIS_LLM_WIKI_EMBEDDING_MODEL(used bysentence-transformers)OPENAI_API_KEYandOPENAI_EMBEDDING_MODEL(used byopenai)
python3 $REPO_ROOT/scripts/llm_wiki_mvp.py index \
--source-root $REPO_ROOT \
--output $REPO_ROOT/artifacts/llm-wiki-mvp/index.jsonpython3 $REPO_ROOT/scripts/llm_wiki_mvp.py query \
--index $REPO_ROOT/artifacts/llm-wiki-mvp/index.json \
--question "How do I configure sharding?" \
--top-k 5 \
--min-score 0.15 \
--jsonThis mode keeps a compounding knowledge base under one workspace root:
raw_sources/immutable source copieswiki/pages/LLM-maintained pageswiki/index.mdcontent catalogwiki/log.mdappend-only ingest/query/lint timelinewiki/schema.mdmaintenance ruleswiki/state.jsonstructured state for links/assertions/tasks
python3 $REPO_ROOT/scripts/llm_wiki_mvp.py wiki-init \
--workspace-root $REPO_ROOT/artifacts/llm-wiki-workspacepython3 $REPO_ROOT/scripts/llm_wiki_mvp.py wiki-ingest \
--workspace-root $REPO_ROOT/artifacts/llm-wiki-workspace \
--source $REPO_ROOT/docs/architecture/llm_wiki_mvp_adr.md \
--title "LLM Wiki ADR"python3 $REPO_ROOT/scripts/llm_wiki_mvp.py wiki-query \
--workspace-root $REPO_ROOT/artifacts/llm-wiki-workspace \
--question "What are the key governance constraints?" \
--top-k 5 \
--min-score 0.1 \
--save-as-page \
--page-title "Governance Constraints" \
--jsonpython3 $REPO_ROOT/scripts/llm_wiki_mvp.py wiki-lint \
--workspace-root $REPO_ROOT/artifacts/llm-wiki-workspace \
--jsonLint reports:
- orphan pages
- missing backlinks
- stale synthesis pages
- unresolved contradiction-review tasks
- Query/chunk filtering blocks known prompt-injection style patterns and secret-exfiltration cues.
- Output reports
query_flagged_for_prompt_injectionandfiltered_unsafe_chunks. - Contradiction cues create explicit review tasks in persistent workspace mode.
- Persistent mode is still an MVP orchestration layer, not full RocksDB-native persistence.
- Retrieval is cosine top-k over stored vectors (no ANN index yet).
- Summarization and concept extraction are heuristic and should be replaced by stronger model workflows in production.
- Move workspace state (
pages,links,assertions,tasks,log) to ThemisDB-native storage. - Add graph-native traversal and contradiction resolution workflows.
- Add structured quality evaluation (Recall@k, MRR, p95 latency, citation coverage).