SIAgentNews.com
← All news

An LLM wiki may need a link graph, not a vector database, one developer argues

A dev.to author ranks wiki pages by who links to them plus keyword match, and says that beats similarity search for small, linked notes. Here is how the test went.

· First reported by DEV Community

0.30default weight given to link popularity versus keyword match

The short version

  • The script is about 380 lines of standard Python and combines link-based ranking with keyword scoring.
  • On a made-up 23-page wiki, the right SSO certificate page ranked first with a score of 0.84.
  • The most-linked page ranked fifth for that query, because it barely matched the words asked.
  • Ranking by links alone put the wrong pages on top, so the author weights keywords more heavily.
  • The tool only reads files and flags problems like broken links and uncited pages; people fix them.

Why it matters

If you are organizing notes for an AI assistant, this suggests the structure you already have may do much of the work that extra search infrastructure promises. It also shows a checkable, fixable approach: every connection is a link a person can inspect. The evidence is a demo on invented data, so it supports trying the simple route first, not skipping testing.

The argument in one paragraph

As dev.to reported, a developer has published a post claiming that most people building an "LLM wiki" reach for a vector database too early. The wiki idea comes from Andrej Karpathy: original sources stay untouched, a model maintains a set of linked Markdown pages (plain text files with simple formatting), and answers cite the pages they came from.

A vector database stores text as numerical fingerprints so it can find passages that are "similar" in meaning. The author's point is that a wiki already has something better to work with: its own web of [[wiki-links]] between pages. Chunking the pages for a vector index throws that web away, and then similarity scoring tries to guess it back.

How the ranking works

The author wrote a script called wiki_rank.py, about 380 lines of standard Python with no extra libraries. It builds a map of which pages link to which, and then scores each page two ways.

  • PageRank, the method Google originally used, treats a page as important if many important pages link to it.
  • BM25, a classic keyword-scoring formula, measures how well a page's words match the question. Titles count three times as much as body text.

The two scores are blended. By default, link importance gets a weight of 0.30 and keyword match gets the rest. The author's reasoning: words decide relevance, and the links break ties and lift a well-connected page above a near miss.

The script never writes to the wiki. A test checks that every file is byte-for-byte unchanged after a run, so a person still decides what gets fixed.

What the made-up test showed

The author built a fictional wiki for an invented company, Trestle: 23 pages, 16 raw sources and 78 links. It was seeded on purpose with the mess real wikis collect. One page about on-call duty is linked from many others, and another page covers TLS certificates, which also rotate but have nothing to do with single sign-on (SSO).

Asked how to rotate SSO certificates, the script put the SSO certificate page first with a score of 0.84, and listed the two source files it cites. The TLS page came second at 0.65. The on-call page had the highest link score in the wiki but landed fifth at 0.38, because it hardly mentions the topic.

The author then tried ranking by links alone. The on-call page and an incident-response page came out on top, and the SSO certificate page did not make the top five. Pure keyword search got the right first answer, which is why the author keeps some weight on links rather than all of it. Popularity, in the author's words, is not relevance.

That is the honest limit of the demo. The wiki is invented, and the author was testing one question, not running a benchmark.

A health check for the wiki itself

The most practical part may be the built-in audit. Because the wiki is a graph, the script can spot structural problems that a similarity search would never mention. On the test wiki it flagged:

  • three pages linking to a Refund Policy page that nobody wrote (a dangling link)
  • an old Zoom setup page that nothing links to (an orphan), last updated 256 days earlier
  • an on-call schedule that is linked but 113 days out of date, which the author says may be worse than an orphan because an agent can find it
  • a vendor list with no outbound links, and a data-retention page that states time periods but cites no source

The uncited page is the one to worry about, since an agent could quote a legal-sounding claim with nothing behind it.

Where it fits, and where it doesn't

The author is clear about scale. A vector index suits a large, changing pile of material you do not control, such as tickets, PDFs or chat logs. A Karpathy-style wiki of roughly a hundred sources and a few hundred pages is the opposite case. The post also notes that several tools can already read plain files, including Claude Code, Codex, Cursor and Zed, so one folder of Markdown can serve all of them and a human reader too.

The post ties this to Notion's announced "shared shared brain" for teams and agents. The author likes shared context but does not want it to live only inside one vendor's product, preferring a folder you can search, compare and move.

Treat the post as an argument from a developer blog, not a verified result. Its appeal is that every connection is something a person wrote or approved, so when an answer goes wrong you can see why.

What to watch

  • Does the approach hold up on a real wiki, not an invented 23-page one, and with other kinds of questions?
  • At what size does a wiki outgrow link-plus-keyword ranking and need similarity search?

Try it

If you keep notes for an AI assistant, link related pages by hand first. Then look for pages with broken links, no incoming links, or no cited source, and add vector search only if that still falls short.

Sources and links

Written by the SI Agent News Desk from the reporting above.Written with AI from the source above. Every number is checked against the source. Spot a mistake? Corrections.

Liked it? Say why

Add a line for other readers.

No account needed. We never show your email. Comments with links, ads or abuse are held and not shown. Your comment shows after a quick check.

More AI news