Table of contents
- What you’re building
- Prereqs
- Step 1 — Create the project folder
- Step 2 — Python venv + install packages
- Step 3 — Build your knowledge base (docs)
- Step 4 — Ingest + chunk + embed + index
- Step 5 — Ask questions (retrieve top matches)
- Step 6 — Optional web UI (Flask)
- Step 7 — Optional: connect to an LLM
- Bluebeam-specific RAG tips
- Maintenance checklist
1) What you’re building
RAGPythonLocalFAISS
You’ll create a folder of “truth” documents (your best Bluebeam JS snippets and notes). A Python ingest script will:
- Read all docs (Markdown/Text)
- Split them into chunks (small pieces)
- Create embeddings for each chunk (vector representations)
- Store them in a local FAISS index
Then, when you ask a question, Python will:
- Embed the question
- Search FAISS for the closest chunks
- Return the best matching snippets (and their source files)
✅ This alone is extremely useful: it stops “where did that snippet live?” and prevents mixing Acrobat JS that Bluebeam doesn’t support.
2) Prereqs
- Windows/macOS/Linux
- Python 3.10+ installed (3.11/3.12 is fine)
- Basic command line use
⚠️ If you want to use an LLM later, you can: (a) paste retrieved snippets into ChatGPT manually, or (b) call an API or local model. This guide keeps the core RAG LLM-agnostic (so it won’t break when APIs change).
3) Step 1 — Create the project folder
Create a new folder somewhere like:
bluebeam-rag/ docs/ index/ app.py ingest.py rag.py requirements.txt
What these are:
docs/= your Bluebeam JS knowledge base (markdown/text)index/= FAISS index + metadata JSON filesingest.py= builds the index from docsrag.py= retrieval function you can reuse anywhereapp.py= optional Flask web interface
4) Step 2 — Python venv + install packages
Windows (PowerShell)
cd path\to\bluebeam-rag python -m venv .venv .\.venv\Scripts\Activate.ps1 python -m pip install --upgrade pip
macOS / Linux
cd /path/to/bluebeam-rag python3 -m venv .venv source .venv/bin/activate python -m pip install --upgrade pip
Create requirements.txt
faiss-cpu sentence-transformers numpy flask
Install
pip install -r requirements.txt
Note: faiss-cpu installs a CPU version of FAISS (fast local vector search). Works great for a few thousand chunks.
5) Step 3 — Build your knowledge base (docs)
In docs/, create a small set of curated Markdown files. Start small (10–30 pages) and grow.
Recommended doc structure
docs/
00_README_OFFICE_STANDARDS.md
01_BLUEBEAM_GOTCHAS.md
headers/
header_fields_all_pages.md
limit_characters_multiline.md
page_numbering/
page_x_of_y_willsave_willprint.md
examples/
full_script_header_plus_pagenum.md
Example content template (copy into each doc)
# Title (what this solves) ## Where it runs - [ ] Console (Ctrl+J) - [ ] Document-level JavaScript - [ ] Field-level script (Calculate/Format/etc) ## Purpose What this does, in plain English. ## Known limitations / gotchas - Bluebeam quirk #1 - Acrobat-only API you must NOT use - Page coordinates notes ## Snippet (tested) ```js // paste working Bluebeam JS here