Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request implements Phase 14 of the project: Chunking & RAG (Retrieval-Augmented Generation) Queries. It introduces a complete RAG pipeline with citation support, allowing the system to generate AI-powered answers by retrieving relevant content chunks from the knowledge base and citing sources inline.
Key changes:
- Implemented AI Answer service with RAG pipeline and inline citation support
- Added AnswerSource model to persist citations on FAQ answers
- Created SearchSetting model for configurable RAG parameters with per-space overrides
- Enhanced Q&A Wizard with prompt templates, similar questions feature, and source attribution
Reviewed changes
Copilot reviewed 57 out of 57 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| app/services/search/ai_answer_service.rb | New service implementing RAG pipeline with vector/keyword search and citation extraction |
| app/services/qa_wizard_prompt_service.rb | New service for building Q&A Wizard prompts with variable interpolation |
| app/models/search_setting.rb | New model for storing global search/RAG settings as key-value pairs |
| app/models/answer_source.rb | New model for persisting citation sources on answers |
| app/controllers/spaces/qa_wizard_controller.rb | Enhanced with RAG integration, similar questions feature, and source parsing |
| app/controllers/search_controller.rb | Added ai_answer endpoint for generating AI-powered answers |
| app/helpers/markdown_helper.rb | Added preprocess_lists for fixing LLM-generated markdown formatting |
| app/helpers/citation_helper.rb | New helper for converting inline citations to clickable links |
| app/views/search/index.html.erb | Added AI Answer panel with expandable content |
| app/views/spaces/qa_wizard/*.html.erb | Enhanced with sources display, similar questions, and improved interactivity |
| db/migrate/* | Added search_settings, answer_sources tables and new space columns |
| spec/* | Comprehensive test coverage for all new services and features |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.