llama-index-readers-faiss


Namellama-index-readers-faiss JSON
Version 0.4.0 PyPI version JSON
download
home_pageNone
Summaryllama-index readers faiss integration
upload_time2025-07-30 20:51:31
maintainerjerryjliu
docs_urlNone
authorNone
requires_python<4.0,>=3.9
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # LlamaIndex Readers Integration: Faiss

## Overview

Faiss Reader retrieves documents through an existing in-memory Faiss index. These documents can then be used in a downstream LlamaIndex data structure. If you wish to use Faiss itself as an index to organize documents, insert documents, and perform queries on them, please use VectorStoreIndex with FaissVectorStore.

### Installation

You can install Faiss Reader via pip:

```bash
pip install llama-index-readers-faiss
```

## Usage

```python
from llama_index.readers.faiss import FaissReader

# Initialize FaissReader with an existing Faiss Index object
reader = FaissReader(index="<Faiss Index Object>")

# Load data from Faiss
documents = reader.load_data(
    query="<Query Vector>",  # 2D numpy array of query vectors
    id_to_text_map={"<ID>": "<Text>"},  # A map from IDs to text
    k=4,  # Number of nearest neighbors to retrieve
    separate_documents=True,  # Whether to return separate documents
)
```

This loader is designed to be used as a way to load data into
[LlamaIndex](https://github.com/run-llama/llama_index/tree/main/llama_index).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "llama-index-readers-faiss",
    "maintainer": "jerryjliu",
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Your Name <you@example.com>",
    "download_url": "https://files.pythonhosted.org/packages/9f/dc/0608cd74fd6c7c7b2a2aaad180aed3ced370b70af703d37c51c84e922719/llama_index_readers_faiss-0.4.0.tar.gz",
    "platform": null,
    "description": "# LlamaIndex Readers Integration: Faiss\n\n## Overview\n\nFaiss Reader retrieves documents through an existing in-memory Faiss index. These documents can then be used in a downstream LlamaIndex data structure. If you wish to use Faiss itself as an index to organize documents, insert documents, and perform queries on them, please use VectorStoreIndex with FaissVectorStore.\n\n### Installation\n\nYou can install Faiss Reader via pip:\n\n```bash\npip install llama-index-readers-faiss\n```\n\n## Usage\n\n```python\nfrom llama_index.readers.faiss import FaissReader\n\n# Initialize FaissReader with an existing Faiss Index object\nreader = FaissReader(index=\"<Faiss Index Object>\")\n\n# Load data from Faiss\ndocuments = reader.load_data(\n    query=\"<Query Vector>\",  # 2D numpy array of query vectors\n    id_to_text_map={\"<ID>\": \"<Text>\"},  # A map from IDs to text\n    k=4,  # Number of nearest neighbors to retrieve\n    separate_documents=True,  # Whether to return separate documents\n)\n```\n\nThis loader is designed to be used as a way to load data into\n[LlamaIndex](https://github.com/run-llama/llama_index/tree/main/llama_index).\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "llama-index readers faiss integration",
    "version": "0.4.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "525e2f20a8fc360fcdf76758b25025972894426e022013d86eab4bd5ffb487f5",
                "md5": "9f82bcb94c21a0441c44edd9dc5494a1",
                "sha256": "6dfdbda79e8d3e3a1e9bb2a53a5df1ed4e040c4f7615c03ca2559d437fca32f2"
            },
            "downloads": -1,
            "filename": "llama_index_readers_faiss-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9f82bcb94c21a0441c44edd9dc5494a1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 3919,
            "upload_time": "2025-07-30T20:51:30",
            "upload_time_iso_8601": "2025-07-30T20:51:30.816703Z",
            "url": "https://files.pythonhosted.org/packages/52/5e/2f20a8fc360fcdf76758b25025972894426e022013d86eab4bd5ffb487f5/llama_index_readers_faiss-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9fdc0608cd74fd6c7c7b2a2aaad180aed3ced370b70af703d37c51c84e922719",
                "md5": "6de2264f9f793a8253621bd82a5a920f",
                "sha256": "07b8ce048432a1f8e6e0824311696a49de04171795eb76e94382e469b840e983"
            },
            "downloads": -1,
            "filename": "llama_index_readers_faiss-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "6de2264f9f793a8253621bd82a5a920f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 4162,
            "upload_time": "2025-07-30T20:51:31",
            "upload_time_iso_8601": "2025-07-30T20:51:31.524590Z",
            "url": "https://files.pythonhosted.org/packages/9f/dc/0608cd74fd6c7c7b2a2aaad180aed3ced370b70af703d37c51c84e922719/llama_index_readers_faiss-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-30 20:51:31",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "llama-index-readers-faiss"
}
        
Elapsed time: 2.17477s