[PR #18] Organizing Old-System Materials as a Source Layer Plus a Wiki Layer Instead of a Vector Search
- What changed: Four ways to keep using the analyzed old system material were compared, and a structure with a raw-material layer and a wiki layer was chosen.
- Decision: Instead of vector search (RAG), the raw-material and wiki layers were chosen, and a test that hides secret values was added.
- Still unknown: How well the chosen structure works in real tasks has not yet been confirmed.
This is the record of a PR that organized the old-system materials analyzed so far so that later work can keep using them. No code changed; only the wiki documents, the checking tools, and this PR’s work log went in.
What I did and why
I asked to keep using the analyzed old-system materials through RAG (a way of finding the relevant material for a question and handing it to the AI), and Claude compared four options.
| Option | Content |
|---|---|
| A | A text store + grep (a text search command) |
| B | Vector RAG (search that finds texts with similar meaning) |
| C | A claude.ai project |
| D | An LLM wiki (the AI writes summary documents and keeps revising them) |
I chose A + D (a raw-material layer and a wiki layer). The wiki lives in docs/wiki/, and it is done together with the glossary (M0 item 7).
| Output | Content |
|---|---|
| Raw-material layer (shared drive) | 306 old documents turned into Markdown text, with secret values and contacts masked. Not stored in the repository |
Wiki layer (docs/wiki/) |
Management rules, lists, a raw-material list, records, 10 topic pages, and 3 tools (extraction, list building, and a citation checker) |
| Glossary | Four screen names and terms, chosen by me |
CLAUDE.md |
One line added: “for old materials, start from docs/wiki/index.md” |
Options considered
- Vector RAG was not built now. The material has already ended, so it does not change, and at about 8 MB of text, grep is enough. Making embeddings (turning texts into numbers for search) means sending the content to an outside company. Claude Code also uses agent search (the AI repeatedly reads and searches files) rather than vector search. If tests keep failing, a local hybrid search will be added.
- The raw-material layer is kept on the shared drive, and the wiki in the repository. The raw material contains people’s names and contract context, so it stays under the same access rights as the originals. The wiki is a summary, so it can be written without names or secrets, and it gets version history and PR review.
- Not all 306 documents went into the wiki. All 306 are listed one line each in the list. The topic pages move only the facts about where the source is, taken from the analysis documents already written.
- The masking rules were revised several times. The first rules left a test-account password, a server address in meeting notes, and a date of birth. In the other direction, the rules were so broad that codes and table text in a code definition were masked too. Both sides were checked against a list of known secret values and a random sample.
- HWP (Hangul document) extraction bug: a control character was filtered as a single character, so broken Chinese characters crept in. It was fixed to skip the length of the HWP control character (8 characters).
How it was checked
- Extraction: 306 of 518 files were extracted (203 copies are grouped), with no failures. Ten random files were checked against the originals.
- Masking: known secret values (test accounts, server addresses, auth keys, and dates of birth) were confirmed at zero. The shared drive was rechecked for dates of birth, also zero.
- Sources:
tools/check_citations.pyconfirmed that the 81 source references in the wiki point to the actual files and locations in the raw layer. There were no problems. - Names: the name list from the raw layer was used to check the whole wiki, with zero found.
- Fifteen test questions: 13 found the original location, which met the target of 13. Nine questions that the wiki covered were found at once, and questions that needed the raw layer took two or three query changes. A total that has to be counted from a table was not found.
Lessons
- Automatic masking has to be checked in both directions. Known secret values show what was missed, and a random sample shows what was over-masked.
- The value of the wiki was less about search and more about not having to re-check facts already confirmed. A question that needed two or three tries on the raw layer took one try in the wiki.