You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(readme): document the Gemini provider + partials/preambles paradigm for 0.2.0
README sections added/updated:
- Lede + Key Features list — Gemini in the provider list
- Network use table — new Gemini row + a note on the grounding-redirect resolution requests
- Initial Setup — new step 2 "Configure Google Gemini" between Perplexity and Perplexica; LM Studio renumbered to step 4
- New "Using Google Gemini" section between Using Perplexity and Using Perplexica, including why Gemini's per-segment citations beat Claude's
- Command Reference — new "Google Gemini Commands" subsection
- Directory Templates — new "Partials and preambles" subsection documenting the {{include: name}} directive + auto-attached preambles paradigm
- Table of Contents — Gemini link added
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+111-4Lines changed: 111 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1

2
2
# Perplexed: AI Content Generation for Obsidian
3
3
4
-
**Perplexed** is an Obsidian plugin that enables AI-powered content generation with source citations using [Perplexity](https://www.perplexity.ai/), [Anthropic Claude](https://www.anthropic.com/), and [Perplexica / Vane](https://github.com/ItzCrazyKns/Vane) (self-hosted). This plugin brings research-grade AI capabilities directly into your Obsidian workspace, allowing you to generate well-cited content for your notes.
4
+
**Perplexed** is an Obsidian plugin that enables AI-powered content generation with source citations using [Perplexity](https://www.perplexity.ai/), [Anthropic Claude](https://www.anthropic.com/), [Google Gemini](https://ai.google.dev/) (with Google Search grounding), and [Perplexica / Vane](https://github.com/ItzCrazyKns/Vane) (self-hosted). This plugin brings research-grade AI capabilities directly into your Obsidian workspace, allowing you to generate well-cited content for your notes.
[2]: 2025, Jun 16. [Governance, risk and compliance (GRC): Definitions and resources](https://www.diligent.com/resources/guides/grc). Published: 2025-05-27 | Updated: 2025-06-16
16
16
> ```
17
17
18
-
- **Multiple AI Providers**: Support for Perplexity, Anthropic Claude, Perplexica / Vane (self-hosted), and LM Studio (local)
18
+
- **Multiple AI Providers**: Support for Perplexity, Anthropic Claude, Google Gemini (with Google Search grounding), Perplexica / Vane (self-hosted), and LM Studio (local)
19
19
- **Streaming Responses**: Real-time streaming of AI responses for better UX
20
20
- **Flexible Configuration**: Customizable endpoints, models, and parameters
21
21
- **Deep Research Mode**: Comprehensive research across hundreds of sources
@@ -32,9 +32,18 @@ explicitly selected when invoking selection-based commands.
### 2. Configure Google Gemini (Free tier available)
102
+
103
+
Google Gemini is Google's commercial AI service. The `google_search` grounding tool returns per-segment citation attribution — meaning each cited sentence is mapped back to the specific URL it came from, which becomes the verbatim quote in your `### Citations` footer. AI Studio's free tier requires **no credit card** to get started.
104
+
105
+
1. **Get API key**:
106
+
- Visit [Google AI Studio](https://aistudio.google.com/apikey)
107
+
- Sign in with a Google account
108
+
- Click "Create API key" → copy the `AIza…` string
109
+
110
+
2. **Configure in plugin**:
111
+
- Open Obsidian Settings → Community Plugins → Perplexed
112
+
- Scroll to **Gemini (Google)**
113
+
- Paste your API key into "Gemini API key"
114
+
- Default model: `gemini-flash-latest` (always-current Flash, free-tier friendly) — `gemini-pro-latest` and pinned `gemini-2.5-pro` / `gemini-2.5-flash` also available
115
+
- Leave **Enable Google search grounding by default** on for source-cited research
116
+
- Leave **Resolve citation urls** on — this is what turns the grounding-redirect URLs into the real source URLs in your citations footer
Perplexica / Vane is a free, open-source AI search engine that you run
94
121
**locally on your own machine**. This plugin does not bundle the server
@@ -122,7 +149,7 @@ before the "Ask Perplexica / Vane" command will work.
122
149
- Pick a focus mode, optimization mode, and the local model you've
123
150
configured the server to use
124
151
125
-
### 3. Configure LM Studio (Optional)
152
+
### 4. Configure LM Studio (Optional)
126
153
127
154
For local AI processing without internet dependency:
128
155
@@ -217,6 +244,58 @@ AI is changing how we work.
217
244
Artificial Intelligence (AI) is fundamentally transforming how we work across various industries and sectors. From automating routine tasks to enabling more sophisticated decision-making processes, AI technologies are reshaping traditional workflows and creating new opportunities for productivity and innovation.
2.**Run Command**: Type "Ask Gemini" and select it
253
+
3.**Enter your question** in the textarea
254
+
4.**Configure options** in the modal:
255
+
-**Model**: `gemini-flash-latest` (recommended, free-tier friendly), `gemini-pro-latest`, or pinned 2.5 versions
256
+
-**Enable Google search grounding**: server-side `google_search` tool; emits per-segment citations
257
+
-**Append Google searches list**: appends a Markdown bullet list of the queries Gemini ran, each linked to `google.com/search` (Markdown-native substitute for Google's required Search Suggestions chip)
258
+
-**Resolve citation urls**: resolves the `vertexaisearch.cloud.google.com` grounding-redirect URLs to durable source URLs + real page titles before writing the citations footer
259
+
-**Stream response**: incremental writing to the note as the response arrives
-**gemini-pro-latest**: Always-current Pro alias for deepest reasoning
265
+
-**gemini-2.5-pro**: Pinned Pro version (free-tier quota typically exhausted; paid tier required)
266
+
-**gemini-2.5-flash**: Pinned Flash version for reproducibility
267
+
268
+
### Why Gemini's citations are different
269
+
270
+
Gemini's `groundingSupports[]` carries per-segment attribution that survives the full response round-trip — meaning the `### Citations` footer contains the verbatim quote per source, attached to the prose above it. Compare to Claude's `web_search_20260209`, where the dynamic-filter sandbox post-processes search results and per-claim attachment doesn't survive: text blocks come back with `citations: null`.
271
+
272
+
The plugin walks two layers of provenance:
273
+
274
+
| Layer | Field | What it gives you |
275
+
|---|---|---|
276
+
| Page-level |`groundingChunks[]`| URL + title per page Gemini consulted |
277
+
| Segment-level |`groundingSupports[]`| Text span (`segment.text`) → indices into `groundingChunks[]`|
278
+
279
+
Page-level chunks become URL-and-title fallbacks; segment-level supports enrich them with the verbatim quote Gemini grounded against. Citation footer mirrors Claude's exactly (`[N]: [Title](url). > cited_text`) so [cite-wide](https://github.com/lossless-group/cite-wide)'s hex-substitution pass works on Gemini output too.
280
+
281
+
### Example usage
282
+
283
+
#### Basic research with grounding
284
+
```
285
+
Question: "Who won the 2024 Nobel Prize in Physics and what was the citation?"
286
+
Model: gemini-flash-latest
287
+
Grounding: Enabled
288
+
Resolve URLs: Enabled
289
+
```
290
+
291
+
Lands in the note with prose like:
292
+
293
+
> The 2024 Nobel Prize in Physics was jointly awarded to John J. Hopfield and Geoffrey Hinton.
294
+
>
295
+
> The Nobel Prize Committee cited them "for foundational discoveries and inventions that enable machine learning with artificial neural networks".
296
+
297
+
…followed by a `### Google Searches` section listing the queries Gemini issued, and a `### Citations` footer where each entry is `[N]: [Real Page Title](https://nobelprize.org/…)` with the verbatim segment as a blockquote.
298
+
220
299
## Using Perplexica / Vane
221
300
222
301
### Quick Start
@@ -302,6 +381,13 @@ System Prompt: "You are a technical expert who explains complex concepts clearly
|`Ask Gemini`| Query Google Gemini with Google Search grounding | Editor command with modal interface |
389
+
|`Check Gemini service status`| Report whether the service initialized and the API key is configured | Debug command |
390
+
305
391
### Perplexica / Vane Commands
306
392
307
393
| Command | Description | Usage |
@@ -343,6 +429,27 @@ A working Obsidian vault collects categories of files that share a shape — con
343
429
2.**Commands** — `Apply directory template to current file` auto-matches via the glob; `Apply directory template to folder` runs a batch with a confirmation modal; `Stop directory template batch` halts a running batch.
344
430
3.**Cleanup pipeline** — after the SSE stream completes, the runtime wraps `<think>` blocks, swaps `[IMAGE N: <description>]` markers for real embeds (with a fallback `# Images` section when the model didn't emit markers but Perplexity returned images), strips unreplaced placeholders, appends a `# Sources` footer in the format [cite-wide](https://github.com/lossless-group/cite-wide) can convert to hex citations, and stamps `cf_last_run` + `cf_last_run_model` into the target's frontmatter.
345
431
432
+
### Partials and preambles — shared guidance across templates
433
+
434
+
Two peer folders alongside `templates/` keep editorial rules vault-visible and DRY:
└── preambles/ (auto-attached to every request as system / user messages)
442
+
├── inline-citation.md
443
+
├── image-placement.md
444
+
└── research-framing.md
445
+
```
446
+
447
+
-**`{{include: name}}`** in a template body splices in `partials/name.md` recursively (depth-limited, cycle-detected). Missing files show as inline `[[include: name — file not found]]` markers so typos stay visible.
448
+
-**Preambles auto-attach** to every Perplexity request with bundled defaults as fallback. Settings tab exposes Partials root, Preambles root, System preambles (default: `inline-citation`), User preambles (default: `image-placement` when return-images is on).
449
+
-**Per-template overrides** in the `cft` fence: `preambles: { system: [...], skip-user: [...], skip-all: true }`.
450
+
451
+
Fix the mermaid quoting rule once in `partials/mermaid-discipline.md` and every future template generation picks it up — no template editing required.
452
+
346
453
### Shipped templates
347
454
348
455
Four templates ship inlined into the plugin and seed into your vault on first plugin load:
0 commit comments