• LOCAL
  • SECURE
  • READY
  • HUMAN

How to build local RAG pipelines with your AI

Connect Ollama to your agent to process data locally. Once connected, your AI can turn text into searchable vectors without hitting a cloud API.

Ask AI about this page

Short answer

How can I build a local RAG pipeline with my AI?

You use your agent to convert local text into vector embeddings using Ollama. This keeps the heavy lifting on your hardware and ensures your sensitive documents never leave your local environment. You'll see how the embedding process works below.

The outcomes.

Where your data lands.

The results of running this task.

LOCAL

Private vector storage

Your agent creates mathematical representations of your files. These stay on your machine for private semantic search.

SECURE

Zero cloud exposure

The embedding process happens entirely through your local hardware. No data is sent to external providers for processing.

READY

Searchable knowledge

Your agent turns raw text into a structured format. This allows for instant retrieval of relevant context during chats.

HUMAN

Manual review needed

You decide which documents are worth indexing. The AI won't decide what is important without your direction.

The workflow

What your AI does when the data arrives.

The agent handles the mathematical conversion of your text.

  1. Read local files

    Your agent accesses the text files or documents you point it toward.

    generate_embeddings
  2. Generate vectors

    The agent converts text chunks into numerical vectors using your local engine.

    generate_embeddings
  3. Alternative embedding

    If you prefer a cloud-based approach for specific tasks, the agent can use an external provider.

    openai_embeddings
  4. Index for search

    The agent prepares the vectors so they can be used for semantic retrieval in future prompts.

    generate_embeddings

Try it

Copy these to start.

Use these prompts to kick off the embedding process.

Starting points

These are starting lines. Replace the bracketed text with your specific file paths or folder names.

Ollama Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_hYpu67YLXAzJ2w17TRhdjXKZcyynLB0AY9L4fYBJ/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Ollama capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "ollama-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_hYpu67YLXAzJ2w17TRhdjXKZcyynLB0AY9L4fYBJ/mcp"
    }
  }
}
Copy into chat04
  • Generate embeddings for the text in ./docs/project_notes.txt

  • Create vector embeddings for all the files in my /legal/contracts folder

  • Use local embeddings to index the contents of my README.md file

  • Convert the text in this specific PDF to embeddings so I can ask questions about it

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Ollama once, then ask.

Just link the MCP to your client. Your credentials stay encrypted, and you can start embedding files immediately.

Connect Ollama to your AI

FAQ

How this task behaves.

  • 01

    Does my data go to the cloud when I use local embeddings?

    No. When using the local embedding tool, all processing happens on your own hardware.

  • 02

    Can the AI delete my original files?

    No. The agent only reads the files to create embeddings; it has no capability to delete or modify your source documents.

  • 03

    Can I use OpenAI embeddings instead of local ones?

    Yes. You can choose between local generation or using an external provider if you prefer.

  • 04

    Will this automatically index my entire hard drive?

    No. The AI only processes the specific files or folders you explicitly tell it to embed.

  • 05

    Do I need to manage the vector database myself?

    The agent handles the generation of the vectors, but you manage the files being processed.

  • More questions about Ollama? See everything the Ollama Connector can do

Connect Ollama to Claude, Cursor, ChatGPT & more