Starting a KB you will actually use¶
Audience: someone starting a first real knowledge base with Pinakes — in practice its maintainer, the
first time. Goal: from nothing to a KB that holds your own documents, answers from them, and has told
you what went wrong on the way. Every claim below was run against the published pinakes 0.32.7 on
20261019, from about 12:13 UTC, on CPython 3.13.16 and an Apple-silicon Mac — except the figures marked
as taken on 0.32.6, and the claims marked from the source or not run; the evidence, row by row, is
§ 5.1 of the option B plan.
Where something was not run, it says so. This is a checklist, not a tutorial: the Guide
says how each command works.
1. The machine¶
-
Install
pnkwhere your shell can find it, on the interpreter this project declares.- Pin
--python 3.13. On a machine whose newest Python is 3.15,uvx --from "pinakes[light]"did not resolve —onnxruntime>=1.24.2has no wheels with a matching Python ABI tag (e.g.,cp315) — and worked in 1.6 s with the pin. - Not
uv add, in a KB directory.uv add "pinakes[light]"exits 2 there (Nopyproject.tomlfound), and the README's Quickstart opened with it when this was measured; it has since been changed to say whereuv addcan be run. The Guide's route then wasuv init && uv add …, and it failed on that same machine (the Guide and the README now sayuv init --python 3.13, Guide § Install):uv initwroterequires-python = ">=3.15", anduv add "pinakes[light]"then did not resolve.uv init --python 3.13is the route that works: it wroterequires-python = ">=3.13"and a.python-versionof 3.13 (and, being plainuv init, a git repository, aREADME.mdandsrc/), and the sameuv addresolved — with--no-sync, so nothing was installed. The--barevariant resolves too but writes no.python-version, so a lateruv syncpicks 3.15 and fails. The project'spnkwould live in.venv/bin, off yourPATH(from how uv installs; not run). - Tell
pnk initwhich extra you installed (--backend light). A KB stamped for the default backend, with only[light]installed, stops on the first sync and names the two-line manifest edit that fixes it. - Weights come down on first use, and you do not choose the moment. Measured on 0.32.7 with an empty
Hugging Face cache: the first
pnk syncfetched the embedder (67 MB, 2 s by its progress bar); a laterpnk doctor— which is meant to be offline — fetched the reranker (1.1 GB, 11 s). That is fixed from 0.32.9: an offline load now asks fastembed for local files only, sodoctorprints a FAIL line for a model that is not cached and downloads nothing (reproduced against an empty temporary cache with the network forbidden; not run against real weights). On 0.32.8 and earlier, be online for the firstsyncand for the first command that loads the reranker:doctorwas measured; by the source so dosearch,askand an agent's firstservetool call (not run). Adoctoron a cache that does not exist yet prints two FAILs ending “Run once without --offline to populate the cache”.doctoris hard-wired offline and has no such flag;sync,search,ask,linksandservetake--offline, off by default, so the line means go online once:syncbrings the embedder, and the reranker comes with the firstsearchorask(and, on every published release up to 0.32.8, withdoctor). The cache lives wheredoctor'smodel cacheline says; budget about 1.2 GB for the light pair (the Guide's ~1.4 GB is the default backend's).
- Pin
2. The material¶
- What goes in is yours to choose; this page only fixes what must be true. Text you would search
again within a week; enough of it that a search does not simply return everything (more than the
eight results
final_kreturns — ten ordinary documents do it); nothing that cannot sit in a private repository. - The KB is its own private repository.
pnk init my-kb --name "My notes" --backend light, orpnk init . --name "My notes" --backend lightinside one you already have — measured, that leftREADME.md,.gitignoreandpyproject.tomlbyte-identical, and warned when.gitignoredid not ignore.pinakes/. A freshpnk initships a.gitignorethat covers.pinakes/; in a directory you adopt, add the line yourself before the first sync. - Commit the sidecars
syncwrites beside each document (<file>.pnk.yaml): they hold the permanent ids. - Plain text with a numbered outline needs one setting, before the first sync. A
.txtcorpus is chunked by size unless[chunking] headings = "numbered"is set:0 of 2189 chunks carry a heading pathby default and1865 of 1955 chunks carry a heading path (95%)with it, on six public RFCs — the only plain text tried. The grammar reads a dotted-decimal outline and, if its walk fails, gives that document no headings at all (MANIFEST).doctorreports the 0% and names the setting;syncsays nothing; changing it afterwards needspnk sync --rebuild, perdoctor's remedy text (not run). - A
.txtfile's title is its filename (title: rfc8089); edittitlein the sidecar. Markdown takes its heading.
3. The first sync¶
- Estimate in chunks, not bytes, and expect a range. The same machine ran 16 to 21 chunks a second: 7,137 chunks of this repository's Markdown (4.3 MB) took 338 s on 0.32.6 — 21 a second, 79 s per MB; 767 chunks of Markdown (360 KB) took 47 s on 0.32.7 — 16 a second, 130 s per MB, the gap from 21 not explained; 2,189 chunks of plain text (387 KB) took 120 s — 18 a second, 310 s per MB. Weights already cached.
- On a terminal you see
syncing: 3/8 documents (7.0/min). In a pipe or an agent session you see nothing until the two summary lines. - An interrupted sync loses nothing. Killed 12 s into a first sync that takes about 47 s uninterrupted,
pnk doctorexited 0 with no FAIL and WARN sync completeness … Runpnk sync. It resumes incrementally and keeps every embedding already written; the nextpnk syncprinted took over a stale sync lock left by a process that is no longer running and finished. Never--rebuildfor this.
4. What a healthy pnk doctor prints¶
Exit 0 is healthy: a WARN is not a failure. On the published 0.32.7 a fresh KB showed four WARNs before its first sync and five after it. (On 0.32.6, whose price table was 44 days old, the same check showed five and six — the extra one is the last row.)
| WARN | When | What to do |
|---|---|---|
embedding and reranker: revision unpinned |
whenever the revision is unset (from 0.32.9 a fastembed KB reads "files not pinned" instead) |
pin revision in pinakes.toml once you are settled. That pins files under sentence-transformers only. Nothing pins them under fastembed: Pinakes passes it no revision, and a revision you set there is reported as a label: see MANIFEST |
index: not built yet |
before the first sync only | pnk sync |
git hooks: not a git repository |
until the KB is one and pnk install-hooks has run — from the source: after git init alone it reads 0 of 3 installed |
doctor says freshness is git-triggered and a loose folder needs a manual or cron pnk sync; pnk install-hooks installs the hooks (Guide) — not run here |
calibration: no fitted thresholds |
after the first sync | honest, not a fault: confidence reports unknown until you fit thresholds against a golden set |
links: none authored |
after the first sync | pnk link when you have links to record |
price table: … N days old |
when the release is more than 30 days old | upgrade pinakes; adding max_price_age_days to [budget] also clears it (from the manifest reference, not run), as a decision about a safety setting |
doctor prints things that must not be pasted anywhere public: the model-cache path (your home
directory), the sync lock's hostname, and — when titles are still filenames — up to three document
paths. See § 6.
5. Check that it worked¶
“Started” means three things, and only the first two can be checked by a command:
pnk doctorreportsindex: N active documentswith N equal to the number of files yourincludepatterns select.- The probe passes for three documents. Take a sentence of eight words or more that occurs exactly
once in the whole KB (a repeated one would give a false miss — reasoned, not run), run
pnk search --kb my-kb "<the sentence>", and look at the first hit: it should be that document. A search over a KB whose whole index is eight chunks or fewer returns every chunk and proves nothing. This probe has not been measured for its pass rate — treat a miss as a finding to record (§ 6), not as proof the KB is broken.pnk searchprints chunk text, so do not run it inside an agent session against material that must stay private. - A dated line in the friction file (§ 6) saying one of friction, used, nothing to report or not used. A null log must tell no friction from no use, and only you can say which.
Attaching the KB to an agent (§ 6) belongs to “started” in the option B plan; it was not tested live.
6. Use it, and record what went wrong¶
pnk searchtakes--kb; so doespnk ask, which was not run here (per--helpit is free without--deep).-
Attach it to an agent with
.mcp.json, using the absolute path ofpnk:{ "mcpServers": { "pinakes": { "command": "/absolute/path/to/pnk", "args": ["serve", "/path/to/my-kb"] } } }command -v pnkprints the path. The Guide's snippet now shows the absolute path too; it used to say"command": "pnk", and beforepnkwas installed withuv tool, a barepnkwas not found on thePATHof any shell tried. Afteruv tool installit is on thePATHonly if uv's tool directory is (uv tool installprinted a warning that its directory was not on thePATHand nameduv tool update-shellas the fix — the fix itself not run). The absolute path is a precaution, not a measured need, and whether a live agent launches the entry with yourPATHwas not tested. An agent attached this way sees chunk text frompinakes_searchand whole documents frompinakes_get(from the source, not run): attach only a KB you are content to show it. - Write five real questions you had this week intoeval/questions.yamlbefore measuring anything, because a question set written after the result is not a test. - Keep aFRICTION.mdin the KB's own repository. One entry per surprise: the exact command, what the docs led you to expect, what happened. Start it with the dated line from § 5. The RFC corpus's record of ten entries, written against 0.7.1, is the model — every one has a recorded closure since. - Before anything reaches the public repository (as aretro.d/fragment): strip home paths, hostnames, document text, document titles and document paths. This repository is public; yours is not, and that is the point of keeping the log there first.