[codex] Add RAG query debug details#11
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ca59dd5644
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return { | ||
| chunk.chunk_id: round(cosine_similarity(query_vector, embed_text(chunk.text)), 6) | ||
| for chunk in index.chunks |
There was a problem hiding this comment.
Report clipped hybrid vector scores
For hybrid searches, search_rag_index_hybrid() builds vector_scores from search_rag_index_vector(..., min_score=0.0), so negative cosine scores are omitted and contribute 0.0 to the combined score. This debug path instead records the raw cosine for every chunk, so any lexical hit whose vector similarity is negative will show a vector_score that was not actually used and the breakdown cannot explain the returned combined_score.
Useful? React with 👍 / 👎.
What changed
Validation