Skip to content

Commit

Permalink
Merge pull request #773 from bounswe/be-772/vector-db-update
Browse files Browse the repository at this point in the history
  • Loading branch information
Alputer authored Dec 25, 2023
2 parents 63f5e26 + 699aab8 commit 89c5e01
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/backend/src/poll/poll.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -681,9 +681,10 @@ export class PollService {
query: string,
userId?: string | null,
): Promise<Poll[]> {
const polls = await this.pineconeStore.similaritySearchWithScore(query, 5);
const polls = await this.pineconeStore.similaritySearchWithScore(query, 3);

const pollIDs = polls
.filter((result) => result[1] > 0.8)
.filter((result) => result[1] > 0.70)
.map((result) => result[0].metadata.id);

const results = await Promise.all(
Expand Down

0 comments on commit 89c5e01

Please sign in to comment.