Help us shape the future of Go! Take the 2026 Go Developer Survey

semanticquest

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package semanticquest exercises six shadow scenarios through the real broker. Generation is always a deterministic fixture, never a provider performance test.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Request

func Request(c Case) delegation.Request

Request creates a synthetic, explicitly bounded checked task for examples and repeatable validation. Its embedding threshold is a fixture setting, not a calibrated recommendation for other workloads.

Types

type Case

type Case struct {
	ID         string `json:"id"`
	First      string `json:"first"`
	Paraphrase string `json:"paraphrase"`
	Answer     string `json:"answer"`
}

func Cases

func Cases() []Case

type Report

type Report struct {
	Mode                        string `json:"mode"`
	Generation                  string `json:"generation"`
	PhysicalHosts               int    `json:"physical_hosts"`
	IsolatedClients             int    `json:"isolated_clients"`
	Passed                      int    `json:"passed"`
	Total                       int    `json:"total"`
	FixtureGenerationCalls      int64  `json:"fixture_generation_calls"`
	EmbeddingCalls              int64  `json:"embedding_calls"`
	GenerationAvoidedBySemantic int    `json:"generation_avoided_by_semantic"`
	ProviderAPISpendUSD         int    `json:"provider_api_spend_usd"`
	Cases                       []Row  `json:"cases"`
}

func Run

func Run(ctx context.Context, embedder semantic.Embedder) (Report, error)

Run uses a fresh local database. A supplied embedder enables real local embedding validation while generation remains explicitly simulated.

type Row

type Row struct {
	ID                    string                `json:"id"`
	Passed                bool                  `json:"passed"`
	ExactSkippedEmbedding bool                  `json:"exact_skipped_embedding"`
	CandidateObserved     bool                  `json:"candidate_observed"`
	GuardRejected         bool                  `json:"guard_rejected"`
	BrokerRestarted       bool                  `json:"broker_restarted"`
	First                 *semantic.Observation `json:"first_shadow"`
	Paraphrase            *semantic.Observation `json:"paraphrase_shadow"`
	Negative              *semantic.Observation `json:"negative_shadow"`
}

Jump to

Keyboard shortcuts

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