Documentation
¶
Index ¶
- Constants
- func SaveQuestionBank(path string, bank *QuestionBank) error
- type Analysis
- type Option
- func WithCacheDir(dir string) Option
- func WithChapterTarget(n int) Option
- func WithChunkOverlap(n int) Option
- func WithChunkSize(n int) Option
- func WithEmbedder(e embedding.Embedder) Option
- func WithForceDownload(force bool) Option
- func WithLogger(l *slog.Logger) Option
- func WithMaxFetchBytes(n int64) Option
- func WithTopK(k int) Option
- type Options
- type Question
- type QuestionBank
- type QuestionnaireConfig
- type RunConfig
- type RunMode
- type RunResult
- type Suite
- func (s *Suite) AddAgent(ctx context.Context, name, systemPrompt string, sources []string, ...) (*adk.ChatModelAgent, error)
- func (s *Suite) AddSource(name, pathOrURL string) error
- func (s *Suite) Agents() []adk.Agent
- func (s *Suite) Analyze(res *RunResult) *Analysis
- func (s *Suite) GenerateQuestionnaire(ctx context.Context, qaModel model.BaseModel[*schema.Message], ...) (*QuestionBank, error)
- func (s *Suite) RegisterParser(ext string, p corpus.Parser)
- func (s *Suite) Run(ctx context.Context, bank *QuestionBank, cfg RunConfig) (*RunResult, error)
- func (s *Suite) Sources() []*corpus.Source
Constants ¶
const ( ModeAnswerOnly = eval.ModeAnswerOnly ModeDebate = eval.ModeDebate ModeBoth = eval.ModeBoth )
Variables ¶
This section is empty.
Functions ¶
func SaveQuestionBank ¶
func SaveQuestionBank(path string, bank *QuestionBank) error
SaveQuestionBank persists the question bank.
Types ¶
type Analysis ¶
Question = qa.Question QuestionBank = qa.QuestionBank RunConfig = eval.RunConfig RunResult = eval.RunResult Analysis = eval.Analysis
type Option ¶
type Option func(*Options)
Option configures Suite behavior.
func WithCacheDir ¶
func WithChapterTarget ¶
func WithChunkOverlap ¶
func WithChunkSize ¶
func WithEmbedder ¶
func WithForceDownload ¶
func WithLogger ¶
func WithMaxFetchBytes ¶
type Question ¶
Question = qa.Question QuestionBank = qa.QuestionBank RunConfig = eval.RunConfig RunResult = eval.RunResult Analysis = eval.Analysis
type QuestionBank ¶
type QuestionBank = qa.QuestionBank
Question = qa.Question QuestionBank = qa.QuestionBank RunConfig = eval.RunConfig RunResult = eval.RunResult Analysis = eval.Analysis
func LoadQuestionBank ¶
func LoadQuestionBank(path string) (*QuestionBank, error)
LoadQuestionBank loads a question bank.
type QuestionnaireConfig ¶
type QuestionnaireConfig struct {
Sources []string
PerChapter int
Total int
MaxChapters int
Options int
Difficulty string
Style string
IncludeExplanation bool
MaxChapterChars int
Language string
}
QuestionnaireConfig is the configuration for generating a questionnaire.
type RunConfig ¶
Question = qa.Question QuestionBank = qa.QuestionBank RunConfig = eval.RunConfig RunResult = eval.RunResult Analysis = eval.Analysis
type RunMode ¶
Question = qa.Question QuestionBank = qa.QuestionBank RunConfig = eval.RunConfig RunResult = eval.RunResult Analysis = eval.Analysis
type RunResult ¶
Question = qa.Question QuestionBank = qa.QuestionBank RunConfig = eval.RunConfig RunResult = eval.RunResult Analysis = eval.Analysis
type Suite ¶
type Suite struct {
// contains filtered or unexported fields
}
Suite ties corpus parsing, chunking, RAG indexing, agent creation, QA generation, evaluation, and reporting.
func (*Suite) AddAgent ¶
func (s *Suite) AddAgent(ctx context.Context, name, systemPrompt string, sources []string, model model.BaseModel[*schema.Message], agentOpts ...adk.AgentOption) (*adk.ChatModelAgent, error)
AddAgent creates an adk.ChatModelAgent with a retrieval tool scoped to sources.
func (*Suite) AddSource ¶
AddSource ingests a source from a local file path or an http(s) URL. The source is parsed, chapter-segmented, chunked, and added to the in-memory corpus; the index is marked dirty for lazy rebuild.
func (*Suite) GenerateQuestionnaire ¶
func (s *Suite) GenerateQuestionnaire(ctx context.Context, qaModel model.BaseModel[*schema.Message], cfg *QuestionnaireConfig) (*QuestionBank, error)
GenerateQuestionnaire generates a question bank using the provided QA model.
func (*Suite) RegisterParser ¶
RegisterParser registers a custom corpus parser for an extension.