ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/missionmatch / internal/modules/matching/rerank.go

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/missionmatch / internal/modules/matching/rerank.go
DateNot specified in source
RepositoryJanady13/missionmatch
Revision720d47fae476b0d38477ae4401697d372b1ea2bc
Branchfeature/opportunity-to-outcome
Path or archive memberinternal/modules/matching/rerank.go
Original SHA-2561555667f551040576f747360c341c5f29d107c8890f7bd953c4dc9a4af720588
Git blob SHAc36174e67e80a998ae84870cd5ad41da4ddd060a
Reading-copy SHA-2561555667f551040576f747360c341c5f29d107c8890f7bd953c4dc9a4af720588

Original source ↗

Every recorded occurrence

These 10 records contain identical original source bytes. Their paths and revisions remain part of the archive.

Original recordBranch or archiveRevision / identifierOriginal location
Janady13/missionmatch / internal/modules/matching/rerank.gofeature/opportunity-to-outcome720d47fae476b0d38477ae4401697d372b1ea2bcOpen original
Janady13/missionmatch / internal/modules/matching/rerank.gocollision-deconfliction4ee5a09972608ed89f8377c6665542d5f450f0a6Open original
Janady13/missionmatch / internal/modules/matching/rerank.gomaster1e9249840a4302ec82e123b9c9cb6f75badea3e4Open original
Janady13/missionmatch / internal/modules/matching/rerank.gomag-substrateb82c7100a492dec67dfd1eda6b3f53def859be35Open original
Janady13/missionmatch / internal/modules/matching/rerank.gotime-to-fill-survivalb66e1e505863d4f17741a4b9ede73509e45bd6c6Open original
Janady13/missionmatch / internal/modules/matching/rerank.gopresentation-readinesseb574acaa29d71ce4d0f852572e87c275c79fdb7Open original
Janady13/missionmatch / internal/modules/matching/rerank.govendor-intelligencefe9796a19c261951d3f2565206c0c1b5ac294465Open original
Janady13/missionmatch / internal/modules/matching/rerank.gophase2-connectorse038d4c687aec16f8bd9bc4d907eea14d91f8704Open original
Janady13/missionmatch / internal/modules/matching/rerank.gofeature/aioe-upgrade2178e7298d0e5d9af83afa12402fd587f0ba6ed8Open original
Janady13/missionmatch / internal/modules/matching/rerank.gocapture-readinessbae6af7cb2997e819174a9e9cfff5e16067a1975Open original

Recovered source transcript

package matching import ( "context" "github.com/jackc/pgx/v5" "github.com/shopspring/decimal" "github.com/missionworkforce/missionmatch/internal/modules/matching/engine" ) // rerankModelKey is the champion display order re ranker read at slate generation to order the members. It is // the same model_key the MAG trainer (cmd/train-model -kind reranker) fits and the evaluator promotes. const rerankModelKey = "slate_display_order" // championRerankWeights reads the champion display order re ranker's utility weights keyed by feature name plus // its version, from the global MAG coefficient store on the caller's tx. It is BEST EFFORT: on any absence or // error it returns nil weights and version 0, and the caller keeps the frozen engine order (the re ranker only // ever permutes an already scored slate, never blocks generating it). The prior only champion (version 1) holds // the engine component weights, so the order is unchanged until a LEARNED challenger is promoted; generateSlate // therefore applies the reorder only for a learned champion (version above 1), keeping the prior only order byte // identical to the engine order. func championRerankWeights(ctx context.Context, tx pgx.Tx) (map[string]float64, int) { rows, err := tx.Query(ctx, ` SELECT c.feature_name, c.coefficient::float8, m.version FROM aedt_learned_models m JOIN aedt_model_coefficients c ON c.model_key = m.model_key AND c.version = m.version WHERE m.model_key = $1 AND m.champion = true AND m.output_kind = 'display_order'`, rerankModelKey) if err != nil { return nil, 0 } defer rows.Close() weights := map[string]float64{} version := 0 for rows.Next() { var name string var coef float64 var v int if err := rows.Scan(&name, &coef, &v); err != nil { return nil, 0 } weights[name] = coef version = v } if rows.Err() != nil || len(weights) == 0 { return nil, 0 } return weights, version } // rerankUtility is a candidate's display utility under the re ranker weights: the learned weight on each frozen // engine sub score. The display order is this utility descending. It is NEVER a candidate score; it only orders // an already scored slate, and the frozen engine Total remains the score shown. The feature names match the // trainer's RerankFeatureOrder and map one to one onto the engine MatchResult sub scores. func rerankUtility(weights map[string]float64, res engine.MatchResult) float64 { term := func(name string, d decimal.Decimal) float64 { v, _ := d.Float64() return weights[name] * v } return term("clearance_score", res.Clearance) + term("skills_score", res.Skills) + term("certs_score", res.Certifications) + term("customer_score", res.CustomerExperience) + term("experience_score", res.Experience) + term("location_score", res.Location) }

Search equations, builds, manuscript text, and recovered sources.