Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EvalConfig ¶
EvalConfig captures basic evaluation knobs.
type EvalGPUResult ¶
type EvalGPUResult struct {
K, NumQueries int
P50SearchMs float64
P95SearchMs float64
P50EndToEndMs float64
P95EndToEndMs float64
QPS float64
RecallAtK float64
}
func RunEvalGPU ¶
func RunEvalGPU(model *gobed.EmbeddingModel, docs []gobed.Document, base EvalConfig, graph gobed.GPUCagraConfig) (EvalGPUResult, error)
type EvalResult ¶
type EvalResult struct {
K int
NumQueries int
P50LatencyMs float64
P95LatencyMs float64
QPS float64
RecallAtK float64
NDCGAtK float64
}
EvalResult summarizes latency and recall metrics.
func RunEval ¶
func RunEval(model *gobed.EmbeddingModel, docs []gobed.Document, cfg EvalConfig) (EvalResult, error)
RunEval builds an index with provided documents, then evaluates search latency and recall@K against a brute-force baseline on CPU. Embeddings are computed once for the baseline/queries.
type FSIndexer ¶
type FSIndexer struct {
// contains filtered or unexported fields
}
FSIndexer indexes a filesystem tree into a VectorIndex.
func NewFSIndexer ¶
func NewFSIndexer(root string, model *gobed.EmbeddingModel, cfg gobed.VectorIndexConfig) (*FSIndexer, error)
NewFSIndexer creates a filesystem indexer with a fresh VectorIndex.
func (*FSIndexer) CreatedAt ¶
CreatedAt returns now for simple logging; reserved for future persistent state.
func (*FSIndexer) Index ¶
func (f *FSIndexer) Index() *gobed.VectorIndex
Index exposes the underlying vector index (read-only usage recommended).
func (*FSIndexer) IndexAll ¶
IndexAll walks the root and indexes supported text files. It chunks files into paragraphs (blank-line separated) to improve recall.