rag

package
v0.0.4-alpha.9 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: EUPL-1.2 Imports: 8 Imported by: 0

Documentation

Overview

Package rag provides RAG (Retrieval Augmented Generation) commands.

Commands:

  • core ai rag ingest: Ingest markdown files into Qdrant
  • core ai rag query: Query the vector database
  • core ai rag collections: List and manage collections

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRAGSubcommands

func AddRAGSubcommands(parent *cobra.Command)

AddRAGSubcommands registers the 'rag' command as a subcommand of parent. Called from the ai command package to mount under "core ai rag".

func IngestDirectory

func IngestDirectory(ctx context.Context, directory, collectionName string, recreateCollection bool) error

IngestDirectory is exported for use by other packages (e.g., MCP).

func IngestFile

func IngestFile(ctx context.Context, filePath, collectionName string) (int, error)

IngestFile is exported for use by other packages (e.g., MCP).

func QueryDocs

func QueryDocs(ctx context.Context, question, collectionName string, topK int) ([]rag.QueryResult, error)

QueryDocs is exported for use by other packages (e.g., MCP).

func QueryDocsContext

func QueryDocsContext(ctx context.Context, question, collectionName string, topK int) (string, error)

QueryDocsContext is exported and returns context-formatted results.

Types

This section is empty.

Jump to

Keyboard shortcuts

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