retriever_path
: Name/local path of the retrieval model.corpus_path
: Path to the corpus file (.jsonl), where each line should contain a contents
field representing a document or paragraph.embedding_path
: Path to store embedding vectors (.npy), used for index construction or loading. If not available, embeddings can be generated by calling the retriever_embed tool and saved to this path.index_path
: Path to save the index (.index), used to load existing indexes or save new ones.infinity_kwargs
: Parameters related to the infinity library, requiring settings such as pooling_method
(supports cls, mean, auto) and batch_size
.cuda_devices
: Specifies the GPU devices to use.query_instruction
: Prompt prefix concatenated before the query.faiss_use_gpu
: Whether to enable GPU-accelerated FAISS index. If set to False, FAISS runs on CPU.top_k
: Number of documents returned per query.overwrite
: Whether to allow overwriting existing embedding/index files. Set to False to avoid overwriting already generated files.retriever_url
: Address and port for deploying the retriever.index_chunk_size
: Index chunk size to prevent CPU from loading all data at once causing OOM.retriever_init
: Initializes and loads the retriever model, loads corpus data, and optionally loads existing indexes.retriever_embed
: Vectorizes the previously loaded corpus content and saves the embedding results as a .npy file for subsequent FAISS index construction.retriever_index
: Constructs a FAISS index based on pre-generated embedding files (.npy format) and saves it as a .index file for vector retrieval use.retriever_search
: Receives a set of queries, encodes them into vectors, retrieves them through the FAISS index, and returns the top-k similar text content for each query.retriever_deploy_service
: Starts a Flask-based vector retrieval server, deploying a /search endpoint that supports semantic retrieval via HTTP POST requests.retriever_deploy_search
: Acts as a client to access a remote Flask retrieval service, sending a list of queries to the specified service address, calling the /search endpoint via HTTP POST, and returning retrieval results.