NeMo-Guardrails
NeMo-Guardrails copied to clipboard
feat(embeddings): add search threshold to BasicEmbeddingsIndex
This commit introduces a search threshold to the BasicEmbeddingsIndex class. This threshold is used to filter the search results based on their distances. The _filter_results method is added to perform this filtering. The search method is updated to use this new feature. The search_threshold parameter is also added to the LLMRails classs.
TODO:
- [ ] Check if the updated doc is ok