Documentation
¶
Overview ¶
Package gaslit stress-tests AI agents by staging a supervised courtroom debate. The public API of this package is a thin facade over the implementation packages under internal/: every type here is an alias and every function/variable is a re-export, so the API surface is identical to a single flat package while the code stays organized by feature.
Index ¶
- Constants
- Variables
- type AgentConfig
- type AggregationFn
- type Answer
- type AnswerSchema
- type AttributionFn
- type BudgetError
- type CallOption
- type CallOptions
- type Classifier
- type Config
- type ConsistencyScorer
- type CostBudget
- type DiagnosticResult
- type DriftMetric
- type DriftVerdict
- type Event
- type EventType
- type FullDebateSummary
- type Gaslit
- type GrillStrategy
- type Hooks
- type InstrumentationStats
- type JSONLRecorder
- type LLMScorer
- type LexicalScorer
- type MCQSchema
- type OpenEndedSchema
- type Option
- type Phase
- type PromptResult
- type PromptTemplates
- type Protocol
- type QuadrantState
- type Recorder
- type StreamEvent
- type Thresholds
Constants ¶
View Source
const ( PhaseBaseline = core.PhaseBaseline PhaseCrossExamination = core.PhaseCrossExamination PhaseEvaluation = core.PhaseEvaluation PhaseDriftAnalysis = core.PhaseDriftAnalysis PhaseGrilling = core.PhaseGrilling )
Phases.
View Source
const ( ProtocolSupervised = core.ProtocolSupervised ProtocolAdversarialPairs = core.ProtocolAdversarialPairs ProtocolRoundRobin = core.ProtocolRoundRobin ProtocolDevilsAdvocate = core.ProtocolDevilsAdvocate )
Protocols.
View Source
const ( GrillNone = core.GrillNone GrillSingleSuspect = core.GrillSingleSuspect GrillInfluencer = core.GrillInfluencer GrillAllDrifted = core.GrillAllDrifted GrillTopN = core.GrillTopN )
Grill strategies.
View Source
const ( QuadrantPeak = core.QuadrantPeak QuadrantHallucinating = core.QuadrantHallucinating QuadrantKBDeficit = core.QuadrantKBDeficit QuadrantWrong = core.QuadrantWrong )
Quadrants.
View Source
const ( EventPhaseStart = core.EventPhaseStart EventPhaseEnd = core.EventPhaseEnd EventBaseline = core.EventBaseline EventCrossExam = core.EventCrossExam EventEval = core.EventEval EventDrift = core.EventDrift EventDiagnostic = core.EventDiagnostic EventSummary = core.EventSummary EventDone = core.EventDone EventError = core.EventError )
Event types.
View Source
const ( DefaultJSONInstruction = core.DefaultJSONInstruction OpenEndedInstruction = core.OpenEndedInstruction )
Schema contract text.
Variables ¶
View Source
var ( PresetDefault = core.PresetDefault PresetStrict = core.PresetStrict PresetLenient = core.PresetLenient )
Presets.
View Source
var ( WithLogger = core.WithLogger WithPacingDelay = core.WithPacingDelay WithRequestTimeout = core.WithRequestTimeout WithMaxRetries = core.WithMaxRetries WithConcurrency = core.WithConcurrency WithMaxRounds = core.WithMaxRounds WithThresholds = core.WithThresholds WithOptionLabels = core.WithOptionLabels WithAnswerSchema = core.WithAnswerSchema WithProtocol = core.WithProtocol WithGrillStrategy = core.WithGrillStrategy WithGrillCount = core.WithGrillCount WithAggregation = core.WithAggregation WithDriftMetric = core.WithDriftMetric WithAttribution = core.WithAttribution WithClassifier = core.WithClassifier WithConsistencyScorer = core.WithConsistencyScorer WithConsistencyModel = core.WithConsistencyModel WithLexicalScorer = engine.WithLexicalScorer WithLLMScorer = engine.WithLLMScorer WithPromptTemplates = core.WithPromptTemplates WithAgentConfig = core.WithAgentConfig WithExtraTools = core.WithExtraTools WithHooks = core.WithHooks WithRecorder = core.WithRecorder WithRedact = core.WithRedact WithBudget = core.WithBudget WithVerbose = core.WithVerbose )
Construction-time options.
View Source
var ( WithVerboseCall = core.WithVerboseCall WithMaxRoundsCall = core.WithMaxRoundsCall WithOptionLabelsCall = core.WithOptionLabelsCall WithThresholdsCall = core.WithThresholdsCall WithGrillStrategyCall = core.WithGrillStrategyCall WithGrillCountCall = core.WithGrillCountCall WithProtocolCall = core.WithProtocolCall WithMetadataCall = core.WithMetadataCall WithConfidenceCall = core.WithConfidenceCall WithClaimCall = core.WithClaimCall WithHooksCall = core.WithHooksCall WithBudgetCall = core.WithBudgetCall WithConsistencyScorerCall = core.WithConsistencyScorerCall )
Per-call options.
View Source
var ( TVDRift = drift.TVDRift KLDistance = drift.KLDistance JSDistance = drift.JSDistance MaxChange = drift.MaxChange ChampionAttribution = drift.ChampionAttribution ShiftWeightedAttribution = drift.ShiftWeightedAttribution CorrelationAttribution = drift.CorrelationAttribution )
Drift metrics and attribution.
View Source
var ( MajorityVote = aggregation.MajorityVote ConfidenceWeightedVote = aggregation.ConfidenceWeightedVote WeightedVote = aggregation.WeightedVote ConfidenceWeightedWeightedVote = aggregation.ConfidenceWeightedWeightedVote )
Aggregation strategies.
View Source
var ( NewJSONLRecorder = persist.NewJSONLRecorder SaveSummary = persist.SaveSummary LoadSummary = persist.LoadSummary SaveSummaryFile = persist.SaveSummaryFile LoadSummaryFile = persist.LoadSummaryFile )
Persistence.
View Source
var (
ReclassifySummary = core.ReclassifySummary
)
Re-scoring a saved summary (pure, zero model calls).
View Source
var (
ThresholdClassifier = core.ThresholdClassifier
)
Classification.
Functions ¶
This section is empty.
Types ¶
type Gaslit ¶
Types.
type InstrumentationStats ¶ added in v0.3.0
type InstrumentationStats = core.InstrumentationStats
Types.
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
basic
command
|
|
|
internal
|
|
|
aggregation
Package aggregation implements the pluggable winning-option strategies used to combine the panel's final positions.
|
Package aggregation implements the pluggable winning-option strategies used to combine the panel's final positions. |
|
core
Package core holds the shared data types of the gaslit engine.
|
Package core holds the shared data types of the gaslit engine. |
|
drift
Package drift implements the pluggable drift metrics, influence attribution strategies, and the pure drift analysis used by the gaslit engine.
|
Package drift implements the pluggable drift metrics, influence attribution strategies, and the pure drift analysis used by the gaslit engine. |
|
engine
Package engine implements the Gaslit orchestration: the panel state, the debate pipeline, budget accounting, and instrumentation.
|
Package engine implements the Gaslit orchestration: the panel state, the debate pipeline, budget accounting, and instrumentation. |
|
persist
Package persist handles event recording and the save/load round-trip for debate summaries.
|
Package persist handles event recording and the save/load round-trip for debate summaries. |
|
scoring
Package scoring implements the consistency scorers used to detect whether an agent's arguments contradict each other under cross-examination.
|
Package scoring implements the consistency scorers used to detect whether an agent's arguments contradict each other under cross-examination. |
Click to show internal directories.
Click to hide internal directories.