Prompflow-rag
The promptflow-rag package is part of the Promptflow sdk and contains functionality for building indexes locally
Getting started
Prerequisites
- Python 3.7 or later is required to use this package.
- You must have an Azure subscription.
- An Azure Machine Learning Workspace.
- An Azure AI Studio project.
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)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| promptflow_rag-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for promptflow_rag-0.1.0-py3-none-any.whl |
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
|
Security for promptflow-rag 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.