The adaptive store retrieves context automatically based on what you are working on. This guide covers how that retrieval works, how the library accumulates knowledge, and how to manage context relevance over time.
At the start of each session turn, the adaptive store runs a retrieval pass using the current session content as the query. It combines vector search, text search, and graph traversal to find relevant entries, then ranks them by relevance.
The result is a ranked list of context entries that simse prepends to the system prompt. You do not need to ask for context explicitly — it appears automatically when it is relevant.
Three signals influence which entries surface:
| Signal | Description |
|---|---|
| Semantic similarity | How closely the entry's embeddings match the current session query |
| Text relevance | Keyword-based score from the search index based on term overlap |
| Recency and frequency | How recently the entry was retrieved and how often it has been useful |
The adaptive learning engine adjusts weights for each entry based on usage. Entries that are retrieved and used consistently rise in the rankings. Entries that are retrieved but never referenced drop over time.
The library accumulates content automatically from your sessions. As you work with simse, relevant context is captured, embedded, classified into topics, and deduplicated against existing entries.
You can also explicitly ask simse to store something:
Remember that the payment service uses idempotency keys for all mutations.
simse uses the library_shelve tool to save the content with an appropriate topic classification. You do not need to specify topics or tags -- the library system classifies entries automatically.
To store content with a specific topic, ask simse directly:
Save this under the "api-design" topic: we use cursor-based pagination
for all list endpoints.
If the store surfaces entries that are no longer relevant, ask simse to remove them:
Search the library for entries about the old project name and remove
any that are no longer relevant.
simse uses library_search to find matching entries and library_withdraw to remove them by ID. You can also ask simse to remove a specific entry if you know its ID.
If an entry exists but its content is outdated, tell simse the new information:
Update the library: the API spec now uses OpenAPI 3.1 instead of 3.0.
If the new content is semantically close to an existing entry, the store merges them automatically rather than creating a duplicate.
Remove specific entries that are no longer useful by using library_withdraw with the entry ID. To find candidates for removal, use library_search or library_catalog to browse entries by topic.
To manage store growth, periodically ask simse to search for and withdraw outdated entries. Removed entries are permanently deleted.
simse automatically retrieves relevant library entries at each turn based on the current session context. You do not need to search manually in most cases.
When you want to search explicitly, ask simse:
Search the library for notes on database connection pooling.
simse uses the library_search tool, which accepts a query string and an optional maximum number of results. The search combines vector similarity and text matching to find the most relevant entries.
You can also browse entries by topic:
Show me what's in the library under the "security" topic.
simse uses library_catalog to list entries within a topic.
Entries are scored on two axes:
Recency — How recently the entry was retrieved. Entries retrieved in the last few sessions score higher than entries retrieved months ago. The recency score decays exponentially over time.
Frequency — How often the entry has been retrieved across sessions. Entries that consistently surface and get used score higher than entries that are retrieved rarely.
The final score combines semantic similarity, text relevance, recency, and frequency. The weights for each component are adjusted by the adaptive learning engine based on usage patterns.
library_withdraw to prevent them from surfacing in future sessions.The library organizes entries by topic automatically. When simse stores an entry using library_shelve, it classifies the content into the topic hierarchy. You can specify a topic explicitly or let the system classify it.
To browse the topic structure, ask simse to catalog a topic:
Show me all library entries under the "authentication" topic.
simse uses library_catalog to list entries within that topic. To consolidate related entries within a topic, simse can use library_compact to merge near-duplicate or overlapping entries.
The adaptive store limits how much context it injects to avoid saturating the model's context window. The maxResults setting in memory.json controls how many entries are retrieved per query (default: 10). The similarityThreshold setting (default: 0.7) filters out low-relevance entries.
When more entries match than the limit allows, the highest-scoring entries are selected. Lower-scoring entries are dropped for that turn but remain in the store.