def test_embed_equivalent_to_add_docs_with_prefix(self):
        """
        Ensure that the embedding returned by embed endpoint with hardcoded prefix matches the one created by
        add_docs with prefix set.
        Embedding from add_docs is retrieved using get_document_by_id with show_vectors=True.
        """
        for index in [self.unstructured_default_text_index, self.structured_default_text_index]:
            with self.subTest(index=index.type):
                add_docs_res = self.add_documents(
                    config=self.config, add_docs_params=AddDocsParams(
                        index_name=index.name,
                        docs=[
                            {
                                "_id": "0",
                                "text_field_1": "I am the GOAT."
                            }
                        ],
                        device="cpu",
                        tensor_fields=["text_field_1"] if isinstance(index, UnstructuredMarqoIndex) else None,
                        text_chunk_prefix="PREFIX: "
                    )
                )

                # Get the added document embedding
                get_docs_res = tensor_search.get_document_by_id(
                    config=self.config, index_name=index.name,
                    document_id="0", show_vectors=True)

                self.assertEqual(get_docs_res["_id"], "0")
                self.assertEqual(len(get_docs_res[enums.TensorField.tensor_facets]), 1)

                get_docs_embedding = get_docs_res[enums.TensorField.tensor_facets][0][enums.TensorField.embedding]

                # Embed request the same text
                embed_res = embed(
                    marqo_config=self.config, index_name=index.name,
                    embedding_request=EmbedRequest(
                        content=["PREFIX: I am the GOAT."],
                    ),
                    device="cpu"
                )

                # Assert vectors are equal
                self.assertEqual(embed_res["content"], ["PREFIX: I am the GOAT."])
                self.assertTrue(np.allclose(embed_res["embeddings"][0], get_docs_embedding))

        Ensure that the embedding returned by embed endpoint with hardcoded prefix matches the one created by
        add_docs with prefix set.
        Embedding from add_docs is retrieved using get_document_by_id with show_vectors=True.
        
tests/integ_tests/tensor_search/integ_tests/test_embed.py