-
Notifications
You must be signed in to change notification settings - Fork 0
chore: switch to rerank in umem_ai #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Greptile SummaryThis PR consolidates reranking functionality from the standalone Major changes:
Critical issue found:
Cleanup needed:
Confidence Score: 1/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant MemoryController
participant Embedder
participant VectorStore
participant RerankingModel
participant AIProvider
participant RerankAPI
Client->>MemoryController: search_with_context(query)
MemoryController->>Embedder: generate_embedding(query)
Embedder-->>MemoryController: vector
MemoryController->>VectorStore: search(vector_query, limit=20)
VectorStore-->>MemoryController: memories
MemoryController->>MemoryController: extract summaries from memories
MemoryController->>RerankingModel: get_model()
RerankingModel-->>MemoryController: Arc<RerankingModel>
MemoryController->>MemoryController: build RerankRequest
MemoryController->>AIProvider: do_reranking(request)
alt Cohere Provider
AIProvider->>RerankAPI: POST /rerank
RerankAPI-->>AIProvider: rankings with scores
else AmazonBedrock Provider
AIProvider->>RerankAPI: invoke rerank model
RerankAPI-->>AIProvider: rankings with scores
else OpenAI Provider (BUG)
AIProvider-->>AIProvider: panic! unimplemented!()
end
AIProvider-->>MemoryController: RerankResponse
MemoryController->>MemoryController: reorder memories by rankings
MemoryController-->>Client: top-k reranked memories
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (1)
-
crates/umem_config/src/lib.rs, line 94-104 (link)style:
PineconeandCoherestructs are unused after removing theRerankerenum
16 files reviewed, 2 comments
No description provided.