Skip to content

Integration with embedding library #71

Closed

Description

@donhardman

Proposal:

We should add parsing of the parameters to enable connection with the new library for automatic embeddings.

Currently, I suggest starting with the following specification:

  • fields = "field1, field2": fields we should use as the source for text to generate embeddings
  • model_name = "openai/..." or model_name = "sentence-transformers/..." for local models
  • api_key = "...": for cases where we use a remote API for embeddings (we should be able to alter and change this one)
  • use_gpu = 1|0: for cases where we use a local model and need to use GPU (if available), default is always CPU

Also we should consider to add new config:

  • embedding_cache_path = ...: path to the cache directory where we will store everything in case of local model usage
    It may look like this:
CREATE TABLE test (
    title TEXT,
    image_vector FLOAT_VECTOR 
    KNN_TYPE='hnsw' 
    KNN_DIMS='4' 
    HNSW_SIMILARITY='l2'
    MODEL_NAME = "..."
);

Checklist:

To be completed by the assignee. Check off tasks that have been completed or are not applicable.

Details
  • Implementation completed
  • Tests developed
  • Documentation updated
  • Documentation reviewed
  • Changelog updated
  • OpenAPI YAML updated and issue created to rebuild clients

Activity

  1. sanikolaev commented on Oct 17, 2024

    @sanikolaev
    Collaborator

    We may want to hide api_key in show create table output for security reasons.

  2. sanikolaev commented on Oct 28, 2024

    @sanikolaev
    Collaborator

    Dev call of Oct 28: ALTER should be supported for api_key

  3. glookka commented on Oct 31, 2024

    @glookka
    Contributor

    Adding new options is easy. However, it is not clear what should be done with these options

  4. sanikolaev commented on Nov 1, 2024

    @sanikolaev
    Collaborator

    @donhardman pls advise.

  5. donhardman commented on Nov 4, 2024

    @donhardman
    MemberAuthor

    We should parse it and store it somewhere to make it possible for the indexer stage to use it to generate embeddings with the lib as discussed before on call.

  6. donhardman commented on Nov 5, 2024

    @donhardman
    MemberAuthor

    Here are points to consider:

    The task primarily involves parsing rather than deep integration with the library.

  7. 59 remaining items

  8. removed their assignment
    on Jun 21, 2025
  9. sanikolaev commented on Jun 25, 2025

    @sanikolaev
    Collaborator

    We no longer can insert a vector if a model is specified. Unless the vector is empty.

    An empty vector means to generate it automatically.

  10. glookka commented on Jun 26, 2025

    @glookka
    Contributor

    As of 7ef1e0d, if a vector is omitted from SQL insert (e.g. insert into table (...) values (...)), embeddings are generated for such a vector. If an empty vector is inserted, it is excluded from KNN search.

  11. donhardman commented on Aug 13, 2025

    @donhardman
    MemberAuthor

    All tests were updated as required upon request, and new ones were added here: manticoresoftware/manticoresearch#3472

  12. sanikolaev commented on Aug 19, 2025

    @sanikolaev
    Collaborator

    All tests were updated as required upon request, and new ones were added here: manticoresoftware/manticoresearch#3472

    Some tests are still failing. Please update.

  13. donhardman commented on Sep 8, 2025

    @donhardman
    MemberAuthor

    Closing as tests pass and old ones done and merged: manticoresoftware/manticoresearch#3472

  14. github-actions commented on Sep 8, 2025

    @github-actions

    Thanks for the update! However, the internal checklist is not yet complete. A Manticore team member will close this issue once everything is checked off. 🛠️

  15. donhardman commented on Sep 9, 2025

    @donhardman
    MemberAuthor

    Clo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions