Rerank
Reorder candidates by how well each one answers the query, and keep the best. Picks a rerank model, served over HTTP at the address in its endpoint setting. When no rerank service answers, the node fails with an error instead of passing the candidates on unranked.
Fired. It runs when an event or a value lands on trigger, and pulls its other inputs at that moment.
Inputs
Section titled “Inputs”| Port | Type | Notes |
|---|---|---|
trigger |
event | Fires the node |
query |
text | |
candidates |
memory-set |
Outputs
Section titled “Outputs”| Port | Type | Notes |
|---|---|---|
results |
memory-set | |
trigger |
event |
| Knob | Kind | Default | Notes |
|---|---|---|---|
model |
model | none | stays a knob (cannot become an input) |
Models that ship with Boltjar
Section titled “Models that ship with Boltjar”Boltjar ships a manifest for each of these models, and the picker lists them. Picking a model adds its own settings to the node as knobs, and each of those can become an input. Models explains manifests and how to add one.
| Model | Id | Needs | Can |
|---|---|---|---|
| bge-reranker v2 m3 (HTTP) | rerank/bge-v2-m3 |
a rerank service |
Example
Section titled “Example”A second pass after a vector search: it sends the query and the hits in candidates to a rerank service over HTTP and keeps the best ones in results. Boltjar does not run the reranker itself. Set the endpoint setting under the model picker to a service that answers POST {"query", "documents"} with a scores list or a results list of {index, score}; keep says how many results to keep. When no service answers, the node turns red and names the address.