Documentation
¶
Overview ¶
Package retrieval implements RAG search logic for Creel.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContextFetcher ¶ added in v0.1.4
type ContextFetcher struct {
// contains filtered or unexported fields
}
ContextFetcher retrieves chunks from a single document in sequence order, with ACL enforcement.
func NewContextFetcher ¶ added in v0.1.4
func NewContextFetcher(chunkStore *store.ChunkStore, authorizer auth.Authorizer) *ContextFetcher
NewContextFetcher creates a new ContextFetcher.
func (*ContextFetcher) GetContext ¶ added in v0.1.4
func (f *ContextFetcher) GetContext(ctx context.Context, principal *auth.Principal, documentID string, lastN int, since time.Time) ([]*store.Chunk, error)
GetContext returns active chunks for a document in sequence order. It validates that the principal has read access to the document's topic.
type Searcher ¶
type Searcher struct {
// contains filtered or unexported fields
}
Searcher performs ACL-filtered vector similarity search.
func NewSearcher ¶
func NewSearcher(chunkStore *store.ChunkStore, authorizer auth.Authorizer, backend vector.Backend) *Searcher
NewSearcher creates a new Searcher.
func (*Searcher) Search ¶
func (s *Searcher) Search(ctx context.Context, principal *auth.Principal, topicIDs []string, queryEmbedding []float64, topK int, metadataFilter map[string]any, excludeDocIDs []string) ([]Result, error)
Search performs an ACL-filtered similarity search. If topicIDs is empty, it searches all topics accessible to the principal.
Click to show internal directories.
Click to hide internal directories.