FAISSDocumentStore wraps a FAISS vector index behind Haystack’s DocumentStore interface. It stores documents, supports embedding-based semantic search, and can persist the index for reuse in an application. section 10.3.9 section 10.3.12
A practical setup follows this sequence:
- Choose an index according to the deployment trade-off: Flat favors recall but consumes more RAM and CPU, while HNSW or IVF can reduce resource pressure. section 10.3.9
Loading a persisted store
A deployed Streamlit app can reload the saved FAISS index and its JSON configuration with FAISSDocumentStore.load(index_path="nlpia_faiss_index.faiss", config_path="nlpia_faiss_index.json"). The loaded store can then supply documents to an EmbeddingRetriever and an extractive question-answering pipeline.
