11-rag

command
v1.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Recipe 11: Retrieval-Augmented Generation (RAG)

Combine embedding-based retrieval with text generation. The pipeline:

  1. Embed a corpus of documents
  2. Embed the user's query
  3. Find the most relevant documents by cosine similarity
  4. Pass them as context to the model for grounded generation

This is the standard RAG pattern used in knowledge-base chatbots, documentation assistants, and question-answering systems.

Usage:

go run ./docs/cookbook/11-rag/ --model path/to/model.gguf
go run ./docs/cookbook/11-rag/ --model path/to/model.gguf --query "How do I use channels?"

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL