Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/knowledge-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,20 @@ order regardless of the cue; `selection.ranking_applied` is false for those call
Ordinary collection of other authorities and records remains available without
the relevance opt-in. `KnowledgeStore.collect` delegates these same options.

The default `relevance_method="weighted-lexical-v1"` searches the JSON
representation of every field, including strings. Explicitly select
`relevance_method="weighted-raw-string-v1"` (CLI:
`--relevance-method weighted-raw-string-v1`) to match original string values
instead: an actual newline or tab no longer creates a literal `n` or `t` match
from its JSON escape. Literal backslash-letter text remains searchable.
Nonstring fields, including the combined tags/applicability value, retain their
legacy JSON representation. Both methods keep the same substring matching,
distinct cue words, weights, positive-score admission and identity tie order.
The nondefault method requires `relevance`; unsupported methods are rejected.
Explicit IDs still bypass ranking. This option changes only owner discovery
ranking, not query matching or optional context-resource scoring. It is a
lexical-presence contract option, not evidence of general retrieval quality.

`context_bytes` requests a separate context view for returned generated packaged
skills. It requires an explicit positive integer budget, with no token estimate
or default. It can be used without `relevance`; optional resources then match the
Expand Down
65 changes: 65 additions & 0 deletions evidence/indexer-255-raw-string-20261030/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Opt-in raw-string lexical contract

Related tracker: [Issue #255](https://github.com/InferMatrixLab/InferRSI/issues/255).
The single frozen comparison and independent saved-output audit passed **only the
synthetic lexical-presence contract**. No general task accuracy, latency, model
or hardware efficacy, default promotion or tracker completion is inferred.

## Try the existing interface with the new explicit method

From the source checkout with the package dependencies installed:

```bash
PYTHONPATH=src python -m inferrsi collect 'cpu.stat.local' \
--relevance cgroupv2 --relevance-method weighted-raw-string-v1 \
--context-bytes 65536 --limit 1 --json
```

Omit `--relevance-method` for unchanged legacy selection. The query remains a
filter; the relevance cue ranks packaged skill owners. Context resources remain
whole files with exact owner revision and SHA-256. The fixed real-corpus example
returned the same complete 7,348-byte cgroup-resource-controls core in both
modes; this is an interface demonstration, not a quality improvement claim.

Synthetic cue `n t`, with unchanged title weight 4:

| Original title | Legacy score | Opt-in score |
|---|---:|---:|
| Actual newline + tab | 8 | 0 |
| Literal backslash-n + backslash-t | 8 | 8 |

The phantom owner is no longer admitted. All declared genuine controls remain.
See the [readable before/after](results/readable-demo.txt) and
[independent audit](results/independent-postrun-review.json).

## Retained evidence

- Frozen baseline: `1052925ff22f9a850cebc64afd0083b35ed1fae9`.
- Frozen candidate: `728984c524cf696d063ff7ef0688ae126c8546a6`.
- [Exact protocol](plan/protocol.md), original [candidate patch](patch/frozen-candidate.diff)
and [Git bundle](patch/frozen-candidate.bundle). The Git bundle requires the
publicly retained baseline commit; it preserves the original local candidate
identity rather than substituting the later publication commit.
- [Complete frozen study archive](results/frozen-study.tar.gz), SHA-256
`3074dbc24d198ff3d8ec440f839578340222b85600a5ff67c9d4186f88ec2b23`.
All 36 retained files are byte-preserved, including original fixtures,
prospective freezes, raw outputs, ordinary test logs, initial development
failure, superseded pre-review freeze, provenance, source/module fingerprints,
independent reviews and the one-run receipt. No scored comparison was repeated.
- [Current-main integration check](results/integration-check.json): clean application
to `436c950cf06ded742fef61ff4303493ac5175d4b`, 108 affected tests passed,
2 skipped and Ruff passed. This does not rebase or replace the frozen study.

## Results and boundaries

All 14 scalar and 2 ordering fixtures matched their independently authored labels.
Five phantom field-token contributions were removed across two scalar cases;
15 original-string and 11 expected nonstring-JSON positive contributions were
retained. Six nonstring field controls and 21 compatibility requests preserved
legacy behavior, including optional context contents, hashes, revisions and
omissions. Defaults, explicit-ID membership/order, filters, query and budgets
are unchanged. Full ordinary CPU checks on the frozen candidate passed 2707 tests
and 284 subtests with 12 skips; these are not task-efficacy evidence.

See [publication provenance](plan/publication.md) for the distinction between
new configured authorship, inherited historical evidence and CI qualification.
Binary file not shown.
Loading
Loading