fix(playbook): preserve exact match scores in hybrid recommendations
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / build-and-deploy (push) Has been cancelled
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / tests (push) Has been cancelled
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / build-and-deploy (push) Has been cancelled
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / tests (push) Has been cancelled
This commit is contained in:
@@ -250,6 +250,21 @@ class TestPlaybookService:
|
||||
playbook = create_test_playbook()
|
||||
await mock_repo.create(playbook)
|
||||
|
||||
class LowerScoringRagService:
|
||||
async def hybrid_search(self, **_kwargs):
|
||||
return [
|
||||
PlaybookMatch(
|
||||
playbook_id=playbook.playbook_id,
|
||||
similarity_score=0.4,
|
||||
match_type="hybrid",
|
||||
)
|
||||
]
|
||||
|
||||
async def fake_rag_service():
|
||||
return LowerScoringRagService()
|
||||
|
||||
service._get_rag_service = fake_rag_service
|
||||
|
||||
# Query with matching symptoms
|
||||
symptoms = SymptomPattern(
|
||||
alert_names=["HighCPU"],
|
||||
|
||||
Reference in New Issue
Block a user