Model HQ

Process 500 PDFs On-Device for RAG — Build a Reusable Source in Minutes

Use Case

Build a Source in Model HQ — a bundle of documents (books, PDFs, manuals, handbooks, anything text-y) that becomes a shared source of truth for your chats, bots, and agents to query in plain English.

Once a Source is built, you can:

  • ask it questions in natural language (RAG),
  • reuse the same Source across Chat, Bots, and Agents,
  • scale it up — in this cookbook we ingest 500 UN resolution PDFs in real time on an Intel Lunar Lake AI PC.

It runs fully on your device. No Wi-Fi. No data leaving your machine.

Who This Is For

This is useful for:

  • HR teams bundling employee handbooks and policies for a self-serve assistant
  • Field tech / engineering teams packaging product manuals and runbooks
  • Legal teams keeping a shared library of templates and clauses
  • Operations / Compliance with hundreds of regulatory PDFs to search
  • Anyone building a chatbot, agent, or workflow that needs to look things up across many files

What You'll Learn

  • How to create a Standard Source in seconds
  • How to add and ingest documents (including the sample files that come with Model HQ)
  • How parsing works (Digital vs OCR vs Vision Model) and when to switch
  • How to test a Source with Semantic, Keyword (AND/OR), and Exact search
  • How to tune Context Top-N and Context Target Size for better answers
  • How to use the same Source inside Chat (and later in Bots and Agents)
  • How to scale up — watch 500 UN resolution PDFs ingest in real time on a Lunar Lake AI PC

Ingredients (What You Need)

  • Model HQ installed on your device.
  • A local model that supports chat / RAG (we use Llama 3.2 3B by default). It downloads automatically the first time you run it.
  • Some documents to bundle. The sample files that ship with Model HQ work great. They live at C:\Users\<username>\llmware_data\sample_files\. Try the Books folder for a small bundle, or the UN resolutions folder for a big one.
  • No coding required.

Watch the Demo

Want to follow along on video? Here's the full walkthrough on the Model HQ YouTube channel — "Process 500 PDFs On-Device for RAG and Agents in 30 seconds?! Model HQ Sources Demo (Real-Time)". Useful timestamps are called out in each step below.

Quick Steps (Build a Source in 2 Minutes)

If you just want to copy what's in the video, here's the short version. The detailed walkthrough is right after.

  1. Open Source → Build New, click >.
  2. Name the Source (e.g. ebooks). Leave Encrypt Source off (these are public docs). Source Type: Standard.
  3. Click Add Docs → browse to C:\Users\<username>\llmware_data\sample_files\ → pick a few PDFs (e.g. Bill Gates biography, The Beatles, The Great Gatsby) → Save + Exit.
  4. Test it: under Test, pick All Documents, type a natural-language question (e.g. "Where did Bill Gates go to school?"), pick a model (e.g. Llama 3.2 3B), click Run.
  5. Save and exit. You now have a reusable Source.
  6. (Optional) Use it in Chat — open Chat, attach the saved Source, ask a question, and Model HQ will retrieve passages from your Source before answering.
  7. (Optional) Scale up — repeat steps 1–3 with 500 UN resolution PDFs to see ingestion at scale.

That's the whole thing. The rest of this cookbook explains the why and shows what good queries look like.

What Is a Source, Exactly?

A Source in Model HQ is a bundle of documents that becomes a single, queryable knowledge base. Think of it as a folder with super-powers:

  • Bundle — drop in PDFs, DOCX, PPTX, XLSX, CSV, TXT, MD, WAV, PNG, JPG, even ZIPs.
  • Parse + index — Model HQ parses each file, splits it into text chunks, and indexes them on-device. (See What is parsing?.)
  • Query — ask questions in plain English; Model HQ retrieves the most relevant chunks (RAG) and the model answers from them.
  • Reuse — the same Source works in Chat, Bots, and Agents.

There are two flavors:

  • Standard Source — for multi-format documents (PDF, PPTX, DOCX, XLSX, PNG, JPEG, …). This is what we'll use.
  • Dataset Source — for structured data (CSV, JSON). Different interface; covered separately under Dataset.

Step-by-Step Walkthrough

1. Open the Source Interface

Goal: get to the Source builder. (Video: ~1:08)

  1. From the Home Screen, click Source in the left sidebar.
  2. Click Build New to start a new Source.
  3. Click > to continue.

2. Configure the Source — Name, Encryption, Type

Goal: set up the basics. (Video: ~1:46)

Fill in the RAG Builder – Source form:

  • Source Name — something descriptive. We'll use ebooks. This is the name you'll see later in Chat / Bots / Agents when attaching it.
  • Encrypt Source — leave off for public documents; turn on for sensitive material (encrypts the Source at rest on disk).
  • Source Type — pick Standard (multi-format documents). Choose Dataset instead only if you're bundling CSV / JSON.

3. Add Documents to the Source

Goal: drop the actual files into the bundle. (Video: ~2:08)

  1. On the RAG Builder page, click Add Docs.
  2. Browse to C:\Users\<username>\llmware_data\sample_files\.
  3. For our ebooks bundle, pick three very different books:
    • Bill Gates biography
    • The Beatles
    • The Great Gatsby
  4. Click > to add each one, then Save + Exit when you're done.

Model HQ parses each document on-device, splitting it into searchable text chunks.

4. (Optional) Tune Parsing Options

Goal: choose how documents are turned into searchable text.

Click the Configure (⚙️) icon on the upload screen to control parsing:

