Code

Note. This is not the current RAG Proxy. It is a May 2026 snapshot from TechKnowFile: three Perl files as they were months ago. Production has moved on. Pins, the harness, the brain web UI, and Faculty Sparks are not in these files. Do not take this download as what runs today.

1,290
Proxy lines
870
Brain.pm
500
Ingest
May
2026 snapshot

What this snapshot is

In these files

  • A proxy between a chat app and a local model
  • Semantic search: meaning, not exact keywords
  • A dental brain of policy chunks (the May library)
  • Command-line ingest from markdown
  • Usual chat APIs, so you change the URL, not the app
  • Model-name routing, e.g. dental/… picks the brain

Not in these files

  • Pins (cheat sheets the proxy injects)
  • Harness (policy-number check after the answer)
  • Brain web UI (drag-and-drop, indexes immediately)
  • Two NVIDIA DGX Sparks (Faculty generation)
  • The existence guard and later faithfulness checks
  • Anything shipped after TechKnowFile

Production on Faculty hardware has the later pieces. They are described on RAG Setup, the changelog, and the AI Kitchen talk. They are not in this download.

The three files

Each file is one job. View it in the browser, or download it. No install kit.

🔌

The middleman · 1,290 lines

ragproxy.pl

Sits between the chat app and the model. Searches the brain, injects the top policy chunks, forwards the request. The client never knows RAG is happening.

Has: intercept, search, inject, stream, dental/model routing.

Does not have: pins, harness, Spark backends, a web UI.

🧠

Vector search · 870 lines

Brain.pm

One knowledge domain per brain. Split documents, embed them, store text and vectors, search by meaning. Dental stays in its own folder.

Has: chunking, embeddings, cosine search, SQLite plus a vector matrix.

Does not have: the drag-and-drop UI, pin matching, a policy-number checker.

📥

Document loader · 500 lines

ragproxy-ingest.pl

Command line: add markdown, list a brain, search it, rebuild vectors. This is how the May snapshot loaded policies.

Has: add, remove, list, create, rebuild, search from the terminal.

Does not have: drag-and-drop. That UI came later and is not this file.

Grab the snapshot

May 2026 only. Pins, harness, and the brain UI are not in these downloads.

ragproxy.pl Brain.pm ragproxy-ingest.pl

What came after, not in the zip

These run on Faculty hardware today. They showed up in the AI Kitchen talk. They are not in the three files above.

How this snapshot launches

This is the May path only, as written in the file header. Production on Sparks is a different deploy. See RAG Setup.

# May snapshot. Point the chat client at the proxy, not at the model. perl ragproxy.pl daemon # default port 7079 RAGPROXY_PORT=7070 perl ragproxy.pl daemon # Model name "dental/ministral-3" searches the dental brain.
How the setup works →