Read the equation
This relation defines Hybrid retrieval: pgvector cosine kNN fused with full-text rank via Reciprocal Rank Fusion in the source section “func (q *Queries) ListCandidatesForIntel(ctx context.Context, limit int32) ([]Candidate, error)”. It specifies the displayed relationship between the named quantities or parameters. Its interpretation depends on the source’s stated variables and conditions; this record does not assign an unprovided physical or cognitive meaning to them.
Terms & definitions
The recovered passage does not supply a separate symbol table. Read the source context for the notation used in this version; familiar letters may carry different meanings in other builds.
How it works
Read Hybrid retrieval: pgvector cosine kNN fused with full-text rank via Reciprocal Rank Fusion as the quantity being defined or updated by this relation.
Substitute the source-defined variables or recorded values and follow the displayed arithmetic and indexing exactly.
Use this version’s variable definitions and update order. The same symbol may be assigned a different meaning in another build.
Assumptions & limits
This source expression was recovered from the pinned code revision. Its presence does not establish that the associated program was built, run, or scientifically validated.
Original context
Read the surrounding source passage
SourceFirstTouch string `json:"source_first_touch"`
SourceLastTouch string `json:"source_last_touch"`
SourceDetail string `json:"source_detail"`
RrfScore float64 `json:"rrf_score"`
Snippet string `json:"snippet"`
}
// Hybrid retrieval: pgvector cosine kNN fused with full-text rank via Reciprocal Rank Fusion (k=60).
// RLS already scopes both legs to the caller's org. $1=query embedding, $2=limit, $3=text query.
// The vector arm is MATERIALIZED so the relaxed_order HNSW output is re-sorted by TRUE cosine distance
// before it is ranked: under hnsw.iterative_scan = relaxed_order the index returns rows slightly out of
// distance order, and ranking them without the re-sort would mis-rank the nearest neighbors at scale
// (pgvector 0.8 README; AWS pgvector 0.8 Aurora guidance). Every ORDER BY carries a unique tiebreaker
// (id) so results are byte-stable for fixed inputs, the AEDT reproducibility mandate. The caller SETs
// LOCAL hnsw.ef_search and hnsw.iterative_scan first.
func (q *Queries) SearchCandidatesHybrid(ctx context.Context, arg SearchCandidatesHybridParams) ([]SearchCandidatesHybridRow, error) {
rows, err := q.db.Query(ctx, searchCandidatesHybrid, arg.Column1, arg.Limit, arg.WebsearchToTsquery)
if err != nil {Exact original notation
Hybrid retrieval: pgvector cosine kNN fused with full-text rank via Reciprocal Rank Fusion (k=60).
Related builds
Related mathematical records
func (q *Queries) ListCandidatesScoped(ctx context.Context, arg ListCandidatesScopedParams) ([]Candidate, error)
This relation defines Hybrid retrieval: pgvector cosine kNN fused with full-text rank via Reciprocal Rank Fusion in the source section “func (q *Queries) ListCandidatesScoped(ctx…
querier
This relation defines Hybrid retrieval: pgvector cosine kNN fused with full-text rank via Reciprocal Rank Fusion in the source section “querier”. It specifies the displayed…
func (q *Queries) ListCandidatesForIntel(ctx context.Context, limit int32) ([]Candidate, error)
This relation defines Hybrid retrieval: pgvector cosine kNN fused with full-text rank via Reciprocal Rank Fusion in the source section “func (q *Queries)…
querier
This relation defines Hybrid retrieval: pgvector cosine kNN fused with full-text rank via Reciprocal Rank Fusion in the source section “querier”. It specifies the displayed…
func (q *Queries) ListCandidatesForIntel(ctx context.Context, limit int32) ([]Candidate, error)
This relation defines Hybrid retrieval: pgvector cosine kNN fused with full-text rank via Reciprocal Rank Fusion in the source section “func (q *Queries)…
querier
This relation defines Hybrid retrieval: pgvector cosine kNN fused with full-text rank via Reciprocal Rank Fusion in the source section “querier”. It specifies the displayed…
func (q *Queries) ListCandidatesForIntel(ctx context.Context, limit int32) ([]Candidate, error)
This relation defines Hybrid retrieval: pgvector cosine kNN fused with full-text rank via Reciprocal Rank Fusion in the source section “func (q *Queries)…
querier
This relation defines Hybrid retrieval: pgvector cosine kNN fused with full-text rank via Reciprocal Rank Fusion in the source section “querier”. It specifies the displayed…
querier
This relation defines Hybrid retrieval: pgvector cosine kNN fused with full-text rank via Reciprocal Rank Fusion in the source section “querier”. It specifies the displayed…
func (q *Queries) ListCandidatesForIntel(ctx context.Context, limit int32) ([]Candidate, error)
This relation defines Hybrid retrieval: pgvector cosine kNN fused with full-text rank via Reciprocal Rank Fusion in the source section “func (q *Queries)…
querier
This relation defines Hybrid retrieval: pgvector cosine kNN fused with full-text rank via Reciprocal Rank Fusion in the source section “querier”. It specifies the displayed…
func (q *Queries) ListCandidatesForIntel(ctx context.Context, limit int32) ([]Candidate, error)
This relation defines Hybrid retrieval: pgvector cosine kNN fused with full-text rank via Reciprocal Rank Fusion in the source section “func (q *Queries)…