OptionDefaultWhen to change
PDF Parsing OptionsDigital (fastest)Switch to OCR for scanned PDFs / image-based PDFs.
Image Parsing OptionsOCRSwitch to Vision Model when you need richer descriptions of image content.
Text Chunk Size400–600 tokensSmaller = more precise retrieval. Larger = more context per chunk.
Interpret CSV as DB TableOFFTurn on if your CSV is structured tabular data (allows accurate column queries).

5. Test the Source — Pick a Search Strategy

Goal: make sure the bundle actually contains what you think it does. (Video: ~3:17)

The RAG Builder offers two ways to interrogate a Source: Search and Test.

Search (no model needed)

Use Search to retrieve raw passages without invoking a chat model. Pick one of four strategies:

StrategyWhat it matchesExample
SemanticRelated meanings, even if exact words differbenefits of eating apples → matches "health advantages of apples"
Keyword-ORAny of the wordsapple OR orange
Keyword-ANDAll of the wordsapple AND orange
ExactExact phrase, same order"artificial intelligence"

Semantic is the default — it's the most natural for "ask my docs" questions. Keyword and Exact are great when you know specific terms or phrases must appear.

Test (full RAG with a model)

Use Test to run an actual end-to-end RAG query: retrieve passages and have the model write a grounded answer. Inputs:

  • Select Test Document — a single uploaded document, or All Documents.
  • Question — a plain-English question (e.g. Where did Bill Gates go to school?).
  • Model — pick from your local models. Llama 3.2 3B is a solid default.
  • context_top_n — how many top-matching chunks to feed to the model (more on this in step 8).
  • context_target_size — target token size for the assembled context. If top_n chunks don't fill it, more chunks are added until they do.

Try a question for each book in the bundle:

  • Where did Bill Gates go to school? → should hit the Gates biography.
  • Where did Bill Gates go to university? → also Gates biography.
  • Who is Daisy? → should hit The Great Gatsby.

Each answer also shows the context — the exact passages it used and their source (file name, page).

6. Save the Source

Once you're happy with the test results, click Save + Exit and head Home. You'll now see the Source listed under Load Existing, ready to be reused anywhere in Model HQ.

7. Use the Source in Chat

Goal: ask the same questions from a regular chat — without re-uploading anything. (Video: ~4:48)

  1. Open Chat from the left sidebar.
  2. Pick a chat model (e.g. Llama 3.2 3B).
  3. Attach a Saved Source — pick ebooks.
  4. Ask a question like: Who are Bill Gates's children?

Chat will show the retrieved passages first (the context), then write an answer grounded in them. Same Source you built in step 6 — no rebuild, no re-upload.

8. Scale Up — 500 PDFs in One Source

Goal: prove this works at real-world scale. (Video: ~5:46)

Let's build a much bigger Source.

  1. Go back to Source → Build New.
  2. Name it UN_resolutions. Encryption off, Standard type.
  3. Click Add Docs and select the 500 UN resolution PDFs from your sample files. Each is roughly 1.5–5 pages long.
  4. Click > to start ingestion.

On the demo machine (Intel Lunar Lake, 32 GB), all 500 PDFs were parsed and indexed in roughly 30 seconds, real time, with no internet connection. (Speed depends on hardware — AI PCs with NPU acceleration are particularly quick.)

The Source view will list all 500 ingested documents. Save and exit when you're done.

9. Query a Large Source — and Tune Context Top-N

Goal: ask the 500-PDF Source a real question, then dial in how many passages it retrieves. (Video: ~7:21)

  1. From the UN_resolutions Source, open Test.
  2. Type: What are resolutions on women and agriculture?
  3. Model: Llama 3.2 3B. Leave context_top_n at the default 5.
  4. Click Run.

Model HQ digs through all 500 PDFs and returns the top resolutions touching on women, agriculture, sustainable inclusion, etc. — along with the source passages it used.

Now turn the dial:

  • Change context_top_n from 5 to 10.
  • Re-run the same question.

The model now sees 10 chunks instead of 5, giving you a broader answer with more cited resolutions.

10. (Next) Plug the Source into Bots and Agents

You've now got a reusable Source. Two natural next steps:

The Source you built once is the same Source those bots and agents will use — no duplication, no re-ingestion.

Other Useful Source Actions

The RAG Builder also gives you a few utilities:

  • Library — export the Source to the local library database.
  • Download — export the Source as a Markdown text file.
  • Links — if the Source was built from a web search, list just the links found.
  • Delete — remove the Source from the system.

Anatomy of a Source

[ Source: ebooks ]
        │
        ├── Bill_Gates_biography.pdf
        ├── The_Beatles.pdf
        └── The_Great_Gatsby.pdf
                │
                ▼
   Parsed (Digital / OCR / Vision) → Chunked → Indexed (on-device)
                │
                ▼
   Used by:  Chat   |   Bots   |   Agents
  • One bundle — many documents, parsed once.
  • Reusable — Chat, Bots, and Agents all read from the same Source.
  • Local — files never leave your device.

Summary Table

StepActionOutcome
1Open Source → Build NewBlank Source
2Name it, pick Standard typeSource configured
3Add Docs from sample_files\Documents ingested
4(Opt.) Tune parsing (Digital / OCR / Vision)Right parser for the right docs
5Test with Search + TestValidated retrieval quality
6Save + ExitSource ready to reuse
7Attach Source in ChatChat answers from your bundle
8Build a 500-PDF SourceReal-world scale on-device
9Tune context_top_n / context_target_sizeDial answer breadth vs precision
10Plug into Bots / AgentsSource becomes a building block
Need help?

Reach out to our team at support@aibloks.com