promptflow-rag


Namepromptflow-rag JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/microsoft/promptflow
SummaryPrompt flow index build
upload_time2024-05-10 23:25:35
maintainerNone
docs_urlNone
authorMicrosoft Corporation
requires_python<4.0,>=3.8
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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][azure_subscription].
- An [Azure Machine Learning Workspace][workspace].
- An [Azure AI Studio project][ai_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.

```python
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

<!-- LINKS -->

[ai_project]: https://aka.ms/azureaistudio
[azure_subscription]: https://azure.microsoft.com/free/
[workspace]: https://docs.microsoft.com/azure/machine-learning/concept-workspace


# promptflow-rag package

Please insert change log into "Next Release" ONLY.

## Next release

## 0.1.0

- ConnectionConfig parameter rename

## 0.0.1

- Introduced package

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/microsoft/promptflow",
    "name": "promptflow-rag",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Microsoft Corporation",
    "author_email": "aml-pt-eng@microsoft.com",
    "download_url": null,
    "platform": null,
    "description": "# Prompflow-rag\r\n\r\nThe promptflow-rag package is part of the Promptflow sdk and contains functionality for building indexes locally\r\n\r\n## Getting started\r\n\r\n### Prerequisites\r\n\r\n- Python 3.7 or later is required to use this package.\r\n- You must have an [Azure subscription][azure_subscription].\r\n- An [Azure Machine Learning Workspace][workspace].\r\n- An [Azure AI Studio project][ai_project].\r\n\r\n### Install the package\r\n\r\nInstall the Azure AI generative package for Python with pip:\r\n\r\n```\r\npip install prompflow-rag\r\n```\r\n\r\n## Usage\r\n\r\n### Create index locally\r\n\r\nUsers can create an index on their local machine from local source files using the `build_index` method. Given below is a sample.\r\n\r\n```python\r\nfrom promptflow.rag.resources import LocalSource, AzureAISearchConfig, EmbeddingsModelConfig\r\nfrom promptflow.rag import build_index\r\n\r\n# build the index\r\nai_search_index_path=build_index(\r\n    name=index_name,  # name of your index\r\n    vector_store=\"azure_ai_search\",  # the type of vector store - in this case it is Azure AI Search.\r\n    embeddings_model_config=EmbeddingsModelConfig(\r\n        embeddings_model=f\"azure_open_ai://deployment/{embedding_model_deployment}/model/{embedding_model_name}\"\r\n    )\r\n    input_source=LocalSource(input_data=\"data/product-info/\"),  # the location of your file/folders\r\n    index_config=AzureAISearchConfig(\r\n        ai_search_index_name=ai_search_index_name # the name of the index store inside the azure ai search service\r\n    )\r\n)\r\n```\r\n\r\nThe build index will return the path where the index was created.\r\n\r\n## Examples\r\n\r\n# TODO: add link to sample notebooks\r\n\r\n<!-- LINKS -->\r\n\r\n[ai_project]: https://aka.ms/azureaistudio\r\n[azure_subscription]: https://azure.microsoft.com/free/\r\n[workspace]: https://docs.microsoft.com/azure/machine-learning/concept-workspace\r\n\r\n\r\n# promptflow-rag package\r\n\r\nPlease insert change log into \"Next Release\" ONLY.\r\n\r\n## Next release\r\n\r\n## 0.1.0\r\n\r\n- ConnectionConfig parameter rename\r\n\r\n## 0.0.1\r\n\r\n- Introduced package\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Prompt flow index build",
    "version": "0.1.0",
    "project_urls": {
        "Bug Reports": "https://github.com/microsoft/promptflow/issues",
        "Homepage": "https://github.com/microsoft/promptflow",
        "Source": "https://github.com/microsoft/promptflow"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d97fdd001f98bb56681824953f70a3e7b2cb8e61b95ddb98d7dde553ff4fd200",
                "md5": "db7911ed5f7cece8c5861a1335f68216",
                "sha256": "86eb2ed880a1dcc0ad2e3a6dce4583c5ecadc4638f7af22197e225e0cdfb8703"
            },
            "downloads": -1,
            "filename": "promptflow_rag-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "db7911ed5f7cece8c5861a1335f68216",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 13379,
            "upload_time": "2024-05-10T23:25:35",
            "upload_time_iso_8601": "2024-05-10T23:25:35.383716Z",
            "url": "https://files.pythonhosted.org/packages/d9/7f/dd001f98bb56681824953f70a3e7b2cb8e61b95ddb98d7dde553ff4fd200/promptflow_rag-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-10 23:25:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "microsoft",
    "github_project": "promptflow",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "promptflow-rag"
}
        
Elapsed time: 0.64745s