Docs/Local RAG

Local RAG

Import your datasheets and documentation. Magic Input uses this knowledge for hardware-specific commands.

What is RAG?

RAG (Retrieval-Augmented Generation) enhances AI responses with your own documents. When you ask a question, NeuroTerm searches your imported docs and includes relevant context in the AI prompt.

@"what's the GPIO pin for the status LED?"
Answer:
GPIO5_IO19 (pin 147) is STATUS_LED
Source: imx8mp-pinmux.md

Importing Documents

1

Open Settings

Click the gear icon or press Ctrl+,

2

Go to RAG section

Find "Knowledge Base" in settings

3

Add documents

Click "Import" and select your files

Supported Formats

.txt.md.markdown

PDF support coming soon. For now, extract text from PDFs before importing.

How It Works

1. Chunking

Documents are split into smaller chunks for efficient searching.

2. Embedding

Each chunk is converted to a vector using Ollama's embedding model. Stored locally in SQLite-vec.

3. Retrieval

When you ask a question, similar chunks are found via vector search.

4. Generation

Retrieved context is included in the prompt. AI generates answers using your docs.

Best Practices

Use focused documents

Import specific datasheets, not entire manuals. Pinmux tables, register maps, and command references work best.

Include context in filenames

Name files descriptively: imx8mp-gpio-pinmux.md instead of notes.txt

Keep documents current

Re-import updated docs to refresh the knowledge base. Old versions can be removed.

100% Local

All documents stay on your machine. Embeddings are generated locally via Ollama. Nothing is uploaded to any server.