{"id":48695478,"url":"https://github.com/omnipotence-eth/llm-wiki","last_synced_at":"2026-04-11T07:13:35.446Z","repository":{"id":350153129,"uuid":"1205379319","full_name":"omnipotence-eth/llm-wiki","owner":"omnipotence-eth","description":"Git-backed LLM knowledge wiki — Karpathy's LLM Wiki pattern with LangGraph pipelines","archived":false,"fork":false,"pushed_at":"2026-04-09T04:07:52.000Z","size":334,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-09T06:12:34.234Z","etag":null,"topics":["bm25","instructor","knowledge-base","langgraph","litellm","llm","obsidian","pydantic","python","wiki"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/omnipotence-eth.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-08T23:03:38.000Z","updated_at":"2026-04-09T04:07:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/omnipotence-eth/llm-wiki","commit_stats":null,"previous_names":["omnipotence-eth/llm-wiki"],"tags_count":3,"template":true,"template_full_name":null,"purl":"pkg:github/omnipotence-eth/llm-wiki","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omnipotence-eth%2Fllm-wiki","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omnipotence-eth%2Fllm-wiki/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omnipotence-eth%2Fllm-wiki/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omnipotence-eth%2Fllm-wiki/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omnipotence-eth","download_url":"https://codeload.github.com/omnipotence-eth/llm-wiki/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omnipotence-eth%2Fllm-wiki/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31671998,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T17:19:37.612Z","status":"online","status_checked_at":"2026-04-11T02:00:05.776Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bm25","instructor","knowledge-base","langgraph","litellm","llm","obsidian","pydantic","python","wiki"],"created_at":"2026-04-11T07:13:35.168Z","updated_at":"2026-04-11T07:13:35.440Z","avatar_url":"https://github.com/omnipotence-eth.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# LLM Wiki\n\n**Git-backed knowledge base maintained by LLM — Karpathy's LLM Wiki pattern**\n\n[![CI](https://github.com/omnipotence-eth/llm-wiki/actions/workflows/ci.yml/badge.svg)](https://github.com/omnipotence-eth/llm-wiki/actions/workflows/ci.yml)\n[![Python 3.13+](https://img.shields.io/badge/python-3.13%2B-blue?style=flat-square\u0026logo=python\u0026logoColor=white)](https://www.python.org/)\n[![LangGraph](https://img.shields.io/badge/LangGraph-pipelines-purple?style=flat-square)](https://langchain-ai.github.io/langgraph/)\n[![Tests](https://img.shields.io/badge/tests-113_passing-brightgreen?style=flat-square)]()\n[![Ruff](https://img.shields.io/badge/code%20style-ruff-black?style=flat-square\u0026logo=ruff)](https://docs.astral.sh/ruff/)\n[![License: MIT](https://img.shields.io/badge/license-MIT-green?style=flat-square)](LICENSE)\n\n[Quick Start](#quick-start) | [Architecture](#architecture) | [Commands](#commands) | [How It Works](#how-it-works)\n\n\u003c/div\u003e\n\n---\n\n## What Is This\n\nA CLI tool that builds and maintains a persistent knowledge wiki from your source documents. Instead of RAG (re-synthesize every query), the LLM incrementally compiles knowledge into interlinked markdown pages — a compounding artifact that gets smarter with every source you feed it.\n\nBased on [Karpathy's LLM Wiki pattern](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f). Obsidian-compatible. Git-versioned. Zero database.\n\n**Three layers:**\n1. **Sources** — your PDFs, articles, URLs (immutable, you curate)\n2. **Wiki** — LLM-generated markdown pages (concepts, entities, syntheses)\n3. **Schema** — `schema.yaml` controls how the LLM creates pages\n\n## Why\n\nLLMs hallucinate. Notes apps don't understand context. This tool bridges the gap — a git-backed knowledge base where an LLM structures your information on ingest and retrieves it intelligently on query. Every page has a validated schema, BM25 search finds what you need, and multi-provider LLM routing (Groq → Gemini → Ollama) means it works whether you have API keys or just a local model. Inspired by Andrej Karpathy's LLM Wiki pattern, built for anyone who wants their personal knowledge base to actually *understand* what's in it.\n\n## Architecture\n\n```mermaid\ngraph LR\n    A[sources/] --\u003e B[src/extract.py]\n    B --\u003e C[src/ingest.py\u003cbr/\u003eLangGraph]\n    C --\u003e D[wiki/*.md]\n    E[user question] --\u003e F[src/search.py\u003cbr/\u003eBM25]\n    F --\u003e G[src/query.py\u003cbr/\u003eLangGraph]\n    G --\u003e H[answer + citations]\n    G --\u003e|novel synthesis| D\n    I[src/lint.py] --\u003e D\n```\n\n## Quick Start\n\n```bash\n# 1. Use this template on GitHub, then clone\ngit clone https://github.com/YOUR_USER/my-wiki.git\ncd my-wiki\n\n# 2. Install\nuv sync\n\n# 3. Configure LLM provider (pick one)\ncp .env.example .env\n# Edit .env — add Groq or Gemini key (free tier), or use local Ollama\n\n# 4. Ingest a source\nwiki ingest papers/my-paper.pdf\n\n# 5. Query your wiki\nwiki query \"What are the key findings?\"\n\n# 6. Check wiki health\nwiki lint\n```\n\n## Commands\n\n| Command | What It Does |\n|---------|-------------|\n| `wiki ingest \u003cfile\u003e` | Extract text, create 5-15 wiki pages |\n| `wiki ingest --url \u003curl\u003e` | Ingest from URL |\n| `wiki query \"\u003cquestion\u003e\"` | Search wiki, synthesize answer with citations |\n| `wiki lint` | Find orphans, broken links, stale pages |\n| `wiki stats` | Page count, link density, tag distribution |\n\n## How It Works\n\n### Ingest Pipeline (LangGraph)\n\n```\nsource file → extract text → chunk → LLM generates pages → write markdown → update index → cross-link\n```\n\nThe LLM creates structured pages via `instructor` (Pydantic models), ensuring consistent frontmatter, tags, and cross-references.\n\n### Query Pipeline (LangGraph)\n\n```\nquestion → BM25 search → retrieve top pages → LLM synthesizes answer → optionally persist as new page\n```\n\nThe LLM decides if its synthesis is novel enough to become a permanent wiki page — turning exploration into durable knowledge.\n\n### Wiki Pages\n\nEvery page is Obsidian-compatible markdown with YAML frontmatter:\n\n```markdown\n---\ntitle: \"Transformer Architecture\"\ntype: concept\nsources: [\"papers/attention.pdf\"]\ntags: [\"deep-learning\", \"attention\"]\nconfidence: high\n---\n\n# Transformer Architecture\n\nThe Transformer uses self-attention...\n\n## Related\n- [[Self-Attention]]\n- [[BERT]]\n```\n\n## LLM Providers\n\nUses LiteLLM — works with any provider. Fallback chain: Groq → Gemini → Ollama.\n\n| Provider | Cost | Setup |\n|----------|------|-------|\n| Groq | Free (14,400 req/day) | `WIKI_GROQ_API_KEY` |\n| Gemini | Free (1,500 req/day) | `WIKI_GEMINI_API_KEY` |\n| Ollama | Free (local) | `ollama run qwen2.5:3b` |\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomnipotence-eth%2Fllm-wiki","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomnipotence-eth%2Fllm-wiki","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomnipotence-eth%2Fllm-wiki/lists"}