feat: Add a review step for FAQs generated from conversations before using it (#10693)

This PR introduces a review step for generated FAQs, allowing a human to
validate and approve them before use in customer interactions. While
hallucinations are minimal, this step ensures accurate and reliable FAQs
for Captain to use during LLM calls when responding to customers.

- Added a status field for the FAQ
- Allow the filter on the UI.
<img width="1072" alt="Screenshot 2025-01-15 at 6 39 26 PM"
src="https://github.com/user-attachments/assets/81dfc038-31e9-40e6-8a09-586ebc4e8384"
/>
This commit is contained in:
Pranav
2025-01-15 20:24:34 -08:00
committed by GitHub
parent e3b5b30666
commit 6096932f76
15 changed files with 216 additions and 16 deletions

View File

@@ -48,9 +48,12 @@ RSpec.describe Captain::Llm::ConversationFaqService do
it 'saves the correct FAQ content' do
service.generate_and_deduplicate
expect(captain_assistant.responses.pluck(:question,
:answer)).to contain_exactly(['What is the purpose?', 'To help users.'],
['How does it work?', 'Through AI.'])
expect(
captain_assistant.responses.pluck(:question, :answer, :status)
).to contain_exactly(
['What is the purpose?', 'To help users.', 'pending'],
['How does it work?', 'Through AI.', 'pending']
)
end
end