Search methods and rerankers
Smritea has three search methods and six rerankers. Learn what each does and which limits apply.
A search method is the strategy Smritea uses to find memories. A reranker is a step that reorders the found memories. You can choose both on each search call.
Search methods
Pass method to choose one. If you leave it out, Smritea uses your app's storage engine.
| Method | What it does | Cost in search credits |
|---|---|---|
quick_search | Finds memories by vector similarity. It runs no language model. Results rank by similarity and recency. | 1 |
deep_search | Finds memories with a set of vector searches, then follows entities and relationships in your app's knowledge graph. A reranker orders the result. | 3 |
context_aware_search | Uses a language model to read the conversation context and pick starting points, then follows the knowledge graph. Results rank by similarity and recency. | 5 |
Costs come from the plan catalog. See Limits, quotas and credits. If you leave out method, Smritea charges the deep_search cost, even on a Quick Search app. Pass method to control the cost.
A Quick Search app stores text without extracting facts or entities. Deep methods suit a Deep Search app. See How Smritea stores memory.
Rerankers
Pass reranker_type to choose a reranker. It applies to deep_search only. The default is cross_encoder.
| Reranker | How it orders results |
|---|---|
cross_encoder | Scores how well each memory text answers the query. |
rrf | Combines four signals: match score, relationship count, recency and importance. |
temporal | Multiplies the score by a weight that favors recent memories. |
rrf_temporal | Applies rrf, then temporal. |
node_distance | Favors memories that sit close to the starting entities in the graph. |
mmr | Reorders for variety. It leaves the scores unchanged. |
Choose a method and a reranker
Pass method and reranker_type to search, as in this deep_search call with the rrf reranker.
These examples reuse client and a scope named alice, built as in Scope memories. The Go and Java examples take client and alice as parameters. The Go example also takes ctx.
from smritea import SmriteaError
try:
results = client.search(
"What does Alice eat?",
scope=alice,
method="deep_search",
reranker_type="rrf",
)
for r in results:
if r.memory:
print(f"{r.score:.2f} {r.memory.content}")
except SmriteaError as e:
print(e.http_status, e.code, e.request_id)Limits
The table gives the default and the cap for two search settings. It also says what happens above the cap.
| Setting | Default | Cap | Over the cap |
|---|---|---|---|
limit | The app's own setting, else 10 | 20 | HTTP 400, code TOP_N_OUT_OF_RANGE |
graph_depth | 2 | 5 | HTTP 400, code GRAPH_DEPTH_OUT_OF_RANGE |
The server rejects a value above the cap. It does not cut the value down.
Reading the score
Each result has a score. The scale depends on how the last step ordered the results. A cross_encoder score and an rrf score are different kinds of numbers. Compare scores only within one search call. Do not compare them across methods or rerankers.
Related pages
Last updated on



