Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for semantic search with the dense vector #355

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

daixque
Copy link

@daixque daixque commented Nov 23, 2024

Intention

Current chatbot-rag-app is set up with only SparseVectorStrategy. I'd like to add DenseVectorStrategy because for those who speak non-English languages, DenseVectorStrategy with E5 models is good option.

I know this doesn't work for the data ingestion part, but it's great to have a dense vector option in the RAG example.

Changes

This pull request introduces several enhancements to the example-apps/chatbot-rag-app to support both sparse and dense vector strategies for Elasticsearch. The changes include updates to the environment configuration, the main chat API, and logging improvements.

Support for multiple vector strategies:

  • example-apps/chatbot-rag-app/api/chat.py: Added support for DenseVectorStrategy alongside the existing SparseVectorStrategy. Introduced new environment variables to configure the strategy type, model ID, vector field, and query field. [1] [2]

Environment configuration updates:

Logging improvements:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant