Documentation
¶
Index ¶
Constants ¶
View Source
const ( StopEnoughEvidence = "enough_evidence" StopNoEvidence = "no_evidence" StopWeakEvidenceBudgetExhausted = "weak_evidence_budget_exhausted" StopPlannerFailedDeterministicUsed = "planner_failed_deterministic_used" StopMaxStepsReached = "max_steps_reached" StopTimeoutExceeded = "timeout_exceeded" StopSynthesisFailed = "synthesis_failed" StopVerificationFailed = "verification_failed" StopTraceFailed = "trace_failed" )
View Source
const ( JudgeEnoughEvidence JudgeVerdict = "enough_evidence" JudgeNoEvidence JudgeVerdict = "no_evidence" JudgeWeakEvidence JudgeVerdict = "weak_evidence" RetryNone RetryAction = "none" RetryFocusedVariant RetryAction = "focused_retry" RetryRelatedExpansion RetryAction = "related_expansion" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnswerReviewResult ¶
type AnswerReviewResult struct {
Enabled bool `json:"enabled"`
Verdict AnswerReviewVerdict `json:"verdict,omitempty"`
Model string `json:"model,omitempty"`
Warnings []string `json:"warnings,omitempty"`
Errors []string `json:"errors,omitempty"`
Raw string `json:"raw,omitempty"`
}
func RunAnswerReview ¶
func RunAnswerReview(ctx context.Context, cfg config.Config, prepared brainresearch.PreparedSynthesis, synthesis brainresearch.SynthesisResult, opts Options) AnswerReviewResult
type AnswerReviewVerdict ¶
type AnswerReviewVerdict string
const ( AnswerReviewPass AnswerReviewVerdict = "pass" AnswerReviewWarn AnswerReviewVerdict = "warn" AnswerReviewFail AnswerReviewVerdict = "fail" AnswerReviewError AnswerReviewVerdict = "error" )
type JudgeOptions ¶
type JudgeResult ¶
type JudgeResult struct {
Verdict JudgeVerdict `json:"verdict"`
Reason string `json:"reason,omitempty"`
MissingConcepts []string `json:"missing_concepts,omitempty"`
WeakRows []WeakEvidenceRow `json:"weak_rows,omitempty"`
RetryAction RetryAction `json:"retry_action"`
RetryVariant string `json:"retry_variant,omitempty"`
ExpansionLookup string `json:"expansion_lookup,omitempty"`
}
func Judge ¶
func Judge(pack brainresearch.Pack, opts JudgeOptions) JudgeResult
type JudgeVerdict ¶
type JudgeVerdict string
type Options ¶
type Options struct {
Question string
SynthesisQuestion string
Topic string
Limit int
SourceTypes []string
RelatedLimit int
SeedLimit int
IncludeTopic *bool
MaxCharsPerDoc int
PlannerModel string
PlannerTimeout time.Duration
PlannerBinary string
UseModelPlanner bool
DisablePlanner bool
UseSemantic bool
DisableSemantic bool
Model string
CLI string
Binary string
MaxEvidenceChars int
SynthesisTimeout time.Duration
EnableAnswerReview bool
AnswerReviewModel string
AnswerReviewBinary string
AnswerReviewTimeout time.Duration
RunnerTimeout time.Duration
StageTimeout time.Duration
MaxSteps int
MinEvidenceForEnough int
TraceEnabled *bool
Surface string
ChatContinuity *researchtrace.ChatContinuity
KeepAllTraces bool
Progress func(ProgressEvent)
}
type ProgressEvent ¶
type Result ¶
type Result struct {
Pack brainresearch.Pack `json:"research_pack"`
PreparedSynthesis *brainresearch.PreparedSynthesis `json:"prepared_synthesis,omitempty"`
Synthesis *brainresearch.SynthesisResult `json:"synthesis,omitempty"`
Judge JudgeResult `json:"judge"`
Verification VerificationResult `json:"verification"`
AnswerReview AnswerReviewResult `json:"answer_review,omitempty"`
TracePath string `json:"trace_path,omitempty"`
StopReason string `json:"stop_reason"`
Warnings []string `json:"warnings,omitempty"`
}
type RetryAction ¶
type RetryAction string
type VerificationResult ¶
type VerificationResult struct {
Passed bool `json:"passed"`
Errors []string `json:"errors,omitempty"`
Warnings []string `json:"warnings,omitempty"`
}
func VerifyCitations ¶
func VerifyCitations(pack brainresearch.Pack, result brainresearch.SynthesisResult) VerificationResult
Click to show internal directories.
Click to hide internal directories.