generation

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CitationGenerator

type CitationGenerator struct {
	// contains filtered or unexported fields
}

CitationGenerator handles the "Citation & Grounding" spec. It injects citation markers into the context and forces the LLM to use them.

func NewCitationGenerator

func NewCitationGenerator(llm core.Client) *CitationGenerator

func (*CitationGenerator) GenerateWithCitations

func (g *CitationGenerator) GenerateWithCitations(ctx context.Context, query string, chunks []*entity.Chunk) (string, error)

GenerateWithCitations formats the retrieved chunks with markers [doc_1], [doc_2] and instructs the LLM to strictly cite its claims.

Jump to

Keyboard shortcuts

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