generated from coulomb/repo-seed
optional semantic retrieval
This commit is contained in:
@@ -1812,6 +1812,8 @@ class RegistryStore:
|
||||
confidence_label=confidence_label(1.0),
|
||||
match_description=row["description"] or "",
|
||||
matched_field=matched_field,
|
||||
text_score=1.0,
|
||||
hybrid_score=1.0,
|
||||
)
|
||||
)
|
||||
for row in ability_rows:
|
||||
@@ -1830,6 +1832,8 @@ class RegistryStore:
|
||||
matched_field=matched_field,
|
||||
ability_id=row["ability_id"],
|
||||
ability_name=row["ability_name"],
|
||||
text_score=1.0,
|
||||
hybrid_score=row["confidence"],
|
||||
)
|
||||
)
|
||||
for row in capability_rows:
|
||||
@@ -1852,6 +1856,8 @@ class RegistryStore:
|
||||
ability_name=row["ability_name"],
|
||||
capability_id=row["capability_id"],
|
||||
capability_name=row["capability_name"],
|
||||
text_score=1.0,
|
||||
hybrid_score=row["confidence"],
|
||||
)
|
||||
)
|
||||
for row in feature_rows:
|
||||
@@ -1878,6 +1884,8 @@ class RegistryStore:
|
||||
capability_id=row["capability_id"],
|
||||
capability_name=row["capability_name"],
|
||||
source_reference=row["location"],
|
||||
text_score=1.0,
|
||||
hybrid_score=row["confidence"],
|
||||
)
|
||||
)
|
||||
for row in evidence_rows:
|
||||
@@ -1907,11 +1915,14 @@ class RegistryStore:
|
||||
capability_name=row["capability_name"],
|
||||
evidence_level=row["strength"],
|
||||
source_reference=row["reference"],
|
||||
text_score=1.0,
|
||||
hybrid_score=self._evidence_confidence(row["strength"]),
|
||||
)
|
||||
)
|
||||
return sorted(
|
||||
results,
|
||||
key=lambda result: (
|
||||
-result.hybrid_score,
|
||||
-result.confidence,
|
||||
result.repository_name.lower(),
|
||||
result.match_type,
|
||||
|
||||
Reference in New Issue
Block a user