What is the bug?
The default values in "semantic-search-with-local-model-defaults.json" set the "text_embedding.field_map.output.dimension" to 768. However the model only outputs 384 dimensions. This causes an error in the response when uploading documents to the vector index because the connector expects 768 dimensions, but it is only provided with 384.
How can one reproduce the bug?
- Execute the semantic search with local model flow template:
POST /_plugins/_flow_framework/workflow?use_case=semantic_search_with_local_model&provision=true
- Try and upload a document to the newly created index
- You will get an error in the response saying
"caused_by": {
"type": "illegal_argument_exception",
"reason": "Vector dimension mismatch. Expected: 768, Given: 384"
I believe this is happening because the default value in the flow framework (https://github.com/opensearch-project/flow-framework/blob/main/src/main/resources/defaults/semantic-search-with-local-model-defaults.json) is setting the dimensions feild to 768, when the model only outputs 384.
I believe this is the root cause of the issue because if you override the dimensions field and set the dimensions to 384, it works as expected.
What is the expected behavior?
The error should not occur.
What is your host/environment?
Local - OpenSearch 3.3