Skip to content

[11532] Improve local nav accessibility#14363

Closed
cjcenizal wants to merge 10 commits into
masterfrom
11532/local-nav-accessibility
Closed

[11532] Improve local nav accessibility#14363
cjcenizal wants to merge 10 commits into
masterfrom
11532/local-nav-accessibility

Conversation

@cjcenizal
Copy link
Copy Markdown
Contributor

Resolves #11532

@cjcenizal cjcenizal added Project:Accessibility bug Fixes for quality problems that affect the customer experience v6.1.0 v7.0.0 labels Oct 6, 2017
@cjcenizal cjcenizal changed the base branch from master to k7-ui-framework October 6, 2017 21:09
@cjcenizal cjcenizal changed the base branch from k7-ui-framework to master October 6, 2017 21:10
@cjcenizal cjcenizal closed this Oct 6, 2017
@cjcenizal cjcenizal deleted the 11532/local-nav-accessibility branch October 6, 2017 21:11
Apmats added a commit to Apmats/kibana that referenced this pull request May 13, 2026
…lastic#14363)

Land the natural-language search API over SML, replacing the transitional
bool.should mash with a proper RRF retriever and introducing the
trust-boundary split between runtime-imposed scoping and
agent-discoverable filters.

Decisions per the implementation prompt §6:

- §6.1 Retrieval: RRF over BM25 (title^2, description, content via
  best_fields multi_match) and semantic (unified_semantic). Filters
  mirrored to each child retriever so RRF can't pull unauthorized docs
  into the fused top-k. Defaults rank_constant=60, rank_window_size=50.
- §6.2 Filter merging: option (2). Service signature splits
  `scoping?: SmlSearchScoping` (runtime-imposed, unconditional) from
  `filters?: SmlSearchFilters` (caller refinement). Trust boundary
  visible at the API layer; merge happens in one place. Sean's per-type
  id-allowlist shape (elastic#267333) survives unchanged as `SmlSearchScoping`.
- §6.3 Agent-supplied dimensions: `types?: string[]`, `tags?: string[]`,
  each lowering into a `terms` clause. Time-range and free-form payload
  filters deferred.
- §6.4 Compact LLM response: SmlSearchResult drops the `content` blob,
  full `payload`, dates, and discovery_labels; gains `more_content`
  (true when the indexed record has non-empty content worth fetching
  via sml_read). `permissions` retained internally for post-hoc
  filtering, stripped from the HTTP response.
- §6.5 Reference resolution: URI strings only — SML does not
  dereference. Inline-expansion deferred until eval data justifies it
  (Reading 1; Sean's "SML shouldn't turn pointers into blobs").
- §6.6 Tool description rewrite with when-to-use guidance and four
  worked examples (plain query, types+tags filter, connector
  restriction, wildcard inventory). Runtime scoping is not exposed in
  the LLM input schema.

Fixes the `total` bug: post-permission-filter `results.length` no
longer overwrites ES `hits.total.value`.

Frontend / HTTP route updates:
- POST /sml/_search body accepts `scoping?` and `filters?` (replaces
  the old `filters` per-type id-allowlist field and `skip_content`).
- POST /sml/_autocomplete renames `filters` → `scoping`; no
  agent-discoverable filters on this route (no LLM in the path).
- Frontend SmlService, useSmlSearch, useSmlAutocomplete, usePrefetchSml,
  queryKeys, and buildSmlScopingFromAgent (formerly
  buildSmlFiltersFromAgent) all follow the new naming.

Tests:
- New unit tests for RRF body, filter threading through child
  retrievers, vocabulary-mismatch over the semantic leg, more_content
  on/off, compact result mapping, agent-filter builder, and tool
  wrapper scoping/filters mapping.
- FTR + Scout integration tests updated to drop content/skip_content
  assertions and lock in the no-content invariant.

Out of scope (deferred per epic): reranker, kneedle, per-type
retriever profiles, HyDE/query expansion, reference inline-expansion,
telemetry instrumentation (elastic#14366), recrawl/versioning (elastic#14367).

Open coordination points (not blocking this PR):
- Inference model on unified_semantic still relies on defaults
  (Kathleen Mar 19: pin Jina V5). Belongs to A.
- Kathleen review on A's PR proposes splitting unified_semantic into
  per-field semantic_text fields. If A reverts unified, the semantic
  leg in this PR fans out from 1 to 2-3 child retrievers — small
  retriever-only change.
- Pierre's configuration_override-aware tool handler context
  (elastic#267333 review) — wrapper currently reads agentConfiguration from
  the tool handler context, which `runner.ts` already resolves with
  overrides applied via `resolveConfiguration`. Note in code.

Stacked on top of apmats/sml-autocomplete-followup (elastic#14364). Once
autocomplete merges, this PR rebases to main.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Fixes for quality problems that affect the customer experience Project:Accessibility v6.1.0 v7.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant