def test_prefix_multimodal(self):
        """Ensures that vectorise is called on text list with prefixes, but image list without."""

        for index in [self.unstructured_index_multimodal]:
            with self.subTest(index=index.type):
                # Add a multimodal doc with a text and image field
                self.add_documents(
                    config=self.config,
                    add_docs_params=AddDocsParams(
                        index_name=index.name,
                        docs=[{
                            "Title": "Horse rider",
                            "text_field": "hello",
                            "image_field": TestImageUrls.IMAGE1.value,
                            "_id": "1"
                        }],
                        device="cpu",
                        text_chunk_prefix="passage: ",
                        mappings={
                            "multimodal_fields": {
                                "type": "multimodal_combination",
                                "weights": {"text_field": 0.5,
                                            "image_field": 0.3}
                            }} if isinstance(index, UnstructuredMarqoIndex) else None,
                        tensor_fields=["multimodal_fields"] if isinstance(index, UnstructuredMarqoIndex) else None
                    )
                )

                self.add_documents(
                    config=self.config,
                    add_docs_params=AddDocsParams(
                        index_name=index.name,
                        docs=[{
                            "Title": "Horse rider",
                            "text_field": "passage: hello",
                            "image_field": TestImageUrls.IMAGE1.value,
                            "_id": "2"
                        },
                        {
                            "Title": "Horse rider",
                            "text_field": "passage: passage: hello",
                            "image_field": TestImageUrls.IMAGE1.value,
                            "_id": "3"
                        }],
                        device="cpu",
                        mappings={
                            "multimodal_fields": {
                                "type": "multimodal_combination",
                                "weights": {"text_field": 0.5,
                                            "image_field": 0.3}
                            }} if isinstance(index, UnstructuredMarqoIndex) else None,
                        tensor_fields=["multimodal_fields"] if isinstance(index, UnstructuredMarqoIndex) else None
                    )
                )
                

                # Get all documents (with vectors)
                res = tensor_search.get_documents_by_ids(
                    config=self.config, index_name=index.name, document_ids=["1", "2", "3"],
                    show_vectors=True
                ).dict(exclude_none=True, by_alias=True)
                
                # Assert that the text field remains the same stored
                self.assertEqual(res["results"][0]["text_field"], "hello")
                # Assert that the text field embedding is equivalent to the embedding with the prefix
                # FIXME this passes on Mac (arm CPU), but fails on amd64 CPU
                self.assertTrue(np.allclose(res["results"][0]["_tensor_facets"][0]["_embedding"],
                                            res["results"][1]["_tensor_facets"][0]["_embedding"]))
                
                # Assert that no double prefixing happens in passage 1, so the embeddings of passage 1 != passage 3
                self.assertFalse(np.allclose(res["results"][0]["_tensor_facets"][0]["_embedding"],
                                             res["results"][2]["_tensor_facets"][0]["_embedding"]))
Ensures that vectorise is called on text list with prefixes, but image list without.
tests/integ_tests/tensor_search/test_prefix.py