RAG & prompting best practices
How PrivateDocs AI finds passages in your local vault, and how to ask questions so answers are fast, precise, and well-cited. Everything runs on your machine — documents never leave the device.
How retrieval works
When you send a chat message with one or more documents selected, PrivateDocs AI embeds your question on-device, searches your vault with hybrid keyword + vector retrieval, optionally re-ranks the top passages, then builds a grounded prompt that includes only those passages. Answers include citations that point back to the source file and page or section.
For composing messages, reading citations, and conversation history, see Chatting & citations.
Select fewer documents for speed
The context bar above the chat input shows your active scope:
- General chat — no documents selected; the model answers without vault retrieval.
- Precision scope · 1 document — exactly one file is in scope.
- Using N documents — N files are checked in the Document Vault sidebar.
- For a specific clause, figure, or policy, select only that file.
- For a comparison across two contracts, tick those two — not the whole vault.
- Use Select All sparingly; it is useful for broad discovery, not for precise questions.
- When the app suggests narrowing selection after a precision-intent query, follow the hint.
Write precise, non-vague prompts
A specific prompt — naming the section, party, or clause you care about — gets a grounded, cited answer. Vague prompts force the model to guess and often miss what you wanted.
Weak prompt
“Summarize this.”
Stronger prompt
“Summarize the indemnification section of the uploaded MSA—bullet the cap, carve-outs, and survival period.”
Names a specific section and asks for bullet points the app can pull from your files.
Weak prompt
“What does the handbook say about remote work?”
Stronger prompt
“Under the employee handbook’s remote-work policy, is international travel during work hours permitted without manager approval?”
Points to a specific policy and a clear yes-or-no style question.
Weak prompt
“Rewrite the lease termination stuff.”
Stronger prompt
“Quote the three termination-for-convenience provisions in the draft lease and flag any conflicting notice periods.”
Asks for exact quotes and a concrete check instead of a vague rewrite.
The empty-chat suggestion chips are precise-prompt templates. Customize them under Settings → Chat & Inference → Most Used Prompts, or hide them if you prefer a clean start.
Thinking and Auto-Reasoning
- Thinking mode (toggle above the chat input): Shows the model's step-by-step reasoning before the final answer. Useful for complex multi-clause analysis.
- Auto-Reasoning for Calculations (Settings → Chat & Inference): Automatically flips Thinking on when your prompt involves math or totals on reasoning-capable models.
Leave Thinking off for simple lookups — it adds latency. Turn it on (or rely on Auto-Reasoning) when the question needs careful multi-step reasoning.
Smart Reranking
Smart Reranking (Settings → Document & Image Processing) runs a local cross-encoder over the retrieved passages and reorders them by true relevance to your question. You get sharper citations and fewer off-topic quotes, with a small memory and latency cost on the first query after a tier change.
The in-app App Tour walks through document scope, precise prompts, Thinking, and Smart Reranking the first time you open the desktop app. Replay it any time from Settings → Security → Replay App Tour.