Skip to main content

llama-index readers faiss integration

Project description

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:

pip install llama-index-readers-faiss

Usage

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_readers_faiss-0.5.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_readers_faiss-0.5.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_readers_faiss-0.5.0.tar.gz.

File metadata

  • Download URL: llama_index_readers_faiss-0.5.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_readers_faiss-0.5.0.tar.gz
Algorithm Hash digest
SHA256 2ff4c43c4d8eebf9bce4992c48465669b5725768359918a09fe12cfcbc36a70d
MD5 5fe59261720d92ff966a712806ae28b7
BLAKE2b-256 86ed90ec6d841676ff238f0426c1f08d37172f507ce1cc7e2b6f55262f817660

See more details on using hashes here.

File details

Details for the file llama_index_readers_faiss-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: llama_index_readers_faiss-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_readers_faiss-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f5a1a8b006907a05645bca82341ae636e0a6e63dd84070bdabc3de0f48282183
MD5 34b971ce59d8c7323cec285e7792ca08
BLAKE2b-256 e0458432692842d407789e24bcdf6ff55899c0e203c224d3e688f2772305dcb2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page