-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add refine #57
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
feat: add refine #57
Conversation
Greptile SummaryThis PR introduces significant architectural improvements and new capabilities across three main areas: Major Changes:
Issues Found:
Architecture Improvements: Confidence Score: 2/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant MemoryMachine
participant MemoryController
participant Segmenter
participant Embedder
participant VectorStore
participant Reranker
participant LLM
Note over MemoryMachine: Initialization
Client->>MemoryMachine: new()
MemoryMachine->>Embedder: get_embedder()
MemoryMachine->>VectorStore: get_store()
MemoryMachine->>Reranker: get_reranker()
MemoryMachine->>LLM: get_model()
MemoryMachine-->>Client: MemoryMachine instance
Note over Client,LLM: Create Memory Flow
Client->>MemoryController: create(request)
MemoryController->>LLM: generate annotations
LLM-->>MemoryController: LLMAnnotated
MemoryController->>Embedder: generate_embedding(summary)
Embedder-->>MemoryController: vector
MemoryController->>VectorStore: insert(vector, memory)
VectorStore-->>MemoryController: ok
MemoryController-->>Client: Memory
Note over Client,Reranker: Multi-Search Flow (with Refine)
Client->>MemoryController: multi_search_with_context(query)
MemoryController->>Segmenter: process(query)
Segmenter-->>MemoryController: sub_queries
MemoryController->>Embedder: generate_embeddings(sub_queries)
Embedder-->>MemoryController: vectors
par Parallel Vector Search
MemoryController->>VectorStore: search(vector1)
MemoryController->>VectorStore: search(vector2)
MemoryController->>VectorStore: search(vectorN)
VectorStore-->>MemoryController: memories1
VectorStore-->>MemoryController: memories2
VectorStore-->>MemoryController: memoriesN
end
MemoryController->>Reranker: rank(query, all_memories)
Reranker-->>MemoryController: ranked_results
MemoryController-->>Client: Vec<Memory>
|
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.
8 files reviewed, 5 comments
91ac4dd to
8be166c
Compare
|
@greptile re-review. |
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.
76 files reviewed, 7 comments
Move service initialization logic from binary entry points to MemoryMachine module. Convert MemoryController from static methods to instance-based architecture. Add async factory pattern for lazy component initialization (embedder, vector_store, reranker, language_model). Simplify grpc.rs and mcp.rs binaries to use MemoryMachine. Add MemoryMachineOptions for customization with sensible defaults from CONFIG.
898df0c to
8ff568b
Compare
No description provided.