Skip to main content
Enhanced Actions leverage Retrieval-Augmented Generation (RAG) to provide AI with rich context from your vault’s linked notes and PDF files. This makes responses more accurate and contextually aware. Enhanced Actions

What is RAG?

RAG (Retrieval-Augmented Generation) enhances AI responses by:
  1. Analyzing your selected text and linked documents
  2. Retrieving relevant content from connected notes and PDFs
  3. Augmenting the AI prompt with this contextual information
  4. Generating more informed and accurate responses
RAG automatically processes links ([[like this]]), backlinks, and even PDF file references in your notes.

How It Works

Automatic Context Detection

When you run an action, Local GPT automatically:
1

Scans for Links

Detects wiki-style links [[note]] and markdown links [text](note.md) in your selected text
2

Follows Backlinks

Finds notes that link back to the current document
3

Processes PDFs

Extracts text from linked PDF files
4

Retrieves Relevant Chunks

Uses embedding models to find the most relevant content
5

Enhances Prompt

Includes this context in the AI request

Setup

1. Install an Embedding Model

You need an embedding model to enable RAG. For Ollama users:
Fastest option, optimized for English text.

2. Configure Embedding Provider

  1. Open Local GPT settings
  2. Find Embedding Provider
  3. Select your embedding model provider
  4. Choose a model with a large context window for best results
Settings
Use the largest model with the largest context window your system can handle for better results.

Supported File Types

Markdown Files

.md files are processed for text content and links

PDF Files

.pdf files are processed to extract text content

Context Limits

You can configure how much context to include based on your model’s capabilities:
Context Limit
select
default:"local"
Local GPT will retrieve content from both “Another Note” and “Research Paper”.

PDF References

Local GPT also processes backlinks — notes that reference the current document:

Performance

Local GPT includes several optimizations:
PDF content is cached to avoid re-processing. The cache is invalidated when the PDF file is modified.
Link traversal is limited to a maximum depth of 10 levels to prevent infinite loops and excessive processing.
A status bar shows processing progress when RAG is active, so you know the system is working.

Status Bar Indicator

When RAG is processing context, you’ll see a status bar indicator:
This shows the progress of embedding generation and document retrieval.
Press Escape to cancel RAG processing at any time.

Example

Given this note:
When you select this text and run an action like “Summarize”, Local GPT will:
  1. Read the content of “Project Goals”
  2. Extract text from “research.pdf”
  3. Find relevant sections using embeddings
  4. Include this context when generating the summary
The result is a summary that’s informed by all linked documents, not just the selected text.

Next Steps

Vision Support

Learn how to analyze images with vision models

Community Actions

Explore and install community-contributed actions