prompts

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildRerankDocumentsPrompt

func BuildRerankDocumentsPrompt(query string, documents []types.Document) string

BuildRerankDocumentsPrompt formats the user prompt with query and numbered documents. It includes metadata (source path and custom metadata) for better context.

func BuildRerankSystemPrompt

func BuildRerankSystemPrompt(
	documents []types.Document,
	criteria string,
	providerOpts map[string]any,
	jsonFormatInstruction string,
) string

BuildRerankSystemPrompt constructs the reranking system prompt. It supports full override via providerOpts["rerank_prompt"] or builds a default prompt with optional criteria and provider-specific JSON format instructions.

Types

This section is empty.

Jump to

Keyboard shortcuts

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