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 chat.Client) *CitationGenerator
func (*CitationGenerator) GenerateWithCitations ¶
func (g *CitationGenerator) GenerateWithCitations(ctx context.Context, query string, chunks []*core.Chunk) (string, error)
GenerateWithCitations formats the retrieved chunks with markers [doc_1], [doc_2] and instructs the LLM to strictly cite its claims.
Click to show internal directories.
Click to hide internal directories.