Skip to content

Conversation

mehmetymw
Copy link

No description provided.

@mehmetymw
Copy link
Author

Hi, while adding Bedrock support, I also considered persisting the embeddings to the database. I created a new table called bedrock_embeddings_1024 in init.sql. However, I noticed that the current implementation of SaveEmbeddings only routes inserts based on vector length, not model name. This could lead to confusion or data collisions if multiple providers (e.g., Ollama and Bedrock) produce embeddings of the same dimension (e.g., 1024).

To avoid polluting the current logic, I didn’t modify it yet, but I’d suggest refactoring SaveEmbeddings to route based on metadata["model"] instead of (or in addition to) the embedding length. This would allow more reliable separation of embeddings across different models.

Alternatively, using a single embeddings table with additional columns like model_name, dim, and created_at might be a more scalable and normalized approach.

Let me know what you think—happy to update the code accordingly if this direction makes sense.

@mehmetymw mehmetymw changed the title bedrock added as new embedder, add test and example Add Bedrock as new embedder backend with test and example Jul 26, 2025
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