Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dominodatalab/rag
https://github.com/dominodatalab/rag
Last synced: 29 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dominodatalab/rag
- Owner: dominodatalab
- Created: 2023-11-03T21:07:44.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-30T20:00:22.000Z (about 1 year ago)
- Last Synced: 2023-11-30T21:22:24.012Z (about 1 year ago)
- Language: Jupyter Notebook
- Size: 2.32 MB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RAG
## Files
* RAG.ipynb : This notebook contains all the logic to load embeddings, setup the QA chain for RAG and allows users to ask queries once all the hyperparameters have been finalized.
* MLflow_eval.ipynb : This notebook contains code to evaluate a RAG pipeline for faithfulness and relevance using Mlflow. The metrics are also stored and can be visualized in the Experiments tab in Domino
* RAGAS_eval.ipynb : This notebook uses the RAGAS package to evaluate a RAG pipeline. This is another example of how to evaluate a RAG pipeline, RAGAS offers a couple of more metrics than MLFlow
* example_prompts.txt : Has a few examples of questions that can be presented as prompts to the QA chain
* app.sh : Script required to setup and use Streamlit in Domino
* streamlit_app.py : This file contains code that sets up the UI and workflow for a Streamlit chatbot. The app needs an Anthropic and Qdrant key to set in the sidebar to runOn `se-demo` this was run on a `Medium` hardware tier
## Environment Setup
### Custom base image
```Domino Standard Environment Py3.9 R4.2```### Dockerfile instructions
```
USER root:rootRUN pip uninstall --yes mlflow
RUN pip install openai langchain transformers tiktoken sentence-transformers \
qdrant-client ragas mlflow==2.8.0 getpass4 anthropic evaluate \
textstat streamlit pypdf accelerate peft bitsandbytesRUN pip install -i https://test.pypi.org/simple/ streamlit-chat-domino
```
On `se2-demo` this environment is available as `MedRAG`###