Skip to main content

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

promptflow-rag package

Please insert change log into "Next Release" ONLY.

Next release

0.1.0

  • ConnectionConfig parameter rename

0.0.1

  • Introduced package

Metadata

Release files for promptflow-rag 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for promptflow-rag 0.1.0
File Interpreter ABI Platform
promptflow_rag-0.1.0-py3-none-any.whl Python 3 none any Details

Release files / promptflow_rag-0.1.0-py3-none-any.whl

Download URL promptflow_rag-0.1.0-py3-none-any.whl
Size 13.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
86eb2ed880a1dcc0ad2e3a6dce4583c5ecadc4638f7af22197e225e0cdfb8703
BLAKE2b-256 checksum
How to use checksums
d97fdd001f98bb56681824953f70a3e7b2cb8e61b95ddb98d7dde553ff4fd200
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.8.18

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page