Files
OpenViking/docs/images/ov-provenance-example.png
T
352cd89c0e feat(retrieve): add provenance metadata to search results (#852)
* feat(retrieve): add provenance metadata to search results

Adds an opt-in `include_provenance` parameter to the search/find API
endpoints. When enabled, the response includes a `provenance` array
with per-query retrieval details: which directories were traversed,
which tier (L0/L1/L2) each result came from, match reasons, and the
full thinking trace.

The internal data was already being collected in MatchedContext.level,
MatchedContext.context_type, and QueryResult.thinking_trace. This
change surfaces it through the API for retrieval observability, which
the README lists as a core design goal ("Visualized Retrieval
Trajectory").

Backward compatible: defaults to false, existing clients see no change.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: add provenance feature screenshot

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 11:14:37 +08:00

26 KiB
720x500px