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

[v1.6] Implement vector search experimental feature #369

Open
9 tasks
curquiza opened this issue Dec 26, 2023 · 4 comments · Fixed by #398
Open
9 tasks

[v1.6] Implement vector search experimental feature #369

curquiza opened this issue Dec 26, 2023 · 4 comments · Fixed by #398
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@curquiza
Copy link
Member

curquiza commented Dec 26, 2023

Hello dear community

This library currently handles an experimental feature present in Meilisearch (the engine) since v1.3.0: the vector search.

v1.6.0 of Meilisearch is released on 15/01/2024, and this new version introduces additions to vector search, but also changes related to these experimental features.

This means we need to update the repository code base according to the new changes.

Unfortunately, the internal Meili team cannot afford to spend time implementing the changes, which is why we opened this issue to the community.

If this issue is not implemented before 15/01/2024, don’t worry 😊 We will do a clear communication saying the library cannot work with the experimental v1.6.0 vector search for the moment until someone takes it! Of course, even if we don’t implement it, users will still be able to use all the introduced stable features.

So no pressure on the community, just to let you know and be transparent with our choices.

Thank you in advance for your help ❤️

👇 Below you will find what we expect to be done to make the library up-to-date with the vector search feature in Meilisearch v1.6.0


Refer to the changelogs to have a global view of the changes: https://github.com/meilisearch/meilisearch/releases/tag/v1.6.0

Additions

  • Ability to receive the embedders setting when calling the /indexes/:index_uid/settings route (GET/PATCH), so the methods to get and update global settings of an indexes should be adapted.
  • Introduction of new routes
    • Create a new method to get the settings by calling GET /indexes/:index_uid/settings/embedders
    • Create a new method to update the settings by calling PATCH /indexes/:index_uid/settings/embedders
    • Create a new method to reset the settings by calling DELETE /indexes/:index_uid/settings/embedders
  • Introduction of a new parameter during the search: hybrid. It can take two fields: semanticRatio and embedder.
  • ⚠️ Tests should be added

Changes

Usage changes introduced in v1.6.0 should not impact the code base of the library. Let me know on the issue if we are wrong.

More instructions

👉 If you want details about how the feature works, refer to this: https://meilisearch.notion.site/v1-6-Hybrid-Search-Embedders-ea42c82f90cc4bc0be1eeb917c1118c8

@curquiza curquiza added enhancement New feature or request good first issue Good for newcomers labels Dec 26, 2023
@curquiza
Copy link
Member Author

Since v1.7.0
OpenAI models now accepts dimensions field. The implementation should reflect this

@curquiza
Copy link
Member Author

curquiza commented May 7, 2024

Since v1.8.0

  • new models have been introduced
    • Ollama model
    • Generic REST embedder
  • a new embedder settings: distribution

Check changelogs for details

@curquiza
Copy link
Member Author

curquiza commented Jul 1, 2024

Since v1.9.0

  • Breaking: _vectors no longer returned in documents (by default). Use retrieveVectors during the search to see it -> this library should accept the retrieveVectors search parameter at search

@brunoocasali
Copy link
Member

Since v1.10.0

Usage: https://meilisearch.notion.site/v1-10-AI-search-changes-737c9d7d010d4dd685582bf5dab579e2?pvs=74

  • Rest API
    • Removed parameters: query, inputField, inputType, pathToEmbeddings and embeddingObject.
    • Replaced by request and response
    • New parameter: headers
  • Add url parameter to the OpenAI embedder
  • dimensions is now available as an optional parameter for ollama embedders.

meili-bors bot added a commit that referenced this issue Jan 11, 2025
398: implement experimental ai-powered search r=ahmednfwela a=memishood

# Pull Request

## Related issue
Fixes #369 

## What does this PR do?
I've implemented all the required steps mentioned in the issue above. I made every effort to respect the existing project conventions. I hope this pull request will be helpful and add value to Meilisearch 💜

**PR:** I didn't uncomment vector search tests in search_tests.dart as I'm focused on embedders capability.

### Some technical points that I might have considered wrong in the pull-req
- Ensure `semanticRatio` is between 0.0 and 1.0
- Throw exception when embedder source is not one of them: `openAi`, `huggingFace`, `userProvided`, `rest`, `ollama`

**Any comment & feedback is appreciated!**

## PR checklist
Please check if your PR fulfills the following requirements:
- [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!


Co-authored-by: Emre Memis <[email protected]>
Co-authored-by: ahmednfwela <[email protected]>
Co-authored-by: Emre <[email protected]>
@meili-bors meili-bors bot closed this as completed in be0ecb9 Jan 11, 2025
@ahmednfwela ahmednfwela reopened this Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants