Skip to content

Commit

Permalink
Reduce false positive matches by reducing the similarity distance
Browse files Browse the repository at this point in the history
  • Loading branch information
ptelang committed Jan 6, 2025
1 parent 8328979 commit a735435
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/codegate/pipeline/codegate_context_retriever/codegate.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ async def process(
user_messages = re.sub(r"```.*?```", "", user_messages, flags=re.DOTALL)

# Vector search to find bad packages
bad_packages = await storage_engine.search(query=user_messages, distance=0.8, limit=100)
storage_engine = StorageEngine()
searched_objects = await storage_engine.search(query=user_messages, distance=0.5, limit=100)

# All bad packages
all_bad_packages = bad_snippet_packages + bad_packages
Expand Down

0 comments on commit a735435

Please sign in to comment.