-
-
Notifications
You must be signed in to change notification settings - Fork 254
Improve bit Boilerplate RAG implementation (#11258) #11259
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
|
Caution Review failedThe pull request is closed. WalkthroughDefault template options toggled to true in template.json; README template conditions inverted accordingly. Added commented EF Core query-splitting hints. ProductEmbeddingService now builds structured embedding inputs, fetches embeddings for queries, falls back to text search if unavailable, and applies pgvector similarity for PostgreSQL; SQL Server path retained via directives. Chatbot tool adds optional price filters. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Api as Server.API
participant Embed as EmbeddingService
participant DB as Database (PostgreSQL/SQL Server)
Client->>Api: GetProductsBySearchQuery(q)
Api->>Embed: EmbedText(q)
alt Embedding available
Api->>DB: Vector similarity query (cosine) with threshold
DB-->>Api: Similar products
else No embedding
Api->>DB: Text-based search
DB-->>Api: Matching products
end
Api-->>Client: Products
sequenceDiagram
participant User
participant Hub as SignalR AppHub
participant Embed as EmbeddingService
participant DB as Database
User->>Hub: GetProductRecommendations(userNeeds, manufacturer?, maxPrice?, minPrice?)
Hub->>Embed: GetProductsBySearchQuery(formatted query)
Embed->>DB: Retrieve products (vector/text search)
DB-->>Embed: Products
Embed-->>Hub: Products
Hub->>Hub: Apply price filters (<=maxPrice, >=minPrice), Take(10)
Hub-->>User: Top recommendations
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (5)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Pull Request Overview
This PR improves the RAG (Retrieval-Augmented Generation) implementation in the bit Boilerplate project by enhancing the chatbot's product search capabilities and fixing template configuration issues.
Key changes include:
- Enhanced AI function parameters for better product filtering with price constraints
- Improved embedding text formatting for better semantic search accuracy
- Fixed template configuration defaults for aspire and notification parameters
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| SignalR/AppHub.Chatbot.cs | Added price filtering parameters to AI function and improved search query formatting |
| Services/ProductEmbeddingService.cs | Enhanced embedding text structure and updated documentation with search approach comparison |
| Program.Services.cs | Added commented query splitting behavior options for database configurations |
| README.md | Fixed template generation command documentation for aspire and notification flags |
| .template.config/template.json | Updated default values for aspire and notification to true, added missing todo file exclusion |
closes #11258
Summary by CodeRabbit
New Features
Documentation