Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CosineSimilarity ¶
CosineSimilarity calculates cosine similarity between two vectors
Types ¶
type Document ¶
type Document struct {
ID string `json:"id"`
SourcePath string `json:"source_path"`
ChunkIndex int `json:"chunk_index"`
Content string `json:"content"`
FileHash string `json:"file_hash"`
CreatedAt string `json:"created_at"`
}
Document represents a chunk of text - the base type returned by all RAG strategies. Strategy-specific fields (embeddings, semantic summaries) are handled internally by each strategy and don't need to be exposed here.
type FileMetadata ¶
FileMetadata represents metadata about an indexed file. Used for change detection and incremental indexing.
type SearchResult ¶
type SearchResult struct {
Document Document `json:"document"`
Similarity float64 `json:"similarity"`
}
SearchResult represents a document with its relevance score. This is the common return type for all Strategy.Query() implementations.
Click to show internal directories.
Click to hide internal directories.