feat(observability): trace retrieval evidence - #29
Open
DivyamTalwar wants to merge 1 commit into
Open
Conversation
Owner
Author
Verification checkpoint
Privacy review focus: raw query text is absent by default; traces carry only SHA-256 + length and score-only evidence metadata. Export failures are non-blocking. This PR remains intentionally open and unmerged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
JITMIND combines sparse, dense, graph, temporal, and reranking stages, but operators currently have to infer failures and latency from console prints. There is no structured answer to “which retriever contributed this evidence?”, “where were candidates removed?”, or “which stage got slow?”.
What changed
RetrievalTracecontract with per-stage duration, input/output counts, status, and error typeResearchOutput.raw_memoryand throughexplain_last_retrieval()TraceSink, an in-memory sink, and a process-safe JSONL sinkCompetitive rationale / provenance
Arize Phoenix demonstrates the value of OpenTelemetry-based tracing plus retrieval evaluation for debugging AI systems: https://github.com/Arize-ai/phoenix
This PR is an original, intentionally small JITMIND trace contract. It does not vendor Phoenix/OpenTelemetry code or add a heavy runtime dependency; adapters can translate the stable trace dictionary at the boundary.
Evidence
python -m pytest -q→ 42 passedpython -m compileall -q jitmind→ passReview notes
This is an independent proposal targeting
main; it does not depend on PR #27 or #28. Please leave it open for review and comparative evaluation.