Expand optional dependencies and document provisioning workflows#9
Expand optional dependencies and document provisioning workflows#9
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ 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
| mems = _apply_filters(memories, namespace, entity_labels, cfg) | ||
| ranked = hybrid_search(query, mems, cfg) | ||
| # Return only Memory objects | ||
| return [m for m, _ in ranked] | ||
| baseline = [m for m, _ in ranked] | ||
| if not baseline: | ||
| return [] | ||
|
|
||
| if reranker is None: | ||
| return baseline[: cfg.top_k] | ||
|
|
||
| subset = mems[: cfg.rerank_k] | ||
| reranked_subset = apply_reranker(query, subset, cfg.rerank_k, reranker) | ||
| ordered: List[Memory] = [] |
There was a problem hiding this comment.
Reranker ignores baseline ranking when selecting candidates
The rerank path slices the first rerank_k items from the filtered input (subset = mems[: cfg.rerank_k]). mems retains the caller’s original order and is never sorted by relevance, whereas baseline contains the hybrid‑search ordering. When the input sequence is not already sorted, the reranker never sees the actual top hybrid candidates, so high‑scoring memories can never be reranked to the top. This yields inconsistent results whenever callers pass memories in arbitrary order (e.g. from a database or API). The subset should be derived from the hybrid ranking (baseline[:cfg.rerank_k]) rather than the unsorted input.
Useful? React with 👍 / 👎.
Summary
uv --system, and document the workflow across README and supporting guidesmeshmind/tests/docker/, and authoring a dedicated SETUP guideTesting
https://chatgpt.com/codex/tasks/task_b_68ee1c9ee92c83218cbbebce8b0667b8