Skip to content

Commit de3d7e4

Browse files
committed
docs(knowledge): name where a shipped source's unsupported mode is refused
The skill row said an unsupported retrieval mode is refused at save. That holds for a run-time save only: a shipped source installs, and its every search answers 503. The row now says both, inside the file's existing ceiling (re-banked at 7247). The changeset names @objectstack/skills, which ships the SKILL.md. The guide now says scores of two sources are not comparable (the service does sort them together), and the score jsdoc says the store's ranking rather than higher first. Claude-Session: https://claude.ai/code/session_01JQwxbaASqBozmmj1n5tbUf Co-authored-by: Claude <noreply@anthropic.com>
1 parent ff557c4 commit de3d7e4

5 files changed

Lines changed: 8 additions & 7 deletions

File tree

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
---
22
'@objectstack/service-knowledge': patch
3+
'@objectstack/skills': patch
34
---
45

56
docs(knowledge): `search_knowledge` says what a hit's score means, and the AI skill documents `source.retrieval.mode`
67

78
Clause-②: no
89
Metadata-protocol: none
910

10-
The `search_knowledge` description now says that a hit's `score` gives only its order among the hits of its own source, not how relevant it is, and the `score` member says the same: under a one-leg retrieval mode the first hit scores 1, and scores of sources searched in different modes are not comparable. The `objectstack-ai` skill lists `source.retrieval.mode` (vector, keyword or hybrid; omitted means the store's default; a mode the store does not run is refused at save), paid for by shortening two of its own sentences.
11+
The `search_knowledge` description now says that a hit's `score` gives only its order among the hits of its own source, not how relevant it is, and the `score` member says the same: under a one-leg retrieval mode the first hit scores 1, and scores of sources searched in different modes are not comparable. The `objectstack-ai` skill lists `source.retrieval.mode` (vector, keyword or hybrid; omitted means the store's default; a mode the store does not run is refused at a run-time save, and a shipped source's every search answers 503), paid for by shortening two of its own sentences.

‎content/docs/ai/knowledge-rag.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ one, and the merge happens before the permission re-check. A source can run one
141141
leg alone with `source.retrieval.mode` (`'vector'`, or `'keyword'`, which calls
142142
no embedder); its first hit then scores 1. A score orders the hits of one
143143
source; it is not a measure of relevance, and scores of two sources are not
144-
compared.
144+
comparable.
145145

146146
```ts
147147
const knowledge = ctx.getService('knowledge');

‎packages/services/service-knowledge/src/knowledge-tools.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export interface SearchKnowledgeHit {
143143
/** The passage that matched. */
144144
snippet: string;
145145
/**
146-
* The hit's order among the hits of its own source, higher first: not a
146+
* The hit's order among the hits of its own source in the store's ranking: not a
147147
* measure of relevance, and not comparable across sources (ADR-0161, the
148148
* dated note of 2026-11-30 under K8). Under a one-leg mode it reflects rank
149149
* alone, and the first hit scores 1.

‎scripts/check-skills-token-ratchet.mjs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -564,13 +564,13 @@ export const CEILINGS = new Map([
564564
// text is 28990 -> ceil(28990 / 4) = 7248; the row moves +48, the measured
565565
// remainder only. Pinned AT the measurement.
566566
// ceil(($(wc -c < skills/objectstack-ai/SKILL.md) - 27) / 4) == ceil(28990 / 4)
567-
// -7 (was 7248): #38692 phase 1a added the `source.retrieval.mode` row and
567+
// -1 (was 7248): #38692 phase 1a added the `source.retrieval.mode` row and
568568
// paid for it in the same file: the `adapter` row's save refusal names the
569569
// mounted stores alone, the one-slot sentence of the source's identity went
570570
// (the registry's 409 names both doors), and "Rerank and hybrid weighting"
571571
// became one clause. Banked at the measurement.
572-
// ceil(($(wc -c < skills/objectstack-ai/SKILL.md) - 27) / 4) == ceil(28963 / 4)
573-
['skills/objectstack-ai/SKILL.md', 7241],
572+
// ceil(($(wc -c < skills/objectstack-ai/SKILL.md) - 27) / 4) == ceil(28987 / 4)
573+
['skills/objectstack-ai/SKILL.md', 7247],
574574
// -12 (was 6331): the `http.server` decision-table row dropped a trailing
575575
// clause that taught `contributes.routes` as a key that "parses but serves
576576
// nothing". The key is retired — an authored entry is now REFUSED, carrying

‎skills/objectstack-ai/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ object or field, when you may not search that object or query a field it reads.
261261
| `source.metadataFields` | Fields kept for search-time filtering (`status`, `owner_id`, `tags`) |
262262
| `source.where` | ObjectQL `where`: keeps drafts and archived rows out |
263263
| `source.split` | How documents are cut into passages (below) |
264-
| `source.retrieval.mode` | `'vector'` (by meaning), `'keyword'` (by words: codes, clause numbers) or `'hybrid'`; omitted: the store's default (`hybrid` on `turso`, `pgvector`). A mode the store does not run is refused at save (`memory` runs none) |
264+
| `source.retrieval.mode` | `'vector'` (by meaning), `'keyword'` (by words: codes, clause numbers) or `'hybrid'`; omitted: the store's default (`hybrid` on `turso`, `pgvector`). A mode the store lacks fails a run-time save; shipped, every search (503). `memory` runs none |
265265
| `refresh.onRecordChange` | Sync from record events (default `true`); `false` leaves the index to an external indexer |
266266
| `aiExposed` | May `search_knowledge` expose it (default `true`) |
267267

0 commit comments

Comments
 (0)