Uh oh!
There was an error while loading. Please reload this page.
Validate persona description is sufficiently different - #1225
Conversation
Closes: #1218 Check if the description for a new persona is different enough from the existing personas descriptions. This is done to correctly differentiate between personas
befb7b4 to
490e355Compare| ) | ||
| # If the distance is less than the threshold, the persona description is too similar | ||
| if persona_distance.distance < self._persona_diff_desc_threshold: | ||
| return False |
There was a problem hiding this comment.
How expensive is it to parallelize this?
There was a problem hiding this comment.
I tried 2 approaches to get the distances:
- Direct query to sqlite and get the distances
- Query to get all the personas, then use
numpymatrices operations to get the distance
The result of the experiment was that it didn't matter, both of them were practically onpar.
For this specific comparison for just checking the threshold probably makes no difference to parallelize it with matrices operations. I don't expect someone having 1000 different personas in their DB. If it happens then yes, we would need for optimization. Probably with a sensible amount of personas (<10) really makes no difference
There was a problem hiding this comment.
Let's take an extreme but not unreasonable example: 100 personas. Would we start seeing issues in this case?
Closes: #1218
Check if the description for a new persona is different enough from the existing personas descriptions. This is done to correctly differentiate between personas