You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
- **Stigmergic pheromones** reward useful documents but decay over time, preventing filter bubbles.
72
72
- **MMR + ε-greedy** introduces diversity without tanking relevance.
73
73
- **Zero external dependencies by default.** Uses a hashing trick for embeddings so you can see results instantly, but slots in any vector model when you’re ready.
74
-
- **Adapters included.** LangChain and LlamaIndex adapters ship in `neuralcache.adapters` and only import their extras when you use them.
74
+
- **Adapters included.** LangChain and LlamaIndex adapters ship in `neuralcache.adapters`; install them on demand with `pip install "neuralcache[adapters]"`.
75
75
- **CLI + REST API + FastAPI docs** give you multiple ways to integrate and debug.
76
76
- **Plus API** adds `/rerank/batch` and Prometheus-ready `/metrics` endpoints when you run `uvicorn neuralcache.api.server_plus:app` (install the `neuralcache[ops]` extra for dependencies).
77
77
- **SQLite persistence out of the box.** `neuralcache.storage.sqlite_state.SQLiteState` keeps narrative + pheromone state durable across workers without JSON file juggling.
@@ -117,13 +117,63 @@ Gating plugs in before narrative, pheromone, and MMR scoring—so downstream mem
117
117
- **REST API** (`uvicorn neuralcache.api.server:app`) with `/rerank`, `/feedback`, `/metrics`, and `/healthz` endpoints.
118
118
- **Plus API** (`uvicorn neuralcache.api.server_plus:app`) adds `/rerank/batch`, Prometheus `/metrics`, and mounts the legacy routes under `/v1`.
119
119
- **CLI** (`neuralcache "<query>" docs.jsonl --top-k 5`) for quick experiments and scripting.
@@ -142,7 +194,11 @@ See [`examples/quickstart.py`](examples/quickstart.py) for an end-to-end script.
142
194
143
195
Adjust everything via `.env`, environment variables, or direct `Settings(...)` instantiation.
144
196
145
-
Persistence happens automatically using SQLite (or JSON fallback) so narrative and pheromone stores survive restarts. Point `NEURALCACHE_STORAGE_DIR` at shared storage for multi-worker deployments, or import `SQLiteState` directly if you need to wire the persistence layer into an existing app container.
197
+
Persistence happens automatically using SQLite (or JSON fallback) so narrative and pheromone stores survive restarts. Point `NEURALCACHE_STORAGE_DIR` at shared storage for multi-worker deployments, or import `SQLiteState` directly if you need to wire the persistence layer into an existing app container. Under the hood the SQLite state:
198
+
199
+
- enables **WAL mode** with `synchronous=NORMAL` so multiple workers can read while a writer appends.
200
+
- tracks a `metadata` row with the current schema version (`SQLiteState.schema_version()`), raising if a newer schema is encountered so upgrades can run explicit migrations before boot.
201
+
- stores pheromone exposures and timestamps so retention/evaporation policies can prune long-lived records.