ragmap


Nameragmap JSON
Version 0.1.1 PyPI version JSON
download
home_page
SummaryRAGmap is a simple RAG visualization package for exploring document chunks and queries in embedding space
upload_time2024-02-11 02:07:05
maintainer
docs_urlNone
author
requires_python>=3.8
licenseMIT License Copyright (c) 2024 JGalego Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords embeddings rag visualization
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # RAGmap πŸ—ΊοΈπŸ”

## Overview

RAGmap is a simple RAG visualization tool for exploring document chunks and queries in embedding space.

> Inspired by DeepLearning.ai's short course on [Advanced Retrieval for AI with Chroma](https://www.deeplearning.ai/short-courses/advanced-retrieval-for-ai/) and Gabriel Chua's award-winning [RAGxplorer](https://github.com/gabrielchua/RAGxplorer).

**Updates:**
* πŸ‘¨β€πŸ’» [RAGmap](https://pypi.org/project/ragmap) is now available as a standalone Python package!
* 🌐 Try the [live demo](https://ragmap.streamlit.app/) hosted on Streamlit Community Cloud.
* πŸ“’ RAGmap now supports [Hugging Face πŸ€—](https://huggingface.co) models!

<img src="https://github.com/JGalego/RAGmap/raw/main/images/ragmap_hf_support.gif" width="75%"/>

## What's inside?

RAGmap supports the following features:

* Multiple document formats πŸ“„
	- `PDF`
	- `DOCX`
	- `PPTX`
* Multiple embedding models
	- Hugging Face πŸ€—
	- Amazon Bedrock ⛰️
		- [Titan Text Embeddings](https://docs.aws.amazon.com/bedrock/latest/userguide/titan-embedding-models.html)
		- [Titan Multimodal Embeddings](https://docs.aws.amazon.com/bedrock/latest/userguide/titan-multiemb-models.html)
		- [Cohere Embed English](https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-embed.html)
		- [Cohere Embed Multilingual](https://aws.amazon.com/blogs/aws/amazon-bedrock-now-provides-access-to-cohere-command-light-and-cohere-embed-english-and-multilingual-models/)
* Dimensionality reduction (2D and 3D)
	- [UMAP](https://umap-learn.readthedocs.io/en/latest/)
	- [t-SNE](https://opentsne.readthedocs.io/en/stable/)
	- [PCA](https://scikit-learn.org/stable/modules/generated/sklearn.decomposition.PCA.html)
* Natural language queries
* Advanced query augmentation
	- Generated Answers (HyDE)
	- Multiple Queries
* ... and more!

☝️⚠️ **Important notice:** As of January 2024, chromadb's `AmazonBedrockEmbeddingFunction` only works with Titan models. Feel free to upvote this [PR](https://github.com/chroma-core/chroma/pull/1675) to add support for [Cohere Embed models](https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-embed.html).

<img src="https://github.com/JGalego/RAGmap/raw/main/images/ragmap.gif" width="75%"/>

## Prerequisites

### Amazon Bedrock

Enable access to the embedding ([Titan Embeddings](https://docs.aws.amazon.com/bedrock/latest/userguide/titan-embedding-models.html), [Cohere Embed](https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-embed.html)) and text ([Anthropic Claude](https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-claude.html)) models via Amazon Bedrock.

> For more information on how to request model access, please refer to the [Amazon Bedrock User Guide](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access.html) (**Set up > Model access**)

<img src="https://github.com/JGalego/RAGmap/raw/main/images/bedrock_model_access.png" width="75%"/>

## How to use

### Option 1 πŸ’»

1. Install dependencies

	```
	pip install -r requirements.txt
	```

2. Run the application

	```
	streamlit run app.py
	```

3. Point your browser to http://localhost:8501

### Option 2 🐳

1. Run the following command to start the application

	```
	docker-compose up
	```

2. Once the service is up and running, head over to http://localhost:8501

## Option 3 πŸ‘¨β€πŸ’»

1. Install the `ragmap` package

	```
	pip install ragmap
	```

2. Start building your own apps.

	> Check out the [examples](examples) folder to get started!

## Example: [Amazon shareholder letters](https://medium.com/@austenallred/every-amazon-shareholder-letter-as-downloadable-pdf-4eb2ae886018)

<img src="https://github.com/JGalego/RAGmap/raw/main/images/amazon_shareholder_letters.png" width="70%">

## References

* (AWS) [What is Retrieval-Augmented Generation?](https://aws.amazon.com/what-is/retrieval-augmented-generation/)
* (DeepLearning.ai) [Advanced Retrieval for AI with Chroma](https://www.deeplearning.ai/short-courses/advanced-retrieval-for-ai/)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "ragmap",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "Embeddings,RAG,Visualization",
    "author": "",
    "author_email": "Jo\u00e3o Galego <jgalego1990@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/7a/48/0197fad9f7f2c2c2f7a59b319592d3c76a7226eb7bc9492ab18a1476720d/ragmap-0.1.1.tar.gz",
    "platform": null,
    "description": "# RAGmap \ud83d\uddfa\ufe0f\ud83d\udd0d\n\n## Overview\n\nRAGmap is a simple RAG visualization tool for exploring document chunks and queries in embedding space.\n\n> Inspired by DeepLearning.ai's short course on [Advanced Retrieval for AI with Chroma](https://www.deeplearning.ai/short-courses/advanced-retrieval-for-ai/) and Gabriel Chua's award-winning [RAGxplorer](https://github.com/gabrielchua/RAGxplorer).\n\n**Updates:**\n* \ud83d\udc68\u200d\ud83d\udcbb [RAGmap](https://pypi.org/project/ragmap) is now available as a standalone Python package!\n* \ud83c\udf10 Try the [live demo](https://ragmap.streamlit.app/) hosted on Streamlit Community Cloud.\n* \ud83d\udce2 RAGmap now supports [Hugging Face \ud83e\udd17](https://huggingface.co) models!\n\n<img src=\"https://github.com/JGalego/RAGmap/raw/main/images/ragmap_hf_support.gif\" width=\"75%\"/>\n\n## What's inside?\n\nRAGmap supports the following features:\n\n* Multiple document formats \ud83d\udcc4\n\t- `PDF`\n\t- `DOCX`\n\t- `PPTX`\n* Multiple embedding models\n\t- Hugging Face \ud83e\udd17\n\t- Amazon Bedrock \u26f0\ufe0f\n\t\t- [Titan Text Embeddings](https://docs.aws.amazon.com/bedrock/latest/userguide/titan-embedding-models.html)\n\t\t- [Titan Multimodal Embeddings](https://docs.aws.amazon.com/bedrock/latest/userguide/titan-multiemb-models.html)\n\t\t- [Cohere Embed English](https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-embed.html)\n\t\t- [Cohere Embed Multilingual](https://aws.amazon.com/blogs/aws/amazon-bedrock-now-provides-access-to-cohere-command-light-and-cohere-embed-english-and-multilingual-models/)\n* Dimensionality reduction (2D and 3D)\n\t- [UMAP](https://umap-learn.readthedocs.io/en/latest/)\n\t- [t-SNE](https://opentsne.readthedocs.io/en/stable/)\n\t- [PCA](https://scikit-learn.org/stable/modules/generated/sklearn.decomposition.PCA.html)\n* Natural language queries\n* Advanced query augmentation\n\t- Generated Answers (HyDE)\n\t- Multiple Queries\n* ... and more!\n\n\u261d\ufe0f\u26a0\ufe0f **Important notice:** As of January 2024, chromadb's `AmazonBedrockEmbeddingFunction` only works with Titan models. Feel free to upvote this [PR](https://github.com/chroma-core/chroma/pull/1675) to add support for [Cohere Embed models](https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-embed.html).\n\n<img src=\"https://github.com/JGalego/RAGmap/raw/main/images/ragmap.gif\" width=\"75%\"/>\n\n## Prerequisites\n\n### Amazon Bedrock\n\nEnable access to the embedding ([Titan Embeddings](https://docs.aws.amazon.com/bedrock/latest/userguide/titan-embedding-models.html), [Cohere Embed](https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-embed.html)) and text ([Anthropic Claude](https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-claude.html)) models via Amazon Bedrock.\n\n> For more information on how to request model access, please refer to the [Amazon Bedrock User Guide](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access.html) (**Set up > Model access**)\n\n<img src=\"https://github.com/JGalego/RAGmap/raw/main/images/bedrock_model_access.png\" width=\"75%\"/>\n\n## How to use\n\n### Option 1 \ud83d\udcbb\n\n1. Install dependencies\n\n\t```\n\tpip install -r requirements.txt\n\t```\n\n2. Run the application\n\n\t```\n\tstreamlit run app.py\n\t```\n\n3. Point your browser to http://localhost:8501\n\n### Option 2 \ud83d\udc33\n\n1. Run the following command to start the application\n\n\t```\n\tdocker-compose up\n\t```\n\n2. Once the service is up and running, head over to http://localhost:8501\n\n## Option 3 \ud83d\udc68\u200d\ud83d\udcbb\n\n1. Install the `ragmap` package\n\n\t```\n\tpip install ragmap\n\t```\n\n2. Start building your own apps.\n\n\t> Check out the [examples](examples) folder to get started!\n\n## Example: [Amazon shareholder letters](https://medium.com/@austenallred/every-amazon-shareholder-letter-as-downloadable-pdf-4eb2ae886018)\n\n<img src=\"https://github.com/JGalego/RAGmap/raw/main/images/amazon_shareholder_letters.png\" width=\"70%\">\n\n## References\n\n* (AWS) [What is Retrieval-Augmented Generation?](https://aws.amazon.com/what-is/retrieval-augmented-generation/)\n* (DeepLearning.ai) [Advanced Retrieval for AI with Chroma](https://www.deeplearning.ai/short-courses/advanced-retrieval-for-ai/)\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 JGalego  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "RAGmap is a simple RAG visualization package for exploring document chunks and queries in embedding space",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/JGalego/RAGmap"
    },
    "split_keywords": [
        "embeddings",
        "rag",
        "visualization"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d0a1e17552b08453d34b721b60b568b7249f320940f59d8fbe94bb9dd3f8aa3f",
                "md5": "45547877a8eb8a340faf30d1e98c1e70",
                "sha256": "ccc300416d62d215683e38f317828514353443cb6b94eddd36af78ccbe752322"
            },
            "downloads": -1,
            "filename": "ragmap-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "45547877a8eb8a340faf30d1e98c1e70",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 10436,
            "upload_time": "2024-02-11T02:07:03",
            "upload_time_iso_8601": "2024-02-11T02:07:03.758951Z",
            "url": "https://files.pythonhosted.org/packages/d0/a1/e17552b08453d34b721b60b568b7249f320940f59d8fbe94bb9dd3f8aa3f/ragmap-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7a480197fad9f7f2c2c2f7a59b319592d3c76a7226eb7bc9492ab18a1476720d",
                "md5": "10c6e94d75ee7e3db508c9de3235fe0a",
                "sha256": "080a1573d35328d8856c64fdb5b8c503b4abff0533de1af41b05d416d72a9a04"
            },
            "downloads": -1,
            "filename": "ragmap-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "10c6e94d75ee7e3db508c9de3235fe0a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 11496,
            "upload_time": "2024-02-11T02:07:05",
            "upload_time_iso_8601": "2024-02-11T02:07:05.631462Z",
            "url": "https://files.pythonhosted.org/packages/7a/48/0197fad9f7f2c2c2f7a59b319592d3c76a7226eb7bc9492ab18a1476720d/ragmap-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-11 02:07:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "JGalego",
    "github_project": "RAGmap",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "ragmap"
}
        
Elapsed time: 0.21089s