{"record":{"id":"a0fcf0476be68cb8","repo":"run-llama/llama_index","slug":"vector-store-must-store-text-to-be-used-as-a-retri","errorCode":null,"errorMessage":"vector_store must store text to be used as a retrieval memory block","messagePattern":"vector_store must store text to be used as a retrieval memory block","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"llama-index-core/llama_index/core/memory/memory_blocks/vector.py","lineNumber":72,"sourceCode":"    format_template: BasePromptTemplate = Field(\n        default=DEFAULT_RETRIEVED_TEXT_TEMPLATE,\n        description=\"Template for formatting the retrieved information.\",\n    )\n    node_postprocessors: List[BaseNodePostprocessor] = Field(\n        default_factory=list,\n        description=\"List of node postprocessors to apply to the retrieved nodes containing messages.\",\n    )\n    query_kwargs: Dict[str, Any] = Field(\n        default_factory=dict,\n        description=\"Additional keyword arguments for the vector store query.\",\n    )\n\n    @field_validator(\"vector_store\", mode=\"before\")\n    def validate_vector_store(cls, v: Any) -> \"BasePydanticVectorStore\":\n        if not isinstance(v, BasePydanticVectorStore):\n            raise ValueError(\"vector_store must be a BasePydanticVectorStore\")\n        if not v.stores_text:\n            raise ValueError(\n                \"vector_store must store text to be used as a retrieval memory block\"\n            )\n\n        return v\n\n    @field_validator(\"format_template\", mode=\"before\")\n    @classmethod\n    def validate_format_template(cls, v: Any) -> \"BasePromptTemplate\":\n        if isinstance(v, str):\n            if \"{{\" in v and \"}}\" in v:\n                v = RichPromptTemplate(v)\n            else:\n                v = PromptTemplate(v)\n\n        return v\n\n    def _get_text_from_messages(self, messages: List[ChatMessage]) -> str:\n        \"\"\"Get the text from the messages.\"\"\"","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/run-llama/llama_index/blob/afd0fef371831f9bda13e5af7167cf4e981278ab/llama-index-core/llama_index/core/memory/memory_blocks/vector.py#L54-L90","documentation":"Error \"vector_store must store text to be used as a retrieval memory block\" thrown in run-llama/llama_index.","triggerScenarios":"Thrown at llama-index-core/llama_index/core/memory/memory_blocks/vector.py:72 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a vector store with stores_text=True for the retrieval memory block.","Rebuild the vector store so it persists node text, then pass it to the memory block."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"afd0fef371831f9bda13e5af7167cf4e981278ab","analyzedAt":"2026-08-15T05:42:58.429Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}