Skip to main content

Prompt flow index build

Project description

Prompflow-rag

The promptflow-rag package is part of the Promptflow sdk and contains functionality for building indexes locally

Getting started

Prerequisites

Install the package

Install the Azure AI generative package for Python with pip:

pip install prompflow-rag

Usage

Create index locally

Users can create an index on their local machine from local source files using the build_index method. Given below is a sample.

from promptflow.rag.resources import LocalSource, AzureAISearchConfig, EmbeddingsModelConfig
from promptflow.rag import build_index

# build the index
ai_search_index_path=build_index(
    name=index_name,  # name of your index
    vector_store="azure_ai_search",  # the type of vector store - in this case it is Azure AI Search.
    embeddings_model_config=EmbeddingsModelConfig(
        embeddings_model=f"azure_open_ai://deployment/{embedding_model_deployment}/model/{embedding_model_name}"
    )
    input_source=LocalSource(input_data="data/product-info/"),  # the location of your file/folders
    index_config=AzureAISearchConfig(
        ai_search_index_name=ai_search_index_name # the name of the index store inside the azure ai search service
    )
)

The build index will return the path where the index was created.

Examples

TODO: add link to sample notebooks

Changelog

Please insert change log into "Next Release" ONLY.

Next release

0.0.1

  • Introduced package

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

promptflow_rag-0.0.1-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file promptflow_rag-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for promptflow_rag-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 372b2106967db38d5ea9247038fc5fed41b984c3cb66615659ddc4e0ec94ff59
MD5 ef431a4685d4bceacfca209e68ecbd26
BLAKE2b-256 c47b7c5edc55ffc79241e36caab2517432e3f434a36e1b172157f95e9f68e805

See more details on using hashes here.

Supported by

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