Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughMigration from custom AiService to Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Client
participant EmbeddingService
participant KnowledgeRepos as Repos<br/>(Entity, Relation)
participant GraphRAGService
participant LanguageModel
participant ContextFormatter
participant Result
Client->>GraphRAGService: query(input, organizationId)
GraphRAGService->>EmbeddingService: embed query text
EmbeddingService-->>GraphRAGService: embedding vector
GraphRAGService->>KnowledgeRepos: k-NN search seed entities
KnowledgeRepos-->>GraphRAGService: seed entities
GraphRAGService->>KnowledgeRepos: BFS traversal (N-hops)
KnowledgeRepos-->>GraphRAGService: related entities & relations
GraphRAGService->>GraphRAGService: RRF score fusion<br/>(embedding + graph ranks)
GraphRAGService->>GraphRAGService: sort by score
GraphRAGService->>ContextFormatter: format entities, relations
ContextFormatter-->>GraphRAGService: markdown context
GraphRAGService-->>Result: GraphRAGResult<br/>(entities, relations, scores, context, stats)
sequenceDiagram
autonumber
participant Extractor as EntityExtractor
participant LanguageModel as LLM:<br/>LanguageModel
participant Prompt as Prompt.make()
participant OntologyService
participant Result
Extractor->>Extractor: obtain LanguageModel<br/>from dependencies
Extractor->>Prompt: construct system + user<br/>prompt array
Prompt-->>Extractor: Prompt object
Extractor->>LanguageModel: generateObject<br/>({ prompt, schema })
LanguageModel-->>Extractor: { value: { entities }, usage }
Extractor->>OntologyService: validate entity types
OntologyService-->>Extractor: valid/invalid results
Extractor->>Extractor: aggregate by<br/>canonicalName
Extractor-->>Result: { entities, invalidTypes, tokensUsed }
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit
Release Notes
New Features
Dependencies
nextandzodto latest canary versions.Documentation
Tests
✏️ Tip: You can customize this high-level summary in your review settings.