Documentation
¶
Overview ¶
Package config handles loading and parsing of simulation configurations and query files. It supports both YAML and JSON formats for flexibility.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigFile ¶
type ConfigFile struct {
Configs []SimConfig `json:"configs" yaml:"configs"`
}
ConfigFile represents the configs file structure.
type Needle ¶ added in v0.4.0
type Needle struct {
Text string `json:"text"`
Source string `json:"source,omitempty"`
Difficulty string `json:"difficulty,omitempty"`
}
Needle represents a specific text span required to answer a query.
type QueriesFile ¶
type QueriesFile struct {
Queries []Query `json:"queries" yaml:"queries"`
}
QueriesFile represents the queries file structure.
type Query ¶
type Query struct {
ID string `json:"id" yaml:"id"`
Text string `json:"text" yaml:"text"`
RelevantDocs []string `json:"relevant_docs" yaml:"relevant_docs"`
Notes string `json:"notes,omitempty" yaml:"notes,omitempty"`
Needles []Needle `json:"needles,omitempty" yaml:"needles,omitempty"`
}
Query represents a query with ground truth.
func LoadQueries ¶
LoadQueries loads queries from a JSON file.
type SimConfig ¶
type SimConfig struct {
Name string `json:"name" yaml:"name"`
TopK int `json:"top_k" yaml:"top_k"`
ChunkSize int `json:"chunk_size,omitempty" yaml:"chunk_size,omitempty"`
Overlap int `json:"overlap,omitempty" yaml:"overlap,omitempty"`
}
SimConfig represents a simulation configuration variant.
func LoadConfigs ¶
LoadConfigs loads simulation configs from a YAML or JSON file.
Click to show internal directories.
Click to hide internal directories